git.iko.soy/typeable/pandoc
on 2.0.1 help sign in
typeable/pandoc/.travis.yml
133 lines 5.9 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 - env: BUILD=cabal GHCVER=7.8.4 CABALVER=1.18 OPTS="-O0 -Wall -fno-warn-unused-do-bind -Werror" FLAGS="fast embed_data_files" CABALARGS="--enable-benchmarks"
35 compiler: ": #GHC 7.8.4"
36 addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4,happy-1.19.5], sources: [hvr-ghc]}}
38 # don't build benchmarks for ghc 7.10.3, because build takes too long...
39 - 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=""
40 compiler: ": #GHC 7.10.3"
41 addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,happy-1.19.5], sources: [hvr-ghc]}}
43 # don't build benchmarks for ghc 8.0.2, because build takes too long...
44 - 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=""
45 compiler: ": #GHC 8.0.2"
46 addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5], sources: [hvr-ghc]}}
48 - env: BUILD=cabal GHCVER=8.2.1 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"
49 compiler: ": #GHC 8.2.1"
50 addons: {apt: {packages: [cabal-install-1.24,ghc-8.2.1,happy-1.19.5], sources: [hvr-ghc]}}
52 - env: BUILD=cabal GHCVER=8.2.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.2.1"
54 addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.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="--resolver lts-9" 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 # Nightly builds are allowed to fail
69 - env: BUILD=stack ARGS="--resolver nightly"
70 compiler: ": #stack nightly"
71 addons: {apt: {packages: [ghc-8.2.1], sources: [hvr-ghc]}}
73 # - env: BUILD=stack ARGS="--resolver lts-8"
74 # compiler: ": #stack 8.0.2 osx"
75 # os: osx
77 # - env: BUILD=stack ARGS="--resolver nightly"
78 # compiler: ": #stack nightly osx"
79 # os: osx
81 allow_failures:
82 - env: BUILD=cabal GHCVER=head CABALVER=head
83 - env: BUILD=stack ARGS="--resolver nightly"
85 fast_finish: true
87before_install:
88# Using compiler above sets CC to an invalid value, so unset it
89- unset CC
90- export PATH=$PATH:/opt/happy/1.19.5/bin/:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.local/bin:$HOME/.cabal/bin
91# Download and unpack the stack executable
92- |
93 if [[ $BUILD == "stack" ]]; then
94 mkdir -p ~/.local/bin
95 if [ `uname` = "Darwin" ]
96 then
97 curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
98 else
99 curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
100 fi
101 fi
103install:
104- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
105- if [ -f configure.ac ]; then autoreconf -i; fi
106- |
107 case "$BUILD" in
108 stack)
109 ulimit -n 4096
110 stack --no-terminal --install-ghc $ARGS build --only-dependencies --fast --flag 'pandoc:embed_data_files' --flag 'aeson:fast'
111 ;;
112 cabal)
113 cabal --version
114 travis_retry cabal update
115 cabal install --disable-optimization --only-dependencies --flags="$FLAGS" --enable-tests --force-reinstalls --reorder-goals --max-backjumps=-1 $CABALARGS
116 ;;
117 esac
119script:
120- |
121 case "$BUILD" in
122 stack)
123 ulimit -n 4096
124 stack --no-terminal $ARGS test --fast --flag 'aeson:fast' --flag pandoc:embed_data_files --haddock --no-haddock-deps --ghc-options="$OPTS"
125 ;;
126 cabal)
127 cabal sdist --output-directory=sourcedist && \
128 cd sourcedist && \
129 cabal configure --disable-optimization --enable-tests -v2 --flags="$FLAGS" --ghc-options="$OPTS" $CABALARGS && \
130 cabal build -v2 -j2 && \
131 cabal test
132 ;;
133 esac