|
1 |
| -language: haskell |
| 1 | +# Based on https://github.com/hvr/multi-ghc-travis |
2 | 2 |
|
3 |
| -ghc: |
4 |
| - # Older than GHC 7.6 aren't supported by the package. |
5 |
| - - 7.8 |
6 |
| - - 7.6 |
| 3 | +language: c |
| 4 | + |
| 5 | +# Explicitly request container-based infrastructure. |
| 6 | +sudo: false |
| 7 | + |
| 8 | +matrix: |
| 9 | + include: |
| 10 | + - env: CABALVER=1.16 GHCVER=7.6.2 |
| 11 | + addons: |
| 12 | + apt: {packages: [cabal-install-1.16, ghc-7.6.3], sources: [hvr-ghc]} |
| 13 | + |
| 14 | + - env: CABALVER=1.18 GHCVER=7.8.4 |
| 15 | + addons: |
| 16 | + apt: {packages: [cabal-install-1.18, ghc-7.8.4], sources: [hvr-ghc]} |
| 17 | + - env: CABALVER=1.22 GHCVER=7.10.3 |
| 18 | + addons: |
| 19 | + apt: {packages: [cabal-install-1.22, ghc-7.10.3], sources: [hvr-ghc]} |
| 20 | + - env: CABALVER=1.24 GHCVER=8.0.1 |
| 21 | + addons: |
| 22 | + apt: {packages: [cabal-install-1.24, ghc-8.0.1], sources: [hvr-ghc]} |
| 23 | + - env: CABALVER=head GHCVER=head |
| 24 | + addons: |
| 25 | + apt: {packages: [cabal-install-head, ghc-head], sources: [hvr-ghc]} |
| 26 | + |
| 27 | + allow_failures: |
| 28 | + - env: CABALVER=head GHCVER=head |
| 29 | + |
| 30 | +before_install: |
| 31 | + - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH |
| 32 | + |
| 33 | +install: |
| 34 | + - cabal --version |
| 35 | + - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]" |
| 36 | + - travis_retry cabal update |
| 37 | + - cabal install --only-dependencies --enable-tests --enable-benchmarks |
7 | 38 |
|
8 | 39 | script:
|
9 | 40 | # Option -fpedantic turns on additional wornings in addition to -Wall.
|
10 |
| - - cabal configure -fpedantic && cabal build |
| 41 | + - cabal configure -fpedantic |
| 42 | + - cabal build |
| 43 | + - cabal test |
11 | 44 |
|
12 | 45 | # Following line tests if sdist package is created correctly.
|
13 |
| - - cabal sdist && cabal install dist/*.tar.gz |
| 46 | + - cabal sdist | sed -rn '$s/^[^:]+:\s+//p' | xargs cabal install |
0 commit comments