# from https://github.com/hvr/multi-ghc-travis env: # - GHCVER=7.6.3 # todo: re-enable this - GHCVER=7.8.3 # see note about Alex/Happy - GHCVER=7.10.1 # see note about Alex/Happy before_install: - travis_retry sudo add-apt-repository -y ppa:hvr/ghc - travis_retry sudo apt-get update - travis_retry sudo apt-get install cabal-install-1.22 ghc-$GHCVER libgsl0-dev liblapack-dev - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.22/bin:$PATH install: - cabal update - cabal install alex - cabal install happy - cabal install gtk2hs-buildtools - cabal install --only-dependencies --enable-tests --enable-benchmarks # Here starts the actual work to be performed for the package under test; any command which exits with a non-zero exit code causes the build to fail. script: - cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging - cabal build # this builds all libraries and executables (including tests/benchmarks) - cabal test --show-details=always # - cabal check - cabal sdist # tests that a source-distribution can be generated # The following scriptlet checks that the resulting source distribution can be built & installed - export SRC_TGZ=$(cabal-1.22 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