]>
Commit | Line | Data |
---|---|---|
1 | # NB: don't set `language: haskell` here | |
2 | language: c | |
3 | ||
4 | # See also https://github.com/hvr/multi-ghc-travis for more information | |
5 | ||
6 | # The following lines enable several GHC versions and/or HP versions | |
7 | # to be tested; often it's enough to test only against the last | |
8 | # release of a major GHC version. Setting HPVER implictly sets | |
9 | # GHCVER. Omit lines with versions you don't need/want testing for. | |
10 | env: | |
11 | - CABALVER=1.22 GHCVER=7.10.1 | |
12 | ||
13 | # Note: the distinction between `before_install` and `install` is not | |
14 | # important. | |
15 | before_install: | |
16 | - travis_retry sudo add-apt-repository -y ppa:hvr/ghc | |
17 | - travis_retry sudo apt-get update | |
18 | - travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER | |
19 | - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH | |
20 | ||
21 | install: | |
22 | - cabal --version | |
23 | - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]" | |
24 | - travis_retry cabal update | |
25 | - cabal install hpc-coveralls | |
26 | - cabal install --only-dependencies --enable-tests --enable-benchmarks --enable-coverage | |
27 | ||
28 | # Here starts the actual work to be performed for the package under | |
29 | # test; any command which exits with a non-zero exit code causes the | |
30 | # build to fail. | |
31 | script: | |
32 | # -v2 provides useful information for debugging | |
33 | - cabal configure --enable-tests --enable-benchmarks -v2 | |
34 | ||
35 | # this builds all libraries and executables | |
36 | # (including tests/benchmarks) | |
37 | - cabal build | |
38 | ||
39 | - run-cabal-test --show-details=streaming | |
40 | - cabal check | |
41 | ||
42 | # tests that a source-distribution can be generated | |
43 | - cabal sdist | |
44 | ||
45 | # check that the generated source-distribution can be built & installed | |
46 | - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && | |
47 | (cd dist && cabal install --force-reinstalls "$SRC_TGZ") | |
48 | ||
49 | after_script: | |
50 | - hpc-coveralls test | |
51 | # EOF |