@@ -20,6 +20,7 @@ cache:
2020 - $HOME/.ghc
2121 - $HOME/.cabal
2222 - $HOME/.stack
23+ - $TRAVIS_BUILD_DIR/.stack-work
2324
2425# The different configurations we want to test. We have BUILD=cabal which uses
2526# cabal-install, and BUILD=stack which uses Stack. More documentation on each
@@ -56,9 +57,12 @@ matrix:
5657 - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7
5758 compiler: ": #GHC 8.0.2"
5859 addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
59− - env: BUILD=cabal GHCVER=8.2.1 CABALVER=2.0
60− compiler: ": #GHC 8.2.1"
61− addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.1], sources: [hvr-ghc]}}
60+ - env: BUILD=cabal GHCVER=8.2.2 CABALVER=2.0 HAPPYVER=1.19.5 ALEXVER=3.1.7
61+ compiler: ": #GHC 8.2.2"
62+ addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
63+ - env: BUILD=cabal GHCVER=8.4.3 CABALVER=2.2 HAPPYVER=1.19.5 ALEXVER=3.1.7
64+ compiler: ": #GHC 8.4.3"
65+ addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
6266
6367 # Build with the newest GHC and cabal-install. This is an accepted failure,
6468 # see below.
@@ -92,6 +96,10 @@ matrix:
9296 compiler: ": #stack 8.0.2"
9397 addons: {apt: {packages: [libgmp-dev]}}
9498
99+ - env: BUILD=stack ARGS="--resolver lts-11"
100+ compiler: ": #stack 8.2.2"
101+ addons: {apt: {packages: [libgmp-dev]}}
102+
95103 # Nightly builds are allowed to fail
96104 - env: BUILD=stack ARGS="--resolver nightly"
97105 compiler: ": #stack nightly"
@@ -123,6 +131,10 @@ matrix:
123131 compiler: ": #stack 8.0.2 osx"
124132 os: osx
125133
134+ - env: BUILD=stack ARGS="--resolver lts-11"
135+ compiler: ": #stack 8.2.2 osx"
136+ os: osx
137+
126138 - env: BUILD=stack ARGS="--resolver nightly"
127139 compiler: ": #stack nightly osx"
128140 os: osx
@@ -145,9 +157,9 @@ before_install:
145157- |
146158 if [ `uname` = "Darwin" ]
147159 then
148− travis_retry curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
160+ travis_retry curl --insecure -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
149161 else
150− travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
162+ travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
151163 fi
152164
153165 # Use the more reliable S3 mirror of Hackage
@@ -155,10 +167,6 @@ before_install:
155167 echo 'remote-repo: hackage.haskell.org:http://hackage.fpcomplete.com/' > $HOME/.cabal/config
156168 echo 'remote-repo-cache: $HOME/.cabal/packages' >> $HOME/.cabal/config
157169
158− if [ "$CABALVER" != "1.16" ]
159− then
160− echo 'jobs: $ncpus' >> $HOME/.cabal/config
161− fi
162170
163171install:
164172- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
@@ -167,13 +175,16 @@ install:
167175 set -ex
168176 case "$BUILD" in
169177 stack)
178+ # Build the dependencies
170179 stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies
171180 ;;
172181 cabal)
173182 cabal --version
174183 travis_retry cabal update
175184
176− # Get the list of packages from the stack.yaml file
185+ # Get the list of packages from the stack.yaml file. Note that
186+ # this will also implicitly run hpack as necessary to generate
187+ # the .cabal files needed by cabal-install.
177188 PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@')
178189
179190 cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
@@ -202,9 +213,13 @@ script:
202213 cd dist
203214 tar zxfv "$SRC_TGZ"
204215 cd "$PKGVER"
205− cabal configure --enable-tests
216+ cabal configure --enable-tests --ghc-options -O0
206217 cabal build
207− cabal test
218+ if [ "$CABALVER" = "1.16" ] || [ "$CABALVER" = "1.18" ]; then
219+ cabal test
220+ else
221+ cabal test --show-details=streaming --log=/dev/stdout
222+ fi
208223 cd $ORIGDIR
209224 done
210225 ;;