aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.travis.yml30
1 files changed, 19 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml
index 4e005c8..ebe68b4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,34 +3,42 @@ language: c
3 3
4# See also https://github.com/hvr/multi-ghc-travis for more information 4# See also https://github.com/hvr/multi-ghc-travis for more information
5 5
6# explicitly request container-based infrastructure
7sudo: false
8
6# The following lines enable several GHC versions and/or HP versions 9# 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 10# to be tested; often it's enough to test only against the last
8# release of a major GHC version. Setting HPVER implictly sets 11# release of a major GHC version. Setting HPVER implictly sets
9# GHCVER. Omit lines with versions you don't need/want testing for. 12# GHCVER. Omit lines with versions you don't need/want testing for.
10env: 13matrix:
11 - CABALVER=1.22 GHCVER=7.10.1 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
12 24
13# Note: the distinction between `before_install` and `install` is not
14# important.
15before_install: 25before_install:
16 - travis_retry sudo add-apt-repository -y ppa:hvr/ghc 26 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
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:~/.cabal/bin:$PATH
20 27
21install: 28install:
22 - cabal --version 29 - cabal --version
23 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]" 30 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
24 - travis_retry cabal update 31 - travis_retry cabal update
32 - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config # The container environment reports 16 cores
25 - cabal install hpc-coveralls 33 - cabal install hpc-coveralls
26 - cabal install --only-dependencies --enable-tests --enable-benchmarks 34 - cabal install --only-dependencies
27 35
28# Here starts the actual work to be performed for the package under 36# 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 37# test; any command which exits with a non-zero exit code causes the
30# build to fail. 38# build to fail.
31script: 39script:
32 # -v2 provides useful information for debugging 40 # -v2 provides useful information for debugging
33 - cabal configure --enable-tests --enable-benchmarks --enable-coverage -v2 41 - cabal configure --enable-tests --enable-benchmarks --enable-coverage -v2
34 42
35 # this builds all libraries and executables 43 # this builds all libraries and executables
36 # (including tests/benchmarks) 44 # (including tests/benchmarks)
@@ -46,6 +54,6 @@ script:
46 - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && 54 - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
47 (cd dist && cabal install --force-reinstalls "$SRC_TGZ") 55 (cd dist && cabal install --force-reinstalls "$SRC_TGZ")
48 56
49after_script: 57after_script:
50 - hpc-coveralls test 58 - hpc-coveralls test
51# EOF 59# EOF