git.iko.soy/typeable/openapi3
on master help sign in
Switch to stack for Travis CI builds
7fa1225Nickolay Kudasov
.travis.yml+35−30
@@ -1,42 +1,47 @@
1−language: c
2−
3# explicitly request container-based infrastructure
1# explicitly request container-based infrastructure
4sudo: false
2sudo: false
5
3
6matrix:
4matrix:
7 include:
5 include:
8− - env: CABALVER=1.16 GHCVER=7.6.3
6+ - env: GHCVER=7.8.4 STACK_YAML=stack-7.8.yaml
9− addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3,happy-1.18.10], sources: [hvr-ghc]}}
7+ addons:
10− - env: CABALVER=1.18 GHCVER=7.8.4
8+ apt:
11− addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4,happy-1.19.4], sources: [hvr-ghc]}}
9+ sources:
10+ - hvr-ghc
11+ packages:
12+ - ghc-7.8.4
12− - env: CABALVER=1.22 GHCVER=7.10.2
13+ - env: GHCVER=7.10.2 STACK_YAML=stack.yaml
13− addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2,happy-1.19.5],sources: [hvr-ghc]}}
14+ addons:
14− - env: CABALVER=head GHCVER=head
15+ apt:
15− addons: {apt: {packages: [cabal-install-head,ghc-head,happy-head], sources: [hvr-ghc]}}
16+ sources:
16−
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
17 allow_failures:
27 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/
19
33
20before_install:
34before_install:
35+ # ghc
21− - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
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'
22
41
23install:
42install:
24− - cabal --version
43+ - stack --no-terminal --skip-ghc-check setup
25− - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
44+ - stack --no-terminal --skip-ghc-check test --only-snapshot
26− - travis_retry cabal update
27− - cabal install --only-dependencies --enable-tests --enable-benchmarks
28
45
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.
30script:
46script:
31− - if [ -f configure.ac ]; then autoreconf -i; fi
47+ - stack --no-terminal --skip-ghc-check test
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")
stack-7.8.yamlnew file+5
@@ -0,0 +1,5 @@
1+flags: {}
2+packages:
3+- '.'
4+extra-deps:
5+resolver: lts-2.22
stack-head.yamlnew file+5
@@ -0,0 +1,5 @@
1+flags: {}
2+packages:
3+- '.'
4+extra-deps:
5+resolver: nightly-2015-11-08