-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
114 lines (109 loc) · 5.89 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
language: c
sudo: false
env:
global:
# RACKET_DIR is an argument to install-racket.sh
- RACKET_DIR=~/racket
- PATH="$RACKET_DIR/bin:$PATH"
matrix:
- RACKET_VERSION=6.9 DEPLOY=true
- RACKET_VERSION=6.10 DEPLOY=true
- RACKET_VERSION=6.10.1 DEPLOY=true
- RACKET_VERSION=6.11 DEPLOY=true
- RACKET_VERSION=6.12 DEPLOY=true
- RACKET_VERSION=7.0 DEPLOY=true
- RACKET_VERSION=7.1 DEPLOY=true
- RACKET_VERSION=7.2 DEPLOY=true
- RACKET_VERSION=7.3 DEPLOY=true
- RACKET_VERSION=7.4 DEPLOY=true
- RACKET_VERSION=7.5 DEPLOY=true
- RACKET_VERSION=7.6 DEPLOY=true
- RACKET_VERSION=7.7 DEPLOY=true
- RACKET_VERSION=7.8 DEPLOY=true
- RACKET_VERSION=7.9 DEPLOY=true
- RACKET_VERSION=8.0 DEPLOY=true
- RACKET_VERSION=8.0 DEPLOY=true RACKET_CS=1
cache:
directories:
- ~/.racket
before_install:
- true
jobs:
include:
- stage: phase1
install:
# If [fastbuild] is on, skip directly to stage 2.
- if test -e ~/.racket/travis_build_id && echo "$TRAVIS_COMMIT_MESSAGE" | grep -q -F "[fastbuild]"; then echo "$TRAVIS_BUILD_ID" && echo "fastbuild" > ~/.racket/travis_build_id && travis_terminate 0; fi
- curl -L https://raw.githubusercontent.com/greghendershott/travis-racket/master/install-racket.sh | bash
# - if $COV; then raco pkg install --deps search-auto doc-coverage cover cover-codecov; fi # or cover-coveralls
- mv ~/.racket ~/.racket-discard
- mkdir ~/.racket
- echo "$TRAVIS_BUILD_ID"
- echo "$TRAVIS_BUILD_ID" > ~/.racket/travis_build_id
# Install custom version of scribble-lib which includes fixes for bibted-related problems which have not merged upstream yet. Also includes extended support for highlighting Racket code.
- raco pkg install --force --name scribble-lib https://github.com/jsmaniac/hyper-literate.git?path=scribble-lib#my-changes
- raco pkg install --deps search-auto -j 2 type-expander # Start installing stuff, continue later to avoid timeout.
- raco pkg install --deps search-auto -j 2 phc-adt # Start installing stuff, continue later to avoid timeout.
script:
- true
- stage: phase2
addons:
apt:
packages:
- texlive-latex-base
- texlive-fonts-extra
- texlive-fonts-recommended
- texlive-latex-extra
# texlive-latex3 on 12.04, texlive-latex-recommended on more recent versions of Ubuntu.
- texlive-latex3
- texlive-latex-recommended
- pgf
- latex-xcolor
install:
- if echo "$TRAVIS_COMMIT_MESSAGE" | grep -q -F "[keepcache]"; then cp -ai ~/.racket ~/.racket-stage1; fi
- if test "$TRAVIS_BUILD_ID" != `cat ~/.racket/travis_build_id` && !(test "fastbuild" = `cat ~/.racket/travis_build_id` || (echo "$TRAVIS_COMMIT_MESSAGE" | grep -q -F "[fastbuild]")); then travis_terminate 1; fi
- rm -f ~/.racket/travis_build_id
- curl -L https://raw.githubusercontent.com/greghendershott/travis-racket/master/install-racket.sh | bash
# - if $COV; then raco pkg install --deps search-auto doc-coverage cover cover-codecov; fi # or cover-coveralls
- echo "LaTeX extra packages:"
- latex_home=$(kpsewhich -var-value=TEXMFHOME)
- curl -L -o newunicodechar.ins http://mirrors.ctan.org/macros/latex/contrib/newunicodechar/newunicodechar.ins
- curl -L -o newunicodechar.dtx http://mirrors.ctan.org/macros/latex/contrib/newunicodechar/newunicodechar.dtx
- latex newunicodechar.ins
- mkdir -p "$latex_home/tex/latex/newunicodechar"
- mv newunicodechar.sty "$latex_home/tex/latex/newunicodechar"
- curl -L -o mathpartir.dtx http://mirrors.ctan.org/macros/latex/contrib/mathpartir/mathpartir.dtx
- curl -L -o mathpartir.ins http://mirrors.ctan.org/macros/latex/contrib/mathpartir/mathpartir.ins
- latex mathpartir.ins
- mkdir -p "$latex_home/tex/latex/mathpartir"
- mv mathpartir.sty "$latex_home/tex/latex/mathpartir"
- echo "Finished installing extra latex packages."
- raco pkg install --deps search-auto -j 2
# Do this before modifying anything else in the build folder, to avoid the "x" marker indicating changes since last commit.
- zipfile_folder_name="$(racket -e '(begin (require phc-thesis/scribblings/util) (display (version-text "phc-thesis-" "")))')"
- raco test -x -p "$(basename "$TRAVIS_BUILD_DIR")"
- raco setup --check-pkg-deps --no-zo --no-launcher --no-install --no-post-install --no-docs --pkgs "$(basename "$TRAVIS_BUILD_DIR")";
- rm -fr doc/
- raco scribble --dest doc/phc-thesis --html --dest-name index --redirect-main https://docs.racket-lang.org/ --redirect https://docs.racket-lang.org/ scribblings/phc-thesis.scrbl > html.log 2>&1 || (cat html.log && exit 1)
- make
- find doc -name '*.html' -type f -print0 | xargs -0 ls -ld
- find doc -name '*.html' -type f -print0 | xargs -0 sed -i -e 's|https://download\.racket-lang\.org/docs/6\.9/html/|https://docs.racket-lang.org/|g'
- find doc -name '*.html' -type f -print0 | xargs -0 ls -ld
- nvm install v8.1 # works with v8.1.4
- npm install mathjax-node
- patch -p1 < qaligned.patch
- patch -p1 < MathJax-bfit.patch
- node < run-mathjax-offline.node.js
- mv doc/phc-thesis/index2.html doc/phc-thesis/index.html
- mv doc "${zipfile_folder_name}"
- zip -r "${zipfile_folder_name}.zip" "${zipfile_folder_name}"
- mv "${zipfile_folder_name}" doc
- mv "${zipfile_folder_name}.zip" doc/
- if test "x${DEPLOY:-}" = "xtrue"; then sh ./auto-push-gh-pages.sh; fi
- mv ~/.racket ~/.racket-discard
# Keeping pre-existing cache from stage 1 for faster build with [fastbuild] option next time, or clear the cache.
- if echo "$TRAVIS_COMMIT_MESSAGE" | grep -q -F "[keepcache]"; then mv ~/.racket-stage1 ~/.racket; else mkdir ~/.racket; fi
script:
- true
#after_success:
# - sh ./auto-push-master.sh