1
- # This file has been generated -- see https://github.com/hvr/multi-ghc-travis
1
+ # This file has been modified from generated version
2
+ # see https://github.com/hvr/multi-ghc-travis
2
3
language : c
3
4
sudo : false
4
5
@@ -8,6 +9,7 @@ notifications:
8
9
9
10
cache :
10
11
directories :
12
+ - $HOME/.stack
11
13
- $HOME/.cabsnap
12
14
- $HOME/.cabal/packages
13
15
@@ -17,75 +19,38 @@ before_cache:
17
19
18
20
matrix :
19
21
include :
20
- - env : CABALVER=1.16 GHCVER=7.4.2
22
+ - env : BUILD=cabal CABALVER=1.16 GHCVER=7.4.2
21
23
compiler : " : #GHC 7.4.2"
22
24
addons : {apt: {packages: [cabal-install-1.16,ghc-7.4.2], sources: [hvr-ghc]}}
23
- - env : CABALVER=1.16 GHCVER=7.6.3
25
+ - env : BUILD=cabal CABALVER=1.16 GHCVER=7.6.3
24
26
compiler : " : #GHC 7.6.3"
25
27
addons : {apt: {packages: [cabal-install-1.16,ghc-7.6.3], sources: [hvr-ghc]}}
26
- - env : CABALVER=1.18 GHCVER=7.8.4
28
+ - env : BUILD=cabal CABALVER=1.18 GHCVER=7.8.4
27
29
compiler : " : #GHC 7.8.4"
28
30
addons : {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}}
29
- - env : CABALVER=1.22 GHCVER=7.10.2
31
+ - env : BUILD=cabal CABALVER=1.22 GHCVER=7.10.2
30
32
compiler : " : #GHC 7.10.2"
31
33
addons : {apt: {packages: [cabal-install-1.22,ghc-7.10.2], sources: [hvr-ghc]}}
32
- - env : CABALVER=1.24 GHCVER=8.0.1
34
+ - env : BUILD=cabal CABALVER=1.24 GHCVER=8.0.1
33
35
compiler : " : #GHC 8.0.1"
34
36
addons : {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}}
37
+ - env : BUILD=stack CABALVER=1.22 GHCVER=7.10.3
38
+ compiler : " : #GHC 7.10.3"
39
+ addons : {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
35
40
36
41
before_install :
37
42
- unset CC
38
- - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
43
+ - export PATH=$HOME/.local/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
44
+ # Download and unpack the stack executable
45
+ - mkdir -p ~/.local/bin
46
+ - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
39
47
40
48
install :
41
- - cabal --version
42
- - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
43
- - if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];
44
- then
45
- zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >
46
- $HOME/.cabal/packages/hackage.haskell.org/00-index.tar;
47
- fi
48
- - travis_retry cabal update -v
49
- - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
50
- - cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v > installplan.txt
51
- - sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt
52
-
53
- # check whether current requested install-plan matches cached package-db snapshot
54
- - if diff -u installplan.txt $HOME/.cabsnap/installplan.txt;
55
- then
56
- echo "cabal build-cache HIT";
57
- rm -rfv .ghc;
58
- cp -a $HOME/.cabsnap/ghc $HOME/.ghc;
59
- cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/;
60
- else
61
- echo "cabal build-cache MISS";
62
- rm -rf $HOME/.cabsnap;
63
- mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
64
- cabal install --only-dependencies --enable-tests --enable-benchmarks;
65
- fi
66
-
67
- # snapshot package-db on cache miss
68
- - if [ ! -d $HOME/.cabsnap ];
69
- then
70
- echo "snapshotting package-db to build-cache";
71
- mkdir $HOME/.cabsnap;
72
- cp -a $HOME/.ghc $HOME/.cabsnap/ghc;
73
- cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;
74
- fi
49
+ - travis/install.sh
75
50
76
51
# Here starts the actual work to be performed for the package under test;
77
52
# any command which exits with a non-zero exit code causes the build to fail.
78
53
script :
79
- - if [ -f configure.ac ]; then autoreconf -i; fi
80
- - cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
81
- - cabal build # this builds all libraries and executables (including tests/benchmarks)
82
- - cabal test
83
- - cabal sdist # tests that a source-distribution can be generated
84
-
85
- # Check that the resulting source distribution can be built & installed.
86
- # If there are no other `.tar.gz` files in `dist`, this can be even simpler:
87
- # `cabal install --force-reinstalls dist/*-*.tar.gz`
88
- - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
89
- (cd dist && cabal install --force-reinstalls "$SRC_TGZ")
54
+ - travis/script.sh
90
55
91
56
# EOF
0 commit comments