on master help sign in
Updated Travis config
b034be9Michael Snoyman
.travis.yml+42−17
@@ -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:
5+#
6+# https://docs.haskellstack.org/en/stable/travis_ci/
7+#
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
3
10
@@ -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]}}
49
59
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]}}
61
71
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]}}
65
75
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]}}
69
79
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]}}
83+
84+ - env: BUILD=stack ARGS="--resolver lts-7"
85+ compiler: ": #stack 8.0.1"
86+ addons: {apt: {packages: [libgmp-dev]}}
73
87
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]}}
78
92
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"
82 os: osx
96 os: osx
83
97
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
87
102
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"
90 os: osx
105 os: osx
91
106
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"
94 os: osx
109 os: osx
95
110
111+ - env: BUILD=stack ARGS="--resolver lts-7"
112+ compiler: ": #stack 8.0.1 osx"
113+ os: osx
114+
96 - env: BUILD=stack ARGS="--resolver nightly"
115 - env: BUILD=stack ARGS="--resolver nightly"
97 compiler: ": #stack nightly osx"
116 compiler: ": #stack nightly osx"
98 os: osx
117 os: osx
@@ -130,9 +149,6 @@ before_install:
130 echo 'jobs: $ncpus' >> $HOME/.cabal/config
149 echo 'jobs: $ncpus' >> $HOME/.cabal/config
131 fi
150 fi
132
151
133−# Get the list of packages from the stack.yaml file
134−- PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@')
135−
136install:
152install:
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:
140 set -ex
156 set -ex
141 case "$BUILD" in
157 case "$BUILD" in
142 stack)
158 stack)
143− stack --no-terminal --install-ghc $ARGS test --only-dependencies
159+ stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies
144 ;;
160 ;;
145 cabal)
161 cabal)
146 cabal --version
162 cabal --version
147 travis_retry cabal update
163 travis_retry cabal update
164+
165+ # Get the list of packages from the stack.yaml file
166+ PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@')
167+
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
149 ;;
169 ;;
150 esac
170 esac
@@ -155,7 +175,7 @@ script:
155 set -ex
175 set -ex
156 case "$BUILD" in
176 case "$BUILD" in
157 stack)
177 stack)
158− stack --no-terminal $ARGS test --haddock --no-haddock-deps
178+ stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps
159 ;;
179 ;;
160 cabal)
180 cabal)
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:
166 cd $dir
186 cd $dir
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
191+ cd dist
192+ tar zxfv "$SRC_TGZ"
193+ cd "$PKGVER"
194+ cabal configure --enable-tests
195+ cabal build
171 cd $ORIGDIR
196 cd $ORIGDIR
172 done
197 done
173 ;;
198 ;;