2

I succesfully build a latex document using instructions from How to build my LaTeX automatically using Travis CI? and save the pdf in a github release. I use the tectronic docker image of @rekka.

However now that my latex document uses biber/biblatex the cites and \printbibliography doesnt work when produced by travis (locally it works running lualatex, biber, lualatex, lualatex).

I assume biber is not run on travis. Does someone know how I can run biber on travis?

PS: Forgive me if I got something wrong, im rather a LaTeX-Beginner

EDIT: My .travis.yml looks like this:

sudo: required
services: docker
script:
- docker pull rekka/tectonic
- docker run --mount src=$TRAVIS_BUILD_DIR,target=/usr/src/tex,type=bind rekka/tectonic
  tectonic main.tex
deploy:
  provider: releases
  api_key:
    secure: [long API key]
  file: main.pdf
  skip_cleanup: true
  on:
    repo: [my-repo]

EDIT2: @moewe found this github issue https://github.com/tectonic-typesetting/tectonic/issues/35 which is asking for biblatex support on tectronic. However question remains the same (allthough not necessary with tectronic anymore).

Joker
  • 238
  • The .travis.yml in the linked answer ends with - travis_wait 3 pdflatex -output-directory _build ./src/nameofmytexfile.tex did you try to add a Biber call there? You can make your life much easier if you don't use a build directory (-output-directory). Remember that you need to run pdflatex, biber, pdflatex, pdflatex. – moewe Sep 19 '18 at 09:13
  • 2
    Welcome to TeX.SX! Could you please show your build file here? Maybe you could simply run arara on Travis and specify the instructions in your file. – TeXnician Sep 19 '18 at 09:14
  • 1
    You will have to tell tectonic to run Biber for you. I have never heard of it and I could not find documentation, so I guess you have a better chance of getting an answer at https://tectonic.newton.cx/ – moewe Sep 19 '18 at 09:18
  • Of course it is also possible that something else is going wrong, but to diagnose that we would need to see the .log and .blg files. – moewe Sep 19 '18 at 09:22
  • @moewe I can only show you the log of travis see here https://pastebin.com/dpsH0VRw Maybe its possible to copy .log and .blg file to the github release. – Joker Sep 19 '18 at 09:27
  • 1
    https://github.com/tectonic-typesetting/tectonic/issues/35 suggests Biber is not supported in tectonic yet. Apparently there are workarounds: https://github.com/tectonic-typesetting/tectonic/issues/53, https://malramsay.com/post/compiling_latex_on_travis/ – moewe Sep 19 '18 at 10:29
  • What about https://hub.docker.com/r/sumdoc/texlive-2018/? – moewe Sep 19 '18 at 10:43
  • Thanks for pointing me out to this various links. I found out about issue 53 and its probably a lot of work to download binaries and integrate them (I guess). Texlive full distro is too big (3gb on each build). But the malramsay link is promising. I also found https://github.com/PHPirates/travis-ci-latex-pdf#1b-miniconda-with-tectonic this one promising. Let you know how it turns out – Joker Sep 19 '18 at 11:08
  • @moewe https://github.com/PHPirates/travis-ci-latex-pdf#1b-miniconda-with-tectonic Didnt work, I got an error on compilation of my tex file, which I didnt investigate further. Also build took 4 times longer.

    https://malramsay.com/post/compiling_latex_on_travis/ did work flawlessly. I havent made any cites yet, but soon as I do I will post it as answer. Buildtitme has almost tripled, though

    – Joker Sep 26 '18 at 11:51

1 Answers1

2

I build a docker image which includes tectonic and biber. (Based of @rekka's image and this information).

Basically these commands are ran inside the container (which you can see in the .travis.yml) :

tectonic --keep-intermediates --reruns 0 main.tex
biber main
tectonic main.tex

The .travis.yml looks now like this:

sudo: required
services: docker
script:
- docker pull dxjoke/tectonic-docker
- docker run --mount src=$TRAVIS_BUILD_DIR,target=/usr/src/tex,type=bind dxjoke/tectonic-docker
  /bin/sh -c "tectonic --keep-intermediates --reruns 0 main.tex; biber main; tectonic main.tex"
deploy:
  provider: releases
  api_key:
    secure: [long api key]
  file: main.pdf
  skip_cleanup: true
  on:
    repo: [myrepo]
Joker
  • 238