git.iko.soy/typeable/pandoc
on 2.1.3 help sign in
typeable/pandoc/.travis.yml
139 lines 6.6 kB history raw
1# This .travis.yml is modified from the sample at
2# https://docs.haskellstack.org/en/stable/GUIDE/#travis-with-caching
4# Use new container infrastructure to enable caching
5sudo: false
7# Do not choose a language; we provide our own build tools.
8language: generic
10# Caching so the next build will be fast too.
11cache:
12 directories:
13 - $HOME/.ghc
14 - $HOME/.cabal
15 - $HOME/.stack
17# The different configurations we want to test. We have BUILD=cabal which uses
18# cabal-install, and BUILD=stack which uses Stack. More documentation on each
19# of those below.
21# We set the compiler values here to tell Travis to use a different
22# cache file per set of arguments.
24# If you need to have different apt packages for each combination in the
25# matrix, you can use a line such as:
26# addons: {apt: {packages: [libfcgi-dev,libgmp-dev]}}
28# fast_finish: build successful when every builds not in allow_failure are finished
29# i.e. not waiting any of the allow_failure to finish
30matrix:
31 include:
32 # We grab the appropriate GHC and cabal-install versions from hvr's PPA. See:
33 # https://github.com/hvr/multi-ghc-travis
34 # don't build benchmarks for ghc 7.10.3, because build takes too long...
35 - env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22 OPTS="-O0 -Wall -fno-warn-unused-do-bind -Werror" FLAGS="fast embed_data_files" CABALARGS=""
36 compiler: ": #GHC 7.10.3"
37 addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,happy-1.19.5], sources: [hvr-ghc]}}
39 # don't build benchmarks for ghc 8.0.2, because build takes too long...
40 - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 OPTS="-O0 -Wall -Wincomplete-record-updates -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -fno-warn-unused-do-bind -Werror" FLAGS="fast" CABALARGS=""
41 compiler: ": #GHC 8.0.2"
42 addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5], sources: [hvr-ghc]}}
44 - env: BUILD=cabal GHCVER=8.2.2 CABALVER=1.24 OPTS="-O0 -Wall -Wincomplete-record-updates -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -fno-warn-unused-do-bind -Werror" FLAGS="fast embed_data_files" CABALARGS="--enable-benchmarks"
45 compiler: ": #GHC 8.2.2"
46 addons: {apt: {packages: [cabal-install-1.24,ghc-8.2.2,happy-1.19.5], sources: [hvr-ghc]}}
48 - env: BUILD=cabal GHCVER=8.2.2 CABALVER=2.0 OPTS="-O0 -Wall -Wincomplete-record-updates -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -fno-warn-unused-do-bind -Werror" FLAGS="fast embed_data_files" CABALARGS="--enable-benchmarks"
49 compiler: ": #GHC 8.2.2"
50 addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,happy-1.19.5], sources: [hvr-ghc]}}
52 - env: BUILD=cabal GHCVER=8.4.1 CABALVER=2.0 OPTS="-O0 -Wall -Wincomplete-record-updates -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -fno-warn-unused-do-bind -Werror" FLAGS="fast embed_data_files" CABALARGS="--enable-benchmarks"
53 compiler: ": #GHC 8.4.1"
54 addons: {apt: {packages: [cabal-install-2.0,ghc-8.4.1,happy-1.19.5], sources: [hvr-ghc]}}
56 # Build with the newest GHC and cabal-install. This is an accepted failure,
57 # see below.
58 # - env: BUILD=cabal GHCVER=head CABALVER=head CABALAGS="--allow-newer"
59 # compiler: ": #GHC HEAD"
60 # addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
62 # The Stack builds. We can pass in arbitrary Stack arguments via the ARGS
63 # variable, such as using --stack-yaml to point to a different file.
64 # - env: BUILD=stack ARGS="--stack-yaml stack.lts9.yaml" OPTS="-Wall -Wincomplete-record-updates -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -fno-warn-unused-do-bind -Werror"
65 # compiler: ": #stack 8.0.2"
66 # addons: {apt: {packages: [ghc-8.0.2], sources: [hvr-ghc]}}
68 - env: BUILD=stack ARGS="--resolver lts-10" OPTS="-Wall -Wincomplete-record-updates -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -fno-warn-unused-do-bind -Werror"
69 compiler: ": #stack 8.2.2"
70 addons: {apt: {packages: [ghc-8.2.2], sources: [hvr-ghc]}}
72 # Nightly builds are allowed to fail
73 - env: BUILD=stack ARGS="--resolver nightly" OPTS="-Wall -Wincomplete-record-updates -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -fno-warn-unused-do-bind -Werror"
74 compiler: ": #stack nightly"
75 addons: {apt: {packages: [ghc-8.2.2], sources: [hvr-ghc]}}
77 # - env: BUILD=stack ARGS="--resolver lts-8"
78 # compiler: ": #stack 8.0.2 osx"
79 # os: osx
81 # - env: BUILD=stack ARGS="--resolver nightly"
82 # compiler: ": #stack nightly osx"
83 # os: osx
85 allow_failures:
86 - env: BUILD=cabal GHCVER=head CABALVER=head
87 - env: BUILD=stack ARGS="--resolver nightly" OPTS="-Wall -Wincomplete-record-updates -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -fno-warn-unused-do-bind -Werror"
89 fast_finish: true
91before_install:
92# Using compiler above sets CC to an invalid value, so unset it
93- unset CC
94- export PATH=/opt/happy/1.19.5/bin/:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.local/bin:$HOME/.cabal/bin:$PATH
95# Download and unpack the stack executable
96- |
97 if [[ $BUILD == "stack" ]]; then
98 mkdir -p ~/.local/bin
99 if [ `uname` = "Darwin" ]
100 then
101 curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
102 else
103 curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
104 fi
105 fi
107install:
108- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
109- if [ -f configure.ac ]; then autoreconf -i; fi
110- |
111 case "$BUILD" in
112 stack)
113 ulimit -n 4096
114 stack config set system-ghc --global true
115 stack --no-terminal --install-ghc $ARGS build --only-dependencies --fast --flag 'pandoc:embed_data_files' --flag 'aeson:fast' --jobs 2
116 ;;
117 cabal)
118 cabal --version
119 travis_retry cabal update
120 cabal install --disable-optimization --only-dependencies --flags="$FLAGS" --enable-tests --force-reinstalls --reorder-goals --max-backjumps=-1 $CABALARGS
121 ;;
122 esac
124script:
125- |
126 case "$BUILD" in
127 stack)
128 ulimit -n 4096
129 stack config set system-ghc --global true
130 stack --no-terminal $ARGS test --fast --flag 'aeson:fast' --flag pandoc:embed_data_files --haddock --no-haddock-deps --ghc-options="$OPTS"
131 ;;
132 cabal)
133 cabal sdist --output-directory=sourcedist && \
134 cd sourcedist && \
135 cabal configure --disable-optimization --enable-tests -v2 --flags="$FLAGS" --ghc-options="$OPTS" $CABALARGS && \
136 cabal build -v2 -j2 && \
137 cabal test
138 ;;
139 esac