-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
75 lines (68 loc) · 2.1 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
# Based on a build template from:
#
# https://docs.haskellstack.org/en/stable/travis_ci/
# Choose a build environment
dist: xenial
# Do not choose a language; we provide our own build tools.
language: generic
# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.stack
timeout: 1000
before_install:
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
jobs:
include:
- stage: bigdeps
name: "Cache some big / time-consuming dependencies"
addons:
apt:
packages:
- libgmp-dev
script: stack --no-terminal install diagrams-core JuicyPixels lens singletons
- stage: build
name: "Build library and notes"
addons:
apt:
sources:
- sourceline: 'ppa:jonathonf/texlive-2018'
packages:
- libgmp-dev
- texlive-fonts-recommended
- texlive-generic-extra
- texlive-latex-extra
- texlive-luatex
- texlive-publishers
- texlive-science
- texlive-xetex
- latexmk
- fonts-lmodern
- fonts-texgyre
- python-pygments
script:
- stack --no-terminal --install-ghc test --only-dependencies
- export IDDQD=1
- stack --no-terminal test --haddock --no-haddock-deps
- stack exec tex-plots
- export PUB_DATE=$(date '+%Y-%m-%dT%H:%M:%S%z')
- sed -i -e "s/PUBDATE/${PUB_DATE}/" notes/notes.tex
- sed -i -e "s/{{PUB_DATE}}/${PUB_DATE}/" gh-pages/index.html
- pushd notes; make; popd
- cp notes/notes.pdf gh-pages/notes.pdf
- cp notes/intro-slides.pdf gh-pages/intro-slides.pdf
- cp logo.svg gh-pages/logo.svg
deploy:
provider: pages
local_dir: gh-pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
keep_history: true
on:
branch: master
stages:
- bigdeps
- build