aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-06-18 06:30:37 +0200
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-06-18 06:58:54 +0200
commitfcad1df036670eeecbc78129e166d9026a062a0c (patch)
tree1c356ab0702a39cfdc9cd633eb7ca55de1e74799
parentab33b488f4d0559bf4b36287a86e4976602279be (diff)
Use Travis with multiple GHC versions
When using HEAD, we build haddock-library directly from repository as a dependency (and thanks to --enable-tests, the tests get ran anyway). In all other cases, we manually run the tests on haddock-library only and don't test the main project.
-rw-r--r--.travis.yml30
1 files changed, 28 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index 21190728..ab626be9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,33 @@
language: haskell
+env:
+ - GHCVER=7.6.3
+ - GHCVER=7.8.1
+ - GHCVER=7.8.2
+ - GHCVER=7.8.3
+ - GHCVER=head
+
+before_install:
+ - sudo add-apt-repository -y ppa:hvr/ghc
+ - sudo apt-get update
+ - sudo apt-get install cabal-install-1.20 ghc-$GHCVER
+ - export PATH=/opt/ghc/$GHCVER/bin:$PATH
+
install:
- - (cd haddock-library/ && cabal install --only-dependencies --enable-tests)
+ - case "$GHCVER" in
+ "head") (cd haddock-library/ && cabal install --enable-tests
+ && cd .. && cabal install --only-dependencies --enable-tests) ;;
+ *)
+ (cd haddock-library/ && cabal install --only-dependencies --enable-tests && cd ..) ;;
+
+ esac
script:
- - (cd haddock-library/ && cabal configure --enable-tests --ghc-options=-Werror && cabal build && cabal test)
+ # Yes, in case of HEAD we do end up building haddock-library twice
+ # but we want to see the test results.
+ - (cd haddock-library/ && cabal configure --enable-tests --ghc-options=-Werror
+ && cabal build && cabal test && cabal install && cd ..)
+ - case "$GHCVER" in
+ "head") (cabal configure --enable-tests --ghc-options=-Werror && cabal build && cabal test) ;;
+ *) ;;
+ esac \ No newline at end of file