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.6.3 CABALVER=1.16 HAPPYVER=1.19.5 ALEXVER=3.1.7
32 compiler: ": #GHC 7.6.3"
33 addons: {apt: {packages: [libfcgi-dev,cabal-install-1.16,ghc-7.6.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
34 - env: BUILD=cabal GHCVER=7.8.4 CABALVER=1.18 HAPPYVER=1.19.5 ALEXVER=3.1.7
35 compiler: ": #GHC 7.8.4"
36 addons: {apt: {packages: [libfcgi-dev,cabal-install-1.18,ghc-7.8.4,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
37 - env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22 HAPPYVER=1.19.5 ALEXVER=3.1.7
38 compiler: ": #GHC 7.10.3"
39 addons: {apt: {packages: [libfcgi-dev,cabal-install-1.22,ghc-7.10.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
41 # Build with the newest GHC and cabal-install. This is an accepted failure,
43 - env: BUILD=cabal GHCVER=head CABALVER=head HAPPYVER=1.19.5 ALEXVER=3.1.7
44 compiler: ": #GHC HEAD"
45 addons: {apt: {packages: [libfcgi-dev,cabal-install-head,ghc-head,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
47 # The Stack builds. We can pass in arbitrary Stack arguments via the ARGS
48 # variable, such as using --stack-yaml to point to a different file.
49 - env: BUILD=stack ARGS=""
50 compiler: ": #stack default"
51 addons: {apt: {packages: [libfcgi-dev,ghc-7.10.3], sources: [hvr-ghc]}}
53 #- env: BUILD=stack ARGS="--resolver lts-2"
54 # compiler: ": #stack 7.8.4"
55 # addons: {apt: {packages: [libfcgi-dev,ghc-7.8.4], sources: [hvr-ghc]}}
57 - env: BUILD=stack ARGS="--resolver lts-3"
58 compiler: ": #stack 7.10.2"
59 addons: {apt: {packages: [libfcgi-dev,ghc-7.10.2], sources: [hvr-ghc]}}
61 - env: BUILD=stack ARGS="--resolver lts-5"
62 compiler: ": #stack 7.10.3"
63 addons: {apt: {packages: [libfcgi-dev,ghc-7.10.3], sources: [hvr-ghc]}}
65 # Nightly builds are allowed to fail
66 - env: BUILD=stack ARGS="--resolver nightly"
67 compiler: ": #stack nightly"
68 addons: {apt: {packages: [libfcgi-dev,libgmp,libgmp-dev]}}
70 # Build on OS X in addition to Linux
71 - env: BUILD=stack ARGS=""
72 compiler: ": #stack default osx"
75 #- env: BUILD=stack ARGS="--resolver lts-2"
76 # compiler: ": #stack 7.8.4 osx"
79 - env: BUILD=stack ARGS="--resolver lts-3"
80 compiler: ": #stack 7.10.2 osx"
83 - env: BUILD=stack ARGS="--resolver lts-5"
84 compiler: ": #stack 7.10.3 osx"
87 - env: BUILD=stack ARGS="--resolver nightly"
88 compiler: ": #stack nightly osx"
92 - env: BUILD=cabal GHCVER=head CABALVER=head HAPPYVER=1.19.5 ALEXVER=3.1.7
93 - env: BUILD=stack ARGS="--resolver nightly"
96# Using compiler above sets CC to an invalid value, so unset it
99# We want to always allow newer versions of packages when building on GHC HEAD
101- if [ "x$GHCVER" = "xhead" ]; then CABALARGS=--allow-newer; fi
103# Download and unpack the stack executable
104- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.local/bin:/opt/alex/$ALEXVER/bin:/opt/happy/$HAPPYVER/bin:$HOME/.cabal/bin:$PATH
105- mkdir -p ~/.local/bin
107 if [ `uname` = "Darwin" ]
109 travis_retry curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
111 # brew no longer has fcgi
113 grep -v wai-handler-fastcgi < stack.yaml > tmp
116 travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
119 # Use the more reliable S3 mirror of Hackage
120 mkdir -p $HOME/.cabal
121 echo 'remote-repo: hackage.haskell.org:http://hackage.fpcomplete.com/' > $HOME/.cabal/config
122 echo 'remote-repo-cache: $HOME/.cabal/packages' >> $HOME/.cabal/config
124 if [ "$CABALVER" != "1.16" ]
126 echo 'jobs: $ncpus' >> $HOME/.cabal/config
129# Get the list of packages from the stack.yaml file
130- PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@')
133- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
134- if [ -f configure.ac ]; then autoreconf -i; fi
139 stack --no-terminal --install-ghc $ARGS test --only-dependencies
143 travis_retry cabal update
145 # Due to dependency on wai-logger (which depends on some packages here),
146 # we can't build just dependencies
148 # cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
149 cabal install hspec-discover
159 stack --no-terminal $ARGS test --haddock --no-haddock-deps
162 cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
168 cabal check || [ "$CABALVER" == "1.16" ]
170 NAMEVER=$(cabal info . | awk '{print $2;exit}')
171 SRC_TGZ=dist/$NAMEVER.tar.gz
174 cabal configure --enable-tests
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