Fix LaTeX installation problems on travis by installing everything manually

- There are always problems when installing LaTeX or pandoc from the default
  Ubuntu repos because they are too old. Now I'm taking a sledgehammer to
  crack the nut by installing everything manually. I'm also switching from
  the language `r` to `java` because I plan to include unit tests written in
  Java (they need Maven to run).
This commit is contained in:
Wandmalfarbe 2020-05-03 23:19:48 +02:00
parent d1d8e8f08b
commit 84c0d9da68
2 changed files with 59 additions and 7 deletions

15
.texlife.profile Normal file
View File

@ -0,0 +1,15 @@
selected_scheme scheme-basic
instopt_adjustpath 1
collection-basic 1
collection-bibtexextra 0
collection-fontsextra 0
collection-fontsrecommended 1
collection-langchinese 0
collection-latex 1
collection-latexextra 0
collection-latexrecommended 1
collection-mathscience 0
collection-xetex 1
tlpdbopt_autobackup 0
tlpdbopt_install_docfiles 0
tlpdbopt_install_srcfiles 0

View File

@ -1,19 +1,56 @@
os: linux
dist: xenial
language: r
pandoc_version: 2.9.1
install:
# for rendering the PDFs
dist: bionic
language: java
before_install:
# default pandoc is too old -> install a newer version manually
- PANDOC_VERSION="2.9.2"
- pandoc_deb="pandoc-${PANDOC_VERSION}-1-amd64.deb"
- wget "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/${pandoc_deb}"
- sudo dpkg -i ${pandoc_deb}
- rm ${pandoc_deb}
# default textlife from apt-get is too old
# install the latest texlife version manually
- REMOTE="http://mirror.ctan.org/systems/texlive/tlnet"
- INSTALL="/tmp/install-texlive"
- mkdir -p $INSTALL
- curl -sSL $REMOTE/install-tl-unx.tar.gz | tar -xzv -C $INSTALL --strip-components=1
- sudo $INSTALL/install-tl -no-gui -profile .texlife.profile
- VERSION=$($INSTALL/install-tl --version | grep 'version' | grep -o '[0-9]\{4\}')
- PLATFORM=$($INSTALL/install-tl --print-platform)
- TEXLIVE_DIR="/usr/local/texlive/${VERSION}"
- TEXBIN="/usr/local/texlive/${VERSION}/bin/${PLATFORM}"
- export "PATH=$TEXBIN:$PATH"
# initialization for tlmgr
- sudo apt-get install xzdec
- tlmgr init-usertree
# install pdftoppm for rendering the PDFs
- sudo apt-get install poppler-utils
# for executing python based pandoc filters
# for executing python based pandoc filters install python and pip
- sudo apt-get install python3
- sudo apt-get install python3-pip
- sudo pip3 install --upgrade setuptools
- sudo pip3 install wheel # see https://github.com/pypa/setuptools/issues/1934
- sudo pip3 install wheel
# install python filters
- pip3 install pandoc-latex-environment
# packages specified in the template
#- sudo $(which tlmgr) install adjustbox afterpage amsmath amssymb babel background beamerarticle bidi bookmark booktabs caption csquotes etoolbox fancyhdr fancyvrb float fontenc footmisc footnote footnotebackref footnotehyper fvextra geometry graphicx grffile hyperref ifluatex ifxetex inputenc listings lmodern longtable luatexja-fontspec luatexja-preset mathspec mdframed microtype natbib pagecolor parskip pgfpages polyglossia setspace sourcecodepro sourcesanspro textcomp tikz titling ulem unicode-math upquote url xcolor xeCJK xurl
- sudo chown -hR $(whoami) "$TEXLIVE_DIR"
# packages specified in the template
- tlmgr install adjustbox background bidi csquotes footmisc footnotebackref fvextra mdframed pagecolor sourcecodepro sourcesanspro titling ulem upquote xurl
# trial and error
- tlmgr install letltxmacro zref everypage framed collectbox
# packages needed for the template
- tlmgr install xecjk filehook unicode-math ucharcat pagecolor babel-german ly1 mweights sourcecodepro sourcesanspro mdframed needspace fvextra footmisc footnotebackref background
# packages only needed for some examples (that include packages via header-includes)
- tlmgr install awesomebox fontawesome5
before_script: