1# Copy these contents into the root directory of your Github project in a file
4# Use new container infrastructure to enable caching
7# Choose a lightweight base image; we provide our own build tools.
10# Caching so the next build will be fast too.
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
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]}}
29 # We grab the appropriate GHC and cabal-install versions from hvr's PPA. See:
30 # https://github.com/hvr/multi-ghc-travis
31 - env: BUILD=cabal GHCVER=7.4.2 CABALVER=1.16
32 compiler: ": #GHC 7.4.2"
33 addons: {apt: {packages: [cabal-install-1.16,ghc-7.4.2], sources: [hvr-ghc]}}
34 - env: BUILD=cabal GHCVER=7.6.3 CABALVER=1.16
35 compiler: ": #GHC 7.6.3"
36 addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3], sources: [hvr-ghc]}}
37 - env: BUILD=cabal GHCVER=7.8.4 CABALVER=1.18
38 compiler: ": #GHC 7.8.4"
39 addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}}
40 - env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22
41 compiler: ": #GHC 7.10.3"
42 addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
44 # Build with the newest GHC and cabal-install. This is an accepted failure,
46 - env: BUILD=cabal GHCVER=head CABALVER=head
47 compiler: ": #GHC HEAD"
48 addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
50 # The Stack builds. We can pass in arbitrary Stack arguments via the ARGS
51 # variable, such as using --stack-yaml to point to a different file.
52 - env: BUILD=stack ARGS="--resolver lts-5"
53 compiler: ": #stack 7.10.3"
54 addons: {apt: {packages: [ghc-7.10.3], sources: [hvr-ghc]}}
56 # Nightly builds are allowed to fail
57 - env: BUILD=stack ARGS="--resolver nightly"
58 compiler: ": #stack nightly"
59 addons: {apt: {packages: [libgmp-dev]}}
61 - env: BUILD=stack ARGS="--resolver lts-5"
62 compiler: ": #stack 7.10.3 osx"
65 - env: BUILD=stack ARGS="--resolver nightly"
66 compiler: ": #stack nightly osx"
70 - env: BUILD=cabal GHCVER=head CABALVER=head
71 - env: BUILD=stack ARGS="--resolver nightly"
74# Using compiler above sets CC to an invalid value, so unset it
77# We want to always allow newer versions of packages when building on GHC HEAD
79- if [ "x$GHCVER" = "xhead" ]; then CABALARGS=--allow-newer; fi
81# Download and unpack the stack executable
82- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.local/bin:$PATH
83- mkdir -p ~/.local/bin
85 if [ `uname` = "Darwin" ]
87 curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
89 curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
93- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
94- if [ -f configure.ac ]; then autoreconf -i; fi
98 stack --no-terminal --install-ghc $ARGS test --only-dependencies
102 travis_retry cabal update
103 cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS
111 stack --no-terminal $ARGS test --haddock --no-haddock-deps --ghc-options="-Wall -fno-warn-unused-do-bind -Werror"
114 cabal configure --enable-tests --enable-benchmarks -v2 --ghc-options="-O0 -Werror"
116 cabal check || [ "$CABALVER" == "1.16" ]
119 # cabal sdist fails on cabal 1.16:
120 cabal sdist || [ "$CABALVER" == "1.16" ]
121 SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && \
122 (cd dist && cabal install --enable-tests --force-reinstalls "$SRC_TGZ" || \
123 [ "$CABALVER" == "1.16" ])
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