From d548af688ebb177a0fb659ec333a2e32d39b7b25 Mon Sep 17 00:00:00 2001 From: Sean Leather Date: Sat, 21 Mar 2015 13:49:10 +0200 Subject: [PATCH 1/2] FlexibleContexts required for GHC 7.10 --- System/IO/Pipeline.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/System/IO/Pipeline.hs b/System/IO/Pipeline.hs index ce2de75..e6de2a0 100644 --- a/System/IO/Pipeline.hs +++ b/System/IO/Pipeline.hs @@ -3,7 +3,7 @@ A pipeline closes itself when a read or write causes an error, so you can detect a broken pipeline by checking isClosed. It also closes itself when garbage collected, or you can close it explicitly. -} {-# LANGUAGE RecordWildCards, NamedFieldPuns, ScopedTypeVariables #-} -{-# LANGUAGE CPP #-} +{-# LANGUAGE CPP, FlexibleContexts #-} #if (__GLASGOW_HASKELL__ >= 706) {-# LANGUAGE RecursiveDo #-} From c332becbb3213635a24a38494f2b01e655e0f55a Mon Sep 17 00:00:00 2001 From: Sean Leather Date: Wed, 18 Mar 2015 16:54:12 +0200 Subject: [PATCH 2/2] Use hvr/multi-ghc-travis to test multiple platforms Note the comments regarding decisions to be made if you want to use various features of this .travis.yml carried over from the previous version. --- .travis.yml | 50 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1587db1..164ef2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,50 @@ -language: haskell +# See https://github.com/hvr/multi-ghc-travis for more information. services: - mongodb +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 + before_install: - - cabal sandbox init && cabal install hpc-coveralls + - 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 + +install: + - travis_retry cabal update + - cabal install --only-dependencies --enable-tests + - cabal install hpc-coveralls script: - - cabal configure --enable-tests --enable-library-coverage && cabal build - - .cabal-sandbox/bin/run-cabal-test --show-details=always - -after_script: - - .cabal-sandbox/bin/hpc-coveralls test --exclude-dir=test + - 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