]>
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 --only-dependencies --enable-tests --enable-benchmarks | |
26 | ||
27 | # Here starts the actual work to be performed for the package under | |
28 | # test; any command which exits with a non-zero exit code causes the | |
29 | # build to fail. | |
30 | script: | |
31 | # -v2 provides useful information for debugging | |
32 | - cabal configure --enable-tests --enable-benchmarks -v2 | |
33 | ||
34 | # this builds all libraries and executables | |
35 | # (including tests/benchmarks) | |
36 | - cabal build | |
37 | ||
38 | - cabal test --show-details=streaming | |
39 | - cabal check | |
40 | ||
41 | # tests that a source-distribution can be generated | |
42 | - cabal sdist | |
43 | ||
44 | # check that the generated source-distribution can be built & installed | |
45 | - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && | |
46 | (cd dist && cabal install --force-reinstalls "$SRC_TGZ") | |
47 | ||
48 | # EOF |