on master help sign in
Updated Travis config
commitb034be9474d75f4448c4c757aca69bb2d30c13b9 authorMichael Snoyman <michael@snoyman.com> dateSun 16 Oct 2016, 05:44 (10 years ago) parent4e3075b
1 file changed+42−17
.travis.yml+42−17
.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+#
18# Copy these contents into the root directory of your Github project in a file
29# named .travis.yml
310
@@ -46,6 +53,9 @@ matrix:
4653 - env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22 HAPPYVER=1.19.5 ALEXVER=3.1.7
4754 compiler: ": #GHC 7.10.3"
4855 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]}}
4959
5060 # Build with the newest GHC and cabal-install. This is an accepted failure,
5161 # see below.
@@ -57,42 +67,51 @@ matrix:
5767 # variable, such as using --stack-yaml to point to a different file.
5868 - env: BUILD=stack ARGS=""
5969 compiler: ": #stack default"
60− addons: {apt: {packages: [ghc-7.10.3], sources: [hvr-ghc]}}
70+ addons: {apt: {packages: [libgmp-dev]}}
6171
6272 - env: BUILD=stack ARGS="--resolver lts-2"
6373 compiler: ": #stack 7.8.4"
64− addons: {apt: {packages: [ghc-7.8.4], sources: [hvr-ghc]}}
74+ addons: {apt: {packages: [libgmp-dev]}}
6575
6676 - env: BUILD=stack ARGS="--resolver lts-3"
6777 compiler: ": #stack 7.10.2"
68− addons: {apt: {packages: [ghc-7.10.2], sources: [hvr-ghc]}}
78+ addons: {apt: {packages: [libgmp-dev]}}
6979
70− - env: BUILD=stack ARGS="--resolver lts-5"
80+ - env: BUILD=stack ARGS="--resolver lts-6"
7181 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]}}
7387
7488 # Nightly builds are allowed to fail
7589 - env: BUILD=stack ARGS="--resolver nightly"
7690 compiler: ": #stack nightly"
77− addons: {apt: {packages: [libgmp,libgmp-dev]}}
91+ addons: {apt: {packages: [libgmp-dev]}}
7892
7993 # Build on OS X in addition to Linux
8094 - env: BUILD=stack ARGS=""
8195 compiler: ": #stack default osx"
8296 os: osx
8397
84− - env: BUILD=stack ARGS="--resolver lts-2"
85− compiler: ": #stack 7.8.4 osx"
86− os: osx
98+ # Travis includes an OS X which is incompatible with GHC 7.8.4
99+ #- env: BUILD=stack ARGS="--resolver lts-2"
100+ # compiler: ": #stack 7.8.4 osx"
101+ # os: osx
87102
88103 - env: BUILD=stack ARGS="--resolver lts-3"
89104 compiler: ": #stack 7.10.2 osx"
90105 os: osx
91106
92− - env: BUILD=stack ARGS="--resolver lts-5"
107+ - env: BUILD=stack ARGS="--resolver lts-6"
93108 compiler: ": #stack 7.10.3 osx"
94109 os: osx
95110
111+ - env: BUILD=stack ARGS="--resolver lts-7"
112+ compiler: ": #stack 8.0.1 osx"
113+ os: osx
114+
96115 - env: BUILD=stack ARGS="--resolver nightly"
97116 compiler: ": #stack nightly osx"
98117 os: osx
@@ -130,9 +149,6 @@ before_install:
130149 echo 'jobs: $ncpus' >> $HOME/.cabal/config
131150 fi
132151
133−# Get the list of packages from the stack.yaml file
134−- PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@')
135−
136152install:
137153- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
138154- if [ -f configure.ac ]; then autoreconf -i; fi
@@ -140,11 +156,15 @@ install:
140156 set -ex
141157 case "$BUILD" in
142158 stack)
143− stack --no-terminal --install-ghc $ARGS test --only-dependencies
159+ stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies
144160 ;;
145161 cabal)
146162 cabal --version
147163 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+
148168 cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
149169 ;;
150170 esac
@@ -155,7 +175,7 @@ script:
155175 set -ex
156176 case "$BUILD" in
157177 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
159179 ;;
160180 cabal)
161181 cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
@@ -166,8 +186,13 @@ script:
166186 cd $dir
167187 cabal check || [ "$CABALVER" == "1.16" ]
168188 cabal sdist
169− SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && \
170− (cd dist && cabal install --force-reinstalls "$SRC_TGZ")
189+ PKGVER=$(cabal info . | awk '{print $2;exit}')
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
171196 cd $ORIGDIR
172197 done
173198 ;;