]> git.immae.eu Git - github/fretlink/hmacaroons.git/blame - .travis.yml
Update travis.yml to use the new infrastructure
[github/fretlink/hmacaroons.git] / .travis.yml
CommitLineData
d41449d7
JT
1# NB: don't set `language: haskell` here
2language: c
3
4# See also https://github.com/hvr/multi-ghc-travis for more information
5
cf070d57
JT
6# explicitly request container-based infrastructure
7sudo: false
8
d41449d7
JT
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.
cf070d57
JT
13matrix:
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
d41449d7 24
d41449d7 25before_install:
cf070d57 26 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
d41449d7
JT
27
28install:
29 - cabal --version
30 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
31 - travis_retry cabal update
cf070d57 32 - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config # The container environment reports 16 cores
1dcd44f3 33 - cabal install hpc-coveralls
cf070d57 34 - cabal install --only-dependencies
d41449d7
JT
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.
39script:
40 # -v2 provides useful information for debugging
cf070d57 41 - cabal configure --enable-tests --enable-benchmarks --enable-coverage -v2
d41449d7
JT
42
43 # this builds all libraries and executables
44 # (including tests/benchmarks)
45 - cabal build
46
1dcd44f3 47 - run-cabal-test --show-details=streaming
d41449d7
JT
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
cf070d57 57after_script:
1dcd44f3 58 - hpc-coveralls test
d41449d7 59# EOF