]> git.immae.eu Git - github/fretlink/hmacaroons.git/blob - .travis.yml
Update travis.yml to use the new infrastructure
[github/fretlink/hmacaroons.git] / .travis.yml
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 # explicitly request container-based infrastructure
7 sudo: false
8
9 # The following lines enable several GHC versions and/or HP versions
10 # to be tested; often it's enough to test only against the last
11 # release of a major GHC version. Setting HPVER implictly sets
12 # GHCVER. Omit lines with versions you don't need/want testing for.
13 matrix:
14 include:
15 - env: CABALVER=1.18 GHCVER=7.8.4
16 addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}}
17 - env: CABALVER=1.22 GHCVER=7.10.1
18 addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.1],sources: [hvr-ghc]}}
19 - env: CABALVER=head GHCVER=head
20 addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
21
22 allow_failures:
23 - env: CABALVER=head GHCVER=head
24
25 before_install:
26 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
27
28 install:
29 - cabal --version
30 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
31 - travis_retry cabal update
32 - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config # The container environment reports 16 cores
33 - cabal install hpc-coveralls
34 - cabal install --only-dependencies
35
36 # Here starts the actual work to be performed for the package under
37 # test; any command which exits with a non-zero exit code causes the
38 # build to fail.
39 script:
40 # -v2 provides useful information for debugging
41 - cabal configure --enable-tests --enable-benchmarks --enable-coverage -v2
42
43 # this builds all libraries and executables
44 # (including tests/benchmarks)
45 - cabal build
46
47 - run-cabal-test --show-details=streaming
48 - cabal check
49
50 # tests that a source-distribution can be generated
51 - cabal sdist
52
53 # check that the generated source-distribution can be built & installed
54 - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
55 (cd dist && cabal install --force-reinstalls "$SRC_TGZ")
56
57 after_script:
58 - hpc-coveralls test
59 # EOF