forked from jackolney/travis-ci-latex-pdf
-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy path.travis.yml
53 lines (47 loc) · 2.16 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
language: generic
before_install:
# Install makeindex, if you do not use an index you can remove this (also remove the extra makeindex call).
- sudo apt-get install texlive-binaries
install:
# Silent install from conda docs
# https://conda.io/docs/user-guide/install/macos.html#install-macos-silent
# adapted using
# https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html
# Needed to check if conda already installed
- export PATH="$HOME/miniconda/bin:$PATH"
# If not yet installed, obtain Miniconda
# and tectonic
# From tectonic docs
# https://tectonic-typesetting.github.io/en-US/install.html#the-anaconda-method
- if ! command -v conda > /dev/null; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda -u;
conda config --add channels conda-forge;
conda config --set always_yes yes;
conda install tectonic==0.1.11;
fi
# Install biber if required for compiling the references.
# Biber version should match the biblatex version of Tectonic
- conda install -c malramsay biber==2.11 --yes
- conda info -a
# Workaround if a specific bundle is needed
# - sudo mkdir -p ~/.config/Tectonic/
# - echo "[[default_bundles]]" | sudo tee --append ~/.config/Tectonic/config.toml
# - sudo echo "url = \"https://tectonic.newton.cx/bundles/tlextras-2018.1r0/bundle.tar\"" | sudo tee --append ~/.config/Tectonic/config.toml
cache:
directories:
- $HOME/miniconda
- $HOME/.cache/Tectonic
script: # Change working directory each time so including files will work. Change back so the pdfs can be found for deployment. This way, building multiple files goes well.
- cd ./src/
# Run tectonic once to generate intermediate files
- tectonic --keep-intermediates --reruns 0 ./main.tex
# If a bcf file exists run biber to compile references
- if [ -f "main.bcf" ]; then biber main; fi
# Only needed when using an index:
# - tectonic --keep-intermediates ./main.tex
# Tectonic does not include makeindex, so that needs to be done manually.
# - makeindex ./main.idx
# Final run of tectonic to create output
- tectonic ./main.tex --print
- cd ../