git.iko.soy/typeable/swagger2
on master help sign in
Switch to cabal-based multi-ghc travis config
commitcc901785e37d07a899b20ef041b02e0c84514788 authorNickolay Kudasov <nickolay.kudasov@gmail.com> dateMon 30 Nov 2015, 22:53 (11 years ago) parent9c5bac6
1 file changed+29−36
.travis.yml+29−36
.travis.yml+29−36
@@ -1,48 +1,41 @@
1+language: c
2+
13# explicitly request container-based infrastructure
24sudo: false
35
46matrix:
57 include:
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
27− allow_failures:
28− - env: GHCVER=7.8.4 STACK_YAML=stack-7.8.yaml
29− - env: GHCVER=head STACK_YAML=stack-head.yaml
8+ - env: CABALVER=1.18 GHCVER=7.8.4 HAPPYVER=1.19.4
9+ addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4,happy-1.19.4], sources: [hvr-ghc]}}
10+ - env: CABALVER=1.22 GHCVER=7.10.1 HAPPYVER=1.19.5
11+ addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.1,happy-1.19.5],sources: [hvr-ghc]}}
12+ - env: CABALVER=head GHCVER=head HAPPYVER=head
13+ addons: {apt: {packages: [cabal-install-head,ghc-head,happy-head], sources: [hvr-ghc]}}
3014
31−cache:
32− directories:
33− - $HOME/.stack/
15+ allow_failures:
16+ - env: CABALVER=1.18 GHCVER=7.8.4 HAPPYVER=1.19.4
17+ - env: CABALVER=head GHCVER=head HAPPYVER=head
3418
3519before_install:
36− # ghc
37− - export PATH=/opt/ghc/$GHCVER/bin:$PATH
38− # stack
39− - mkdir -p ~/.local/bin
40− - export PATH=~/.local/bin:$PATH
41− - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
20+ - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH:/opt/happy/$HAPPYVER/bin
4221
4322install:
44− - stack --no-terminal --skip-ghc-check setup
45− - stack --no-terminal --skip-ghc-check test --only-snapshot
23+ - cabal --version
24+ - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
25+ - travis_retry cabal update
26+ - cabal install --only-dependencies --enable-tests --enable-benchmarks
4627
28+# 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.
4729script:
48− - stack --no-terminal --skip-ghc-check test --pedantic
30+ - if [ -f configure.ac ]; then autoreconf -i; fi
31+ - cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
32+ - cabal build # this builds all libraries and executables (including tests/benchmarks)
33+ - cabal test
34+ - cabal check
35+ - cabal sdist # tests that a source-distribution can be generated
36+
37+# Check that the resulting source distribution can be built & installed.
38+# If there are no other `.tar.gz` files in `dist`, this can be even simpler:
39+# `cabal install --force-reinstalls dist/*-*.tar.gz`
40+ - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
41+ (cd dist && cabal install --force-reinstalls "$SRC_TGZ")