1+ language : c
12sudo : false
2- env :
3- - GHCVER=7.8.4 COVERAGE_SUITE=tests
4- - GHCVER=7.8.4 COVERAGE_SUITE=psci-tests
5- - GHCVER=7.6.3
6- - GHCVER=7.10.1
7- - GHCVER=7.8.4 STACKAGE=lts-2.22
8- # 7.10.2 Pending https://github.com/travis-ci/apt-package-whitelist/pull/686
9- - GHCVER=7.10.1 STACKAGE=lts-3.1
10- - GHCVER=7.10.1 STACKAGE=nightly-2015-08-12
3+ matrix :
4+ include :
5+ - env : GHCVER=7.8.4 COVERAGE_SUITE=tests
6+ compiler : " : #GHC 7.8.4 - tests"
7+ # ^ HACK before https://github.com/travis-ci/travis-ci/issues/4393 is resolved
8+ addons : {apt: {packages: [cabal-install-1.22,ghc-7.8.4,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
9+ - env : GHCVER=7.8.4 COVERAGE_SUITE=psci-tests
10+ compiler : " : #GHC 7.8.4 - psci-tests"
11+ addons : {apt: {packages: [cabal-install-1.22,ghc-7.8.4,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
12+ - env : GHCVER=7.8.4 STACKAGE=lts-22
13+ compiler : " : #GHC 7.8.4 - lts-2.22"
14+ addons : {apt: {packages: [cabal-install-1.22,ghc-7.8.4,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
15+ - env : GHCVER=7.6.3
16+ compiler : " : #GHC 7.6.3"
17+ addons : {apt: {packages: [cabal-install-1.22,ghc-7.6.3,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
18+ - env : GHCVER=7.10.1
19+ compiler : " : #GHC 7.10.1"
20+ addons : {apt: {packages: [cabal-install-1.22,ghc-7.10.1,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
21+ # 7.10.2 Pending https://github.com/travis-ci/apt-package-whitelist/pull/686
22+ - env : GHCVER=7.10.1 STACKAGE=lts=3.1 RUNSDISTTESTS=YES
23+ compiler : " : #GHC 7.10.1 lts-3.1"
24+ addons : {apt: {packages: [cabal-install-1.22,ghc-7.10.1,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
25+ - env : GHCVER=7.10.1 STACKAGE=nightly-2015-08-12
26+ compiler : " : #GHC 7.10.1 nightly-2015-08-12"
27+ addons : {apt: {packages: [cabal-install-1.22,ghc-7.10.1,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
1128before_install :
29+ - unset CC
1230 - export PATH="/opt/ghc/$GHCVER/bin:$PATH"
1331 - export PATH="/opt/cabal/1.22/bin:$PATH"
1432 - export PATH="$HOME/.cabal/bin:$PATH"
@@ -23,13 +41,20 @@ install:
2341 # cabal and ghc tries to use them all. Which is bad idea on a shared box.
2442 # See also: https://ghc.haskell.org/trac/ghc/ticket/9221
2543 - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
26- - mkdir -p sandboxes/$GHCVER/${STACKAGE:-none}
27- - cabal sandbox init --sandbox sandboxes/$GHCVER/${STACKAGE:-none}
28- # Download stackage cabal.config
29- # Not sure whether filtering out purescript is necessary
44+ # Cache sandboxes in ~/cabal-sandboxes
45+ # Move right sandbox to .cabal-sandbox if exists
46+ - if [ -d ~/cabal-sandboxes/$GHCVER-${STACKAGE:-none} ]; then
47+ mv ~/cabal-sandboxes/$GHCVER-${STACKAGE:-none} .cabal-sandbox;
48+ fi
49+ - mkdir -p .cabal-sandbox
50+ - cabal sandbox init --sandbox .cabal-sandbox
51+ # Download stackage cabal.config, not sure whether filtering is necessary
3052 - if [ -n "$STACKAGE" ]; then curl http://www.stackage.org/$STACKAGE/cabal.config | grep -v purescript > cabal.config; fi
3153 - cabal install --only-dependencies --enable-tests
3254 - cabal install hpc-coveralls
55+ # Snapshot state of the sandbox now, so we don't need to make new one for test install
56+ - rm -rf ~/cabal-sandboxes/$GHCVER-${STACKAGE:-none}
57+ - cp -r .cabal-sandbox ~/cabal-sandboxes/$GHCVER-${STACKAGE:-none}
3358script :
3459 - ./travis/configure.sh
3560 - cabal build
@@ -50,18 +75,6 @@ deploy:
5075 on :
5176 all_branches : true
5277 tags : true
53- addons :
54- apt :
55- sources :
56- - hvr-ghc
57- packages :
58- - cabal-install-1.22
59- - ghc-7.6.3
60- - ghc-7.8.4
61- - ghc-7.10.1
62- - happy-1.19.5
63- - alex-3.1.4
6478cache :
6579 directories :
66- - sandboxes/
67- - ../install-test/sandboxes/
80+ - ~/cabal-sandboxes
0 commit comments