@@ -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:
6+# https://docs.haskellstack.org/en/stable/travis_ci/
1# Copy these contents into the root directory of your Github project in a file
8# Copy these contents into the root directory of your Github project in a file
2# named .travis.yml
9# named .travis.yml
@@ -46,6 +53,9 @@ matrix:
46 - env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22 HAPPYVER=1.19.5 ALEXVER=3.1.7
53 - env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22 HAPPYVER=1.19.5 ALEXVER=3.1.7
47 compiler: ": #GHC 7.10.3"
54 compiler: ": #GHC 7.10.3"
48 addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
55 addons: {apt: {packages: [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]}}
50 # Build with the newest GHC and cabal-install. This is an accepted failure,
60 # Build with the newest GHC and cabal-install. This is an accepted failure,
51 # see below.
61 # see below.
@@ -57,42 +67,51 @@ matrix:
57 # variable, such as using --stack-yaml to point to a different file.
67 # variable, such as using --stack-yaml to point to a different file.
58 - env: BUILD=stack ARGS=""
68 - env: BUILD=stack ARGS=""
59 compiler: ": #stack default"
69 compiler: ": #stack default"
60− addons: {apt: {packages: [ghc-7.10.3], sources: [hvr-ghc]}}
70+ addons: {apt: {packages: [libgmp-dev]}}
62 - env: BUILD=stack ARGS="--resolver lts-2"
72 - env: BUILD=stack ARGS="--resolver lts-2"
63 compiler: ": #stack 7.8.4"
73 compiler: ": #stack 7.8.4"
64− addons: {apt: {packages: [ghc-7.8.4], sources: [hvr-ghc]}}
74+ addons: {apt: {packages: [libgmp-dev]}}
66 - env: BUILD=stack ARGS="--resolver lts-3"
76 - env: BUILD=stack ARGS="--resolver lts-3"
67 compiler: ": #stack 7.10.2"
77 compiler: ": #stack 7.10.2"
68− addons: {apt: {packages: [ghc-7.10.2], sources: [hvr-ghc]}}
78+ addons: {apt: {packages: [libgmp-dev]}}
70− - env: BUILD=stack ARGS="--resolver lts-5"
80+ - env: BUILD=stack ARGS="--resolver lts-6"
71 compiler: ": #stack 7.10.3"
81 compiler: ": #stack 7.10.3"
72− addons: {apt: {packages: [ghc-7.10.3], sources: [hvr-ghc]}}
82+ addons: {apt: {packages: [libgmp-dev]}}
84+ - env: BUILD=stack ARGS="--resolver lts-7"
85+ compiler: ": #stack 8.0.1"
86+ addons: {apt: {packages: [libgmp-dev]}}
74 # Nightly builds are allowed to fail
88 # Nightly builds are allowed to fail
75 - env: BUILD=stack ARGS="--resolver nightly"
89 - env: BUILD=stack ARGS="--resolver nightly"
76 compiler: ": #stack nightly"
90 compiler: ": #stack nightly"
77− addons: {apt: {packages: [libgmp,libgmp-dev]}}
91+ addons: {apt: {packages: [libgmp-dev]}}
79 # Build on OS X in addition to Linux
93 # Build on OS X in addition to Linux
80 - env: BUILD=stack ARGS=""
94 - env: BUILD=stack ARGS=""
81 compiler: ": #stack default osx"
95 compiler: ": #stack default osx"
98+ # Travis includes an OS X which is incompatible with GHC 7.8.4
84− - env: BUILD=stack ARGS="--resolver lts-2"
99+ #- env: BUILD=stack ARGS="--resolver lts-2"
85− compiler: ": #stack 7.8.4 osx"
100+ # compiler: ": #stack 7.8.4 osx"
86− os: osx
101+ # os: osx
88 - env: BUILD=stack ARGS="--resolver lts-3"
103 - env: BUILD=stack ARGS="--resolver lts-3"
89 compiler: ": #stack 7.10.2 osx"
104 compiler: ": #stack 7.10.2 osx"
92− - env: BUILD=stack ARGS="--resolver lts-5"
107+ - env: BUILD=stack ARGS="--resolver lts-6"
93 compiler: ": #stack 7.10.3 osx"
108 compiler: ": #stack 7.10.3 osx"
111+ - env: BUILD=stack ARGS="--resolver lts-7"
112+ compiler: ": #stack 8.0.1 osx"
96 - env: BUILD=stack ARGS="--resolver nightly"
115 - env: BUILD=stack ARGS="--resolver nightly"
97 compiler: ": #stack nightly osx"
116 compiler: ": #stack nightly osx"
@@ -130,9 +149,6 @@ before_install:
130 echo 'jobs: $ncpus' >> $HOME/.cabal/config
149 echo 'jobs: $ncpus' >> $HOME/.cabal/config
133−# Get the list of packages from the stack.yaml file
134−- PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@')
137- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
153- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
138- if [ -f configure.ac ]; then autoreconf -i; fi
154- if [ -f configure.ac ]; then autoreconf -i; fi
@@ -140,11 +156,15 @@ install:
141 case "$BUILD" in
157 case "$BUILD" in
143− stack --no-terminal --install-ghc $ARGS test --only-dependencies
159+ stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies
146 cabal --version
162 cabal --version
147 travis_retry cabal update
163 travis_retry cabal update
165+ # Get the list of packages from the stack.yaml file
166+ PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@')
148 cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
168 cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
@@ -155,7 +175,7 @@ script:
156 case "$BUILD" in
176 case "$BUILD" in
158− stack --no-terminal $ARGS test --haddock --no-haddock-deps
178+ stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps
161 cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
181 cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
@@ -166,8 +186,13 @@ script:
167 cabal check || [ "$CABALVER" == "1.16" ]
187 cabal check || [ "$CABALVER" == "1.16" ]
168 cabal sdist
188 cabal sdist
169− SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && \
189+ PKGVER=$(cabal info . | awk '{print $2;exit}')
170− (cd dist && cabal install --force-reinstalls "$SRC_TGZ")
190+ SRC_TGZ=$PKGVER.tar.gz
194+ cabal configure --enable-tests
171 cd $ORIGDIR
196 cd $ORIGDIR