Adds multi GHC travis builds.
parent
231fad8ca2
commit
c992f75b3f
65
.travis.yml
65
.travis.yml
|
@ -1,16 +1,59 @@
|
||||||
language: haskell
|
language: haskell
|
||||||
ghc: 7.8
|
|
||||||
|
env:
|
||||||
|
- CABALVER=1.18 GHCVER=7.6.3
|
||||||
|
- CABALVER=1.18 GHCVER=7.8.4
|
||||||
|
- CABALVER=1.22 GHCVER=7.10.2
|
||||||
|
- CABALVER=head GHCVER=head
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
allow_failures:
|
||||||
|
- env: GHCVER=head
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- "cabal sandbox init"
|
- |
|
||||||
- "cd hask-irc-core"
|
if [ $GHCVER = `ghc --numeric-version` ]; then
|
||||||
- "cabal sandbox init --sandbox=../.cabal-sandbox"
|
travis/cabal-apt-install --enable-tests $MODE
|
||||||
- "cd ../hask-irc-handlers"
|
export CABAL=cabal
|
||||||
- "cabal sandbox init --sandbox=../.cabal-sandbox"
|
else
|
||||||
- "cabal sandbox add-source ../hask-irc-core/"
|
# Install the GHC we want from hvr's PPA
|
||||||
- "cd ../hask-irc-runner"
|
travis_retry sudo add-apt-repository -y ppa:hvr/ghc
|
||||||
- "cabal sandbox init --sandbox=../.cabal-sandbox"
|
travis_retry sudo apt-get update
|
||||||
- "cabal sandbox add-source ../hask-irc-core/"
|
travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER
|
||||||
- "cabal sandbox add-source ../hask-irc-handlers/"
|
export CABAL=cabal-$CABALVER
|
||||||
|
export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
|
||||||
|
fi
|
||||||
|
- $CABAL update
|
||||||
|
- $CABAL sandbox init
|
||||||
|
- cd hask-irc-core
|
||||||
|
- $CABAL sandbox init --sandbox=../.cabal-sandbox
|
||||||
|
- cd ../hask-irc-handlers
|
||||||
|
- $CABAL sandbox init --sandbox=../.cabal-sandbox
|
||||||
|
- $CABAL sandbox add-source ../hask-irc-core/
|
||||||
|
- cd ../hask-irc-runner
|
||||||
|
- $CABAL sandbox init --sandbox=../.cabal-sandbox
|
||||||
|
- $CABAL sandbox add-source ../hask-irc-core/
|
||||||
|
- $CABAL sandbox add-source ../hask-irc-handlers/
|
||||||
|
|
||||||
|
install:
|
||||||
|
- $CABAL install --dependencies-only
|
||||||
|
|
||||||
|
script:
|
||||||
|
- $CABAL build
|
||||||
|
|
||||||
|
# tests that a source-distribution can be generated
|
||||||
|
- cabal sdist
|
||||||
|
|
||||||
|
# check that the generated source-distribution can be built & installed
|
||||||
|
- export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
|
||||||
|
cd dist/;
|
||||||
|
if [ -f "$SRC_TGZ" ]; then
|
||||||
|
cabal install --force-reinstalls "$SRC_TGZ";
|
||||||
|
else
|
||||||
|
echo "expected '$SRC_TGZ' not found";
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: true
|
email: true
|
||||||
irc:
|
irc:
|
||||||
|
|
Loading…
Reference in New Issue