1 # NB: don't set `language: haskell` here
3 # The following enables several GHC versions to be tested; often it's enough to test only against the last release in a major GHC version. Feel free to omit lines listings versions you don't need/want testing for.
18 # - GHCVER=head # see section about GHC HEAD snapshots
20 # Note: the distinction between `before_install` and `install` is not important.
22 - sudo add-apt-repository -y ppa:hvr/ghc
24 - sudo apt-get install cabal-install-1.18 ghc-$GHCVER happy
25 - sudo apt-get install libxss-dev
26 - export PATH=/opt/ghc/$GHCVER/bin:$PATH
30 - cabal-1.18 install --only-dependencies --enable-tests --enable-benchmarks
32 # 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.
34 - cabal-1.18 configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
35 - cabal-1.18 build # this builds all libraries and executables (including tests/benchmarks)
38 - cabal-1.18 sdist # tests that a source-distribution can be generated
40 # The following scriptlet checks that the resulting source distribution can be built & installed
41 - export SRC_TGZ=$(cabal-1.18 info . | awk '{print $2 ".tar.gz";exit}') ;
43 if [ -f "$SRC_TGZ" ]; then
44 cabal-1.18 install "$SRC_TGZ";
46 echo "expected '$SRC_TGZ' not found";