Skip to content

Commit 032b779

Browse files
committed
Make sure Travis-CI actually tests older versions of GHC+containers
Currently it brings in the newest version of containers all the time, which doesn't occur if anything actually depends upon fgl, causing real world breakage like in #69.
1 parent e295037 commit 032b779

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.travis.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@ before_cache:
1111
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
1212
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar
1313

14+
env:
15+
global:
16+
- CONF=""
17+
1418
matrix:
15-
fast_finish: true
1619
include:
17-
- env: CABALVER=1.16 GHCVER=7.0.4
20+
- env: CABALVER=1.16 GHCVER=7.0.4 CONF="-f -containers042"
1821
compiler: ": #GHC 7.0.4"
1922
addons: {apt: {packages: [cabal-install-1.16,ghc-7.0.4], sources: [hvr-ghc]}}
20-
- env: CABALVER=1.16 GHCVER=7.2.2
23+
- env: CABALVER=1.16 GHCVER=7.2.2 CONF="-f -containers042"
2124
compiler: ": #GHC 7.2.2"
2225
addons: {apt: {packages: [cabal-install-1.16,ghc-7.2.2], sources: [hvr-ghc]}}
2326
- env: CABALVER=1.16 GHCVER=7.4.2
@@ -56,11 +59,11 @@ install:
5659
fi
5760
- travis_retry cabal update -v
5861
- sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
59-
- cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v > installplan.txt
62+
- cabal install --only-dependencies --enable-tests --enable-benchmarks $CONF --dry -v > installplan.txt
6063
- sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt
6164

6265
# check whether current requested install-plan matches cached package-db snapshot
63-
- if diff -u installplan.txt $HOME/.cabsnap/installplan.txt;
66+
- if diff -u $HOME/.cabsnap/installplan.txt installplan.txt;
6467
then
6568
echo "cabal build-cache HIT";
6669
rm -rfv .ghc;
@@ -86,7 +89,7 @@ install:
8689
# any command which exits with a non-zero exit code causes the build to fail.
8790
script:
8891
- if [ -f configure.ac ]; then autoreconf -i; fi
89-
- cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
92+
- cabal configure --enable-tests --enable-benchmarks -v2 $CONF # -v2 provides useful information for debugging
9093
- cabal build # this builds all libraries and executables (including tests/benchmarks)
9194
- cabal test
9295
- cabal check
@@ -96,7 +99,7 @@ script:
9699
# If there are no other `.tar.gz` files in `dist`, this can be even simpler:
97100
# `cabal install --force-reinstalls dist/*-*.tar.gz`
98101
- SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
99-
(cd dist && cabal install --force-reinstalls "$SRC_TGZ")
102+
(cd dist && cabal install --force-reinstalls $CONF "$SRC_TGZ")
100103

101104
# Check the fgl-arbitrary sub-package
102105
- cd fgl-arbitrary
@@ -110,5 +113,4 @@ script:
110113
- SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
111114
(cd dist && cabal install --force-reinstalls "$SRC_TGZ")
112115

113-
114116
# EOF

0 commit comments

Comments
 (0)