on master help sign in
Travis update
commit48e8c33e06ace260c3b52260afe63cf7479dd298 authorMichael Snoyman <michael@snoyman.com> dateTue 18 Oct 2016, 10:51 (10 years ago) parent0f8ed25
1 file changed+46−17
.travis.yml+46−17
.travis.yml+46−17
@@ -1,3 +1,10 @@
1+# This is the complex Travis configuration, which is intended for use
2+# on open source libraries which need compatibility across multiple GHC
3+# versions, must work with cabal-install, and should be
4+# cross-platform. For more information and other options, see:
5+#
6+# https://docs.haskellstack.org/en/stable/travis_ci/
7+#
18# Copy these contents into the root directory of your Github project in a file
29# named .travis.yml
310
@@ -28,6 +35,15 @@ matrix:
2835 include:
2936 # We grab the appropriate GHC and cabal-install versions from hvr's PPA. See:
3037 # https://github.com/hvr/multi-ghc-travis
38+ #- env: BUILD=cabal GHCVER=7.0.4 CABALVER=1.16 HAPPYVER=1.19.5 ALEXVER=3.1.7
39+ # compiler: ": #GHC 7.0.4"
40+ # addons: {apt: {packages: [cabal-install-1.16,ghc-7.0.4,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
41+ #- env: BUILD=cabal GHCVER=7.2.2 CABALVER=1.16 HAPPYVER=1.19.5 ALEXVER=3.1.7
42+ # compiler: ": #GHC 7.2.2"
43+ # addons: {apt: {packages: [cabal-install-1.16,ghc-7.2.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
44+ #- env: BUILD=cabal GHCVER=7.4.2 CABALVER=1.16 HAPPYVER=1.19.5 ALEXVER=3.1.7
45+ # compiler: ": #GHC 7.4.2"
46+ # addons: {apt: {packages: [cabal-install-1.16,ghc-7.4.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
3147 - env: BUILD=cabal GHCVER=7.6.3 CABALVER=1.22 HAPPYVER=1.19.5 ALEXVER=3.1.7
3248 compiler: ": #GHC 7.6.3"
3349 addons: {apt: {packages: [libfcgi-dev,cabal-install-1.22,ghc-7.6.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
@@ -37,6 +53,9 @@ matrix:
3753 - env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22 HAPPYVER=1.19.5 ALEXVER=3.1.7
3854 compiler: ": #GHC 7.10.3"
3955 addons: {apt: {packages: [libfcgi-dev,cabal-install-1.22,ghc-7.10.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
56+ - env: BUILD=cabal GHCVER=8.0.1 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7
57+ compiler: ": #GHC 8.0.1"
58+ addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
4059
4160 # Build with the newest GHC and cabal-install. This is an accepted failure,
4261 # see below.
@@ -48,30 +67,35 @@ matrix:
4867 # variable, such as using --stack-yaml to point to a different file.
4968 - env: BUILD=stack ARGS=""
5069 compiler: ": #stack default"
51− addons: {apt: {packages: [libfcgi-dev,ghc-7.10.3], sources: [hvr-ghc]}}
70+ addons: {apt: {packages: [libfcgi-dev,libgmp-dev]}}
5271
5372 #- env: BUILD=stack ARGS="--resolver lts-2"
5473 # compiler: ": #stack 7.8.4"
55− # addons: {apt: {packages: [libfcgi-dev,ghc-7.8.4], sources: [hvr-ghc]}}
74+ # addons: {apt: {packages: [libfcgi-dev,libgmp-dev]}}
5675
5776 - env: BUILD=stack ARGS="--resolver lts-3"
5877 compiler: ": #stack 7.10.2"
59− addons: {apt: {packages: [libfcgi-dev,ghc-7.10.2], sources: [hvr-ghc]}}
78+ addons: {apt: {packages: [libfcgi-dev,libgmp-dev]}}
6079
61− - env: BUILD=stack ARGS="--resolver lts-5"
80+ - env: BUILD=stack ARGS="--resolver lts-6"
6281 compiler: ": #stack 7.10.3"
63− addons: {apt: {packages: [libfcgi-dev,ghc-7.10.3], sources: [hvr-ghc]}}
82+ addons: {apt: {packages: [libfcgi-dev,libgmp-dev]}}
83+
84+ - env: BUILD=stack ARGS="--resolver lts-7"
85+ compiler: ": #stack 8.0.1"
86+ addons: {apt: {packages: [libfcgi-dev,libgmp-dev]}}
6487
6588 # Nightly builds are allowed to fail
6689 - env: BUILD=stack ARGS="--resolver nightly"
6790 compiler: ": #stack nightly"
68− addons: {apt: {packages: [libfcgi-dev,libgmp,libgmp-dev]}}
91+ addons: {apt: {packages: [libfcgi-dev,libgmp-dev]}}
6992
7093 # Build on OS X in addition to Linux
7194 - env: BUILD=stack ARGS=""
7295 compiler: ": #stack default osx"
7396 os: osx
7497
98+ # Travis includes an OS X which is incompatible with GHC 7.8.4
7599 #- env: BUILD=stack ARGS="--resolver lts-2"
76100 # compiler: ": #stack 7.8.4 osx"
77101 # os: osx
@@ -80,10 +104,14 @@ matrix:
80104 compiler: ": #stack 7.10.2 osx"
81105 os: osx
82106
83− - env: BUILD=stack ARGS="--resolver lts-5"
107+ - env: BUILD=stack ARGS="--resolver lts-6"
84108 compiler: ": #stack 7.10.3 osx"
85109 os: osx
86110
111+ - env: BUILD=stack ARGS="--resolver lts-7"
112+ compiler: ": #stack 8.0.1 osx"
113+ os: osx
114+
87115 - env: BUILD=stack ARGS="--resolver nightly"
88116 compiler: ": #stack nightly osx"
89117 os: osx
@@ -128,9 +156,6 @@ before_install:
128156 echo 'jobs: $ncpus' >> $HOME/.cabal/config
129157 fi
130158
131−# Get the list of packages from the stack.yaml file
132−- PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@')
133−
134159install:
135160- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
136161- if [ -f configure.ac ]; then autoreconf -i; fi
@@ -138,12 +163,15 @@ install:
138163 set -ex
139164 case "$BUILD" in
140165 stack)
141− stack --no-terminal --install-ghc $ARGS test --only-dependencies
166+ stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies
142167 ;;
143168 cabal)
144169 cabal --version
145170 travis_retry cabal update
146171
172+ # Get the list of packages from the stack.yaml file
173+ PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@')
174+
147175 # Due to dependency on wai-logger (which depends on some packages here),
148176 # we can't build just dependencies
149177 #
@@ -158,10 +186,10 @@ script:
158186 set -ex
159187 case "$BUILD" in
160188 stack)
161− stack --no-terminal $ARGS test --haddock --no-haddock-deps
189+ stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps
162190 ;;
163191 cabal)
164− cabal install --enable-tests --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
192+ cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
165193
166194 ORIGDIR=$(pwd)
167195 for dir in $PACKAGES
@@ -169,10 +197,11 @@ script:
169197 cd $dir
170198 cabal check || [ "$CABALVER" == "1.16" ]
171199 cabal sdist
172− NAMEVER=$(cabal info . | awk '{print $2;exit}')
173− SRC_TGZ=dist/$NAMEVER.tar.gz
174− tar zxf $SRC_TGZ
175− cd $NAMEVER
200+ PKGVER=$(cabal info . | awk '{print $2;exit}')
201+ SRC_TGZ=$PKGVER.tar.gz
202+ cd dist
203+ tar zxfv "$SRC_TGZ"
204+ cd "$PKGVER"
176205 cabal configure --enable-tests
177206 cabal build
178207 cd $ORIGDIR