2015-03-18 14:54:12 +00:00
|
|
|
# See https://github.com/hvr/multi-ghc-travis for more information.
|
2014-08-18 07:27:17 +00:00
|
|
|
|
2014-08-18 07:23:22 +00:00
|
|
|
services:
|
|
|
|
- mongodb
|
2014-08-18 07:27:17 +00:00
|
|
|
|
2015-03-18 14:54:12 +00:00
|
|
|
env:
|
|
|
|
# We use CABALVER=1.22 everywhere because it uses the flag --enable-coverage
|
|
|
|
# instead of --enable-library-coverage used by older versions.
|
|
|
|
- GHCVER=7.6.3 CABALVER=1.22
|
|
|
|
- GHCVER=7.8.4 CABALVER=1.22
|
|
|
|
- GHCVER=7.10.1 CABALVER=1.22
|
|
|
|
- GHCVER=head CABALVER=head
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
allow_failures:
|
|
|
|
# The text here should match the last line above exactly.
|
|
|
|
- env: GHCVER=head CABALVER=head
|
|
|
|
|
2014-08-18 07:27:17 +00:00
|
|
|
before_install:
|
2015-03-18 14:54:12 +00:00
|
|
|
- travis_retry sudo add-apt-repository -y ppa:hvr/ghc
|
|
|
|
- travis_retry sudo apt-get update
|
|
|
|
- travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER
|
|
|
|
- export PATH=$HOME/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
|
|
|
|
- cabal --version
|
2014-08-18 07:27:17 +00:00
|
|
|
|
2015-03-18 14:54:12 +00:00
|
|
|
install:
|
|
|
|
- travis_retry cabal update
|
2015-03-22 16:05:04 +00:00
|
|
|
# Install the combined dependencies for this package and all other packages
|
|
|
|
# needed to reduce conflicts.
|
2015-03-18 14:54:12 +00:00
|
|
|
- cabal install hpc-coveralls
|
2015-09-04 18:38:15 +00:00
|
|
|
- cabal sandbox init
|
|
|
|
- cabal install --only-dependencies --enable-tests . hpc-coveralls
|
2014-08-18 07:27:17 +00:00
|
|
|
|
2015-03-18 14:54:12 +00:00
|
|
|
script:
|
|
|
|
- cabal configure --enable-tests --enable-coverage -v2
|
|
|
|
- cabal build
|
|
|
|
# cabal test fails due a to hpc error. Using run-cabal-test instead.
|
|
|
|
# - cabal test --show-details=always
|
|
|
|
- run-cabal-test --show-details=always
|
|
|
|
# Ignoring the exit code here. Need to register with coveralls.io?
|
|
|
|
- hpc-coveralls --exclude-dir=test test || true
|
|
|
|
# Ignoring the exit code here. cabal check recommends against
|
|
|
|
# 'ghc-prof-options: -auto-all'.
|
|
|
|
- cabal check || true
|
|
|
|
- cabal sdist
|
|
|
|
- export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}');
|
|
|
|
cd dist/;
|
|
|
|
if [ -f "$SRC_TGZ" ]; then
|
|
|
|
cabal install "$SRC_TGZ";
|
|
|
|
else
|
|
|
|
echo "expected '$SRC_TGZ' not found";
|
|
|
|
exit 1;
|
|
|
|
fi
|