Skip to content

Commit

Permalink
update travis config to test more ghc versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ibotty committed Jun 12, 2015
1 parent c80ad31 commit 5c25dc9
Showing 1 changed file with 29 additions and 22 deletions.
51 changes: 29 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
---
# NB: don't set `language: haskell` here
# See https://github.com/hvr/multi-ghc-travis for more information

notifications:
email:
- [email protected]
on_success: never
on_failure: always

env:
- GHCVER=7.6.3
- GHCVER=7.8.2
- GHCVER=head
- CABALVER=1.16 GHCVER=7.6.3
- CABALVER=1.18 GHCVER=7.8.4
- CABALVER=1.22 GHCVER=7.10.1
- CABALVER=head GHCVER=head

matrix:
allow_failures:
- env: GHCVER=head
- env: CABALVER=head GHCVER=head

before_install:
- sudo add-apt-repository -y ppa:hvr/ghc
- sudo apt-get update
- sudo apt-get install cabal-install-1.18 ghc-$GHCVER
- export PATH=/opt/ghc/$GHCVER/bin:$PATH
- 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=/opt/ghc/$GHCVER/bin:$HOME/.cabal/bin:/opt/cabal/$CABALVER/bin:$PATH
- |
if [ $GHCVER = "head" ] || [ ${GHCVER%.*} = "7.8" ] || [ ${GHCVER%.*} = "7.10" ]; then
travis_retry sudo apt-get install happy-1.19.4 alex-3.1.3
export PATH=/opt/alex/3.1.3/bin:/opt/happy/1.19.4/bin:$PATH
else
travis_retry sudo apt-get install happy alex
fi
install:
- cabal-1.18 update
- cabal-1.18 install --only-dependencies --enable-tests

- cabal --version
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- travis_retry cabal update
- cabal install --only-dependencies --enable-tests --enable-benchmarks

script:
- cabal-1.18 configure --enable-tests -v2
- cabal-1.18 build
- cabal-1.18 test
- cabal-1.18 check
- cabal-1.18 sdist
- if [ -f configure.ac ]; then autoreconf -i; fi
- cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for deb ugging
- cabal build # this builds all libraries and executables (including tests/benchmarks)
- cabal test
- cabal check
- cabal sdist # tests that a source-distribution can be generated
- SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
(cd dist && cabal install --force-reinstalls "$SRC_TGZ")

0 comments on commit 5c25dc9

Please sign in to comment.