forked from tompollard/phd_thesis_markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
125 lines (115 loc) · 3.41 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# Link repository with Travis CI
# https://travis-ci.org/
# Whitelist gh-pages branch
branches:
only:
- master
# Set the language
language: bash
os:
- osx
# - linux # https://tex.stackexchange.com/questions/313768/why-getting-this-error-tlmgr-unknown-directive
# env:
# global:
# - PATH=$TRAVIS_BUILD_DIR/usr/bin/:$PATH
# - PATH=/Library/TeX/texbin:$PATH
python:
# We don't actually use the Travis Python, but this keeps it organized.
# - "2.7"
# - "3.5"
- "3.6"
- "3.7"
- "3.8"
addons:
apt:
packages:
- texlive
- xzdec
update: true
homebrew:
casks:
- mactex
update: true
before_install:
# For debug
- echo $PATH
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
eval "$(/usr/libexec/path_helper)"
sudo tlmgr update --self
elif [ "$TRAVIS_OS_NAME" = "linux" ]; then
tlmgr init-usertree
echo MSG FROM JO:
echo on linux we cannot update apt installed texlive
echo next steps to fix see commit msg: https://github.com/tompollard/phd_thesis_markdown/pull/100/commits/85fd9e7ac413a34066b79f1e49b3e1d3efdeac00
echo c.f. https://tex.stackexchange.com/questions/551383/cant-run-tex-lives-tlmgr-in-a-github-action
echo and https://tex.stackexchange.com/questions/1092/how-to-install-vanilla-texlive-on-debian-or-ubuntu
fi
# Install conda
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
OS_NAME=MacOSX
elif [ "$TRAVIS_OS_NAME" = "linux" ]; then
OS_NAME=Linux
fi
- |
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-${OS_NAME}-x86_64.sh -O miniconda.sh
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-${OS_NAME}-x86_64.sh -O miniconda.sh
fi
- bash miniconda.sh -b -p $HOME/miniconda
- source "$HOME/miniconda/etc/profile.d/conda.sh"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
# The install of mactex...takes a long time: ~20mins
# investigate using a docker image to save time?:
# https://tex.stackexchange.com/questions/398830/how-to-build-my-latex-automatically-using-travis-ci
# This is now done in the 'addons:' travis config above
# - |
# if [ "$TRAVIS_OS_NAME" = "osx" ]; then
# brew update && brew upgrade
# brew install --cask mactex
# sudo tlmgr update --self
# elif [ "$TRAVIS_OS_NAME" = "linux" ]; then
# sudo apt-get install texlive
# fi
# For debug
- echo $PATH
install:
# Make python venv
- conda create -n phd python=${PYTHON_VERSION} pandoc
- conda activate phd
# Installs both python and texlive dependencies
- make install
# For debug
- cat /usr/local/texlive/2020/texmf-var/web2c/tlmgr.log
- conda list
- pip list
- python --version
- pandoc --version
- tlmgr --version
- latex --version
- echo $PATH
- which tlmgr
- which latex
- find /usr/local/texlive/2020/ -type f -name "l3backend*"
# Attempt to create all document output types
script:
- echo ========================== beginning testing script ==========================
- make help
- make tex
- cat pandoc.tex.log
- make pdf
- cat pandoc.pdf.log
# Debugging the mac error
- find /usr/local/texlive/2020/ -type f -name "l3backend*"
- make html
- cat pandoc.html.log
- make docx
- cat pandoc.docx.log
- make all
- cat pandoc.*.log