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
7# Do not choose a language; we provide our own build tools.
10# Caching so the next build will be fast too.
19 - GHC_OPTIONS="-O0 -Werror"
28# The different configurations we want to test. We have BUILD=cabal which uses
29# cabal-install, and BUILD=stack which uses Stack. More documentation on each
32# We set the compiler values here to tell Travis to use a different
33# cache file per set of arguments.
35# fast_finish: build successful when every builds not in allow_failure are finished
36# i.e. not waiting any of the allow_failure to finish
41 # We grab the appropriate GHC and cabal-install versions from hvr's PPA. See:
42 # https://github.com/hvr/multi-ghc-travis
43 # don't build benchmarks for ghc 7.10.3, because build takes too long...
48 FLAGS="fast embed_data_files"
50 TESTPATTERN="! /Round trip/"
51 compiler: ": #GHC 7.10.3"
53 # don't build benchmarks for ghc 8.0.2, because build takes too long...
60 TESTPATTERN="! /Round trip/"
61 compiler: ": #GHC 8.0.2"
67 FLAGS="fast embed_data_files"
68 CABALARGS="--enable-benchmarks"
69 TESTPATTERN="! /Round trip/"
70 compiler: ": #GHC 8.2.2"
76 FLAGS="fast embed_data_files"
77 CABALARGS="--enable-benchmarks"
78 TESTPATTERN="! /Round trip/"
79 compiler: ": #GHC 8.4.3"
85 FLAGS="fast embed_data_files"
86 CABALARGS="--enable-benchmarks --allow-newer=haddock-library:base"
87 TESTPATTERN="! /Round trip/"
88 compiler: ": #GHC 8.6.1"
90 # Build with the newest GHC and cabal-install. This is an accepted failure,
92 # - env: BUILD=cabal GHCVER=head CABALVER=head CABALAGS="--allow-newer"
93 # compiler: ": #GHC HEAD"
94 # addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
96 # The Stack builds. We can pass in arbitrary Stack arguments via the ARGS
97 # variable, such as using --stack-yaml to point to a different file.
98 # - env: BUILD=stack ARGS="--stack-yaml stack.lts9.yaml" FLAGS="fast embed_data_files"
99 # compiler: ": #stack 8.0.2"
100 # addons: {apt: {packages: [ghc-8.0.2], sources: [hvr-ghc]}}
104 ARGS="--resolver lts-12"
106 TESTPATTERN="! /Round trip/"
107 compiler: ": #stack 8.4.3"
109 # Nightly builds are allowed to fail
112 ARGS="--resolver nightly"
115 compiler: ": #stack nightly"
117 # - env: BUILD=stack ARGS="--resolver lts-8"
118 # compiler: ": #stack 8.0.2 osx"
121 # - env: BUILD=stack ARGS="--resolver nightly"
122 # compiler: ": #stack nightly osx"
126 - env: BUILD=cabal GHCVER=head CABALVER=head
129 ARGS="--resolver nightly"
134# Using compiler above sets CC to an invalid value, so unset it
136- sudo apt-get install ${GHCVER:+ghc-$GHCVER} ${CABALVER:+cabal-install-$CABALVER}
137- export PATH=/opt/happy/1.19.5/bin/:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:/opt/cabal/bin:$HOME/.local/bin:$HOME/.cabal/bin:$PATH
138# Download and unpack the stack executable
140 if [[ $BUILD == "stack" ]]; then
141 mkdir -p ~/.local/bin
142 if [ `uname` = "Darwin" ]
144 curl --insecure -L https://www.stackage.org/stack/osx-x86_64 |\
145 tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
147 curl -L https://www.stackage.org/stack/linux-x86_64 |\
148 tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
153- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
154- if [ -f configure.ac ]; then autoreconf -i; fi
159 stack config set system-ghc --global true
160 stack --no-terminal --install-ghc $ARGS build --only-dependencies --fast \
161 --flag 'pandoc:embed_data_files' --flag 'aeson:fast' --jobs 2
165 travis_retry cabal update
168 cabal install -v1 --disable-optimization --flags="$FLAGS" \
169 --enable-tests --force-reinstalls --reorder-goals \
170 --max-backjumps=-1 $CABALARGS
173 cabal install --disable-optimization --only-dependencies \
174 --flags="$FLAGS" --enable-tests --force-reinstalls \
175 --reorder-goals --max-backjumps=-1 $CABALARGS .
186 stack config set system-ghc --global true
187 stack --no-terminal $ARGS test --fast --flag 'aeson:fast' \
188 --flag pandoc:embed_data_files --haddock --no-haddock-deps \
189 --ghc-options="$GHC_OPTIONS" \
190 --test-arguments="--hide-successes --pattern \"$TESTPATTERN\""
193 cabal sdist --output-directory=sourcedist && \
195 cabal configure --disable-optimization --enable-tests -v2 \
196 --flags="$FLAGS" --ghc-options="$GHC_OPTIONS" $CABALARGS && \
197 cabal build -v2 -j2 && \
198 cabal test --test-options="--pattern=\"$TESTPATTERN\""
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list