@@ -1,42 +1,47 @@
1−language: c
2−
31# explicitly request container-based infrastructure
42sudo: false
53
64matrix:
75 include:
8− - env: CABALVER=1.16 GHCVER=7.6.3
9− addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3,happy-1.18.10], sources: [hvr-ghc]}}
10− - env: CABALVER=1.18 GHCVER=7.8.4
11− addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4,happy-1.19.4], sources: [hvr-ghc]}}
12− - env: CABALVER=1.22 GHCVER=7.10.2
13− addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2,happy-1.19.5],sources: [hvr-ghc]}}
14− - env: CABALVER=head GHCVER=head
15− addons: {apt: {packages: [cabal-install-head,ghc-head,happy-head], sources: [hvr-ghc]}}
16−
6+ - env: GHCVER=7.8.4 STACK_YAML=stack-7.8.yaml
7+ addons:
8+ apt:
9+ sources:
10+ - hvr-ghc
11+ packages:
12+ - ghc-7.8.4
13+ - env: GHCVER=7.10.2 STACK_YAML=stack.yaml
14+ addons:
15+ apt:
16+ sources:
17+ - hvr-ghc
18+ packages:
19+ - ghc-7.10.2
20+ - env: GHCVER=head STACK_YAML=stack-head.yaml
21+ addons:
22+ apt:
23+ sources:
24+ - hvr-ghc
25+ packages:
26+ - ghc-head
1727 allow_failures:
18− - env: CABALVER=head GHCVER=head
28+ - env: GHCVER=head STACK_YAML=stack-head.yaml
29+
30+cache:
31+ directories:
32+ - $HOME/.stack/
1933
2034before_install:
21− - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
35+ # ghc
36+ - export PATH=/opt/ghc/$GHCVER/bin:$PATH
37+ # stack
38+ - mkdir -p ~/.local/bin
39+ - export PATH=~/.local/bin:$PATH
40+ - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
2241
2342install:
24− - cabal --version
25− - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
26− - travis_retry cabal update
27− - cabal install --only-dependencies --enable-tests --enable-benchmarks
43+ - stack --no-terminal --skip-ghc-check setup
44+ - stack --no-terminal --skip-ghc-check test --only-snapshot
2845
29−# Here starts the actual work to be performed for the package under test; any command which exits with a non-zero exit code causes the build to fail.
3046script:
31− - if [ -f configure.ac ]; then autoreconf -i; fi
32− - cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
33− - cabal build # this builds all libraries and executables (including tests/benchmarks)
34− - cabal test
35− - cabal check
36− - cabal sdist # tests that a source-distribution can be generated
37−
38−# Check that the resulting source distribution can be built & installed.
39−# If there are no other `.tar.gz` files in `dist`, this can be even simpler:
40−# `cabal install --force-reinstalls dist/*-*.tar.gz`
41− - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
42− (cd dist && cabal install --force-reinstalls "$SRC_TGZ")
47+ - stack --no-terminal --skip-ghc-check test