# NB: don't set `language: haskell` here # See also https://github.com/hvr/multi-ghc-travis for more information # The following lines enable several GHC versions and/or HP versions # to be tested; often it's enough to test only against the last # release of a major GHC version. Setting HPVER implictly sets # GHCVER. Omit lines with versions you don't need/want testing for. env: - GHCVER=7.6.3 ESVER=1.3.2 - GHCVER=7.8.2 ESVER=1.0.3 - GHCVER=7.8.2 ESVER=1.1.2 - GHCVER=7.8.2 ESVER=1.2.3 - GHCVER=7.8.2 ESVER=1.3.2 # services: # - elasticsearch # Note: the distinction between `before_install` and `install` is not # important. before_install: - sudo add-apt-repository -y ppa:hvr/ghc - sudo apt-get update - sudo apt-get install cabal-install-1.18 ghc-$GHCVER - sudo apt-get install happy-1.19.3 - export PATH=/opt/ghc/$GHCVER/bin:/opt/happy/1.19.3/bin:$PATH - wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$ESVER.deb - sudo dpkg -i elasticsearch-$ESVER.deb - sudo service elasticsearch start install: - cabal-1.18 update - cabal-1.18 install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls # 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: # -v2 provides useful information for debugging - cabal-1.18 configure --enable-tests --enable-benchmarks -v2 # this builds all libraries and executables # (including tests/benchmarks) - cabal-1.18 build - cabal-1.18 test - cabal-1.18 check # tests that a source-distribution can be generated - cabal-1.18 sdist # check that the generated source-distribution can be built & installed - export SRC_TGZ=$(cabal-1.18 info . | awk '{print $2 ".tar.gz";exit}') ; cd dist/; if [ -f "$SRC_TGZ" ]; then cabal-1.18 install "$SRC_TGZ"; else echo "expected '$SRC_TGZ' not found"; exit 1; fi # EOF