git.iko.soy/typeable/pandoc
on master help sign in
Updated travis script to test with multiple GHC versions.
commitfca601d5f1b223abbc98f0864ed507ba07a2a7a1 authorJohn MacFarlane <jgm@berkeley.edu> dateWed 9 Apr 2014, 10:19 (13 years ago) parent91bc446
1 file changed+42−5
.travis.yml+42−5
.travis.yml+42−5
@@ -1,8 +1,45 @@
1−language: haskell
1+# NB: don't set `language: haskell` here
2+
3+# The following enables several GHC versions to be tested; often it's enough to test only against the last release in a major GHC version. Feel free to omit lines listings versions you don't need/want testing for.
4+env:
5+ - GHCVER=6.12.3
6+ - GHCVER=7.4.2
7+ - GHCVER=7.6.3
8+ - GHCVER=7.8.1 # see note about Alex/Happy
9+# - GHCVER=head # see section about GHC HEAD snapshots
10+
11+# Note: the distinction between `before_install` and `install` is not important.
212before_install:
3− - cabal install cabal-dev
4− - 'git clone https://github.com/jgm/pandoc-types && cabal-dev add-source pandoc-types'
13+ - travis_retry sudo add-apt-repository -y ppa:hvr/ghc
14+ - travis_retry sudo apt-get update
15+ - travis_retry sudo apt-get install cabal-install-1.18 ghc-$GHCVER happy
16+ - export PATH=/opt/ghc/$GHCVER/bin:$PATH
17+ - git clone https://github.com/jgm/pandoc-types && cd pandoc-types && cabal install && cd ..
18+ - |
19+ if [ $GHCVER = "head" ] || [ $GHCVER = "7.8.1" ]; then
20+ $CABAL install happy alex
21+ export PATH=$HOME/.cabal/bin:$PATH
22+ fi
23+
524install:
6− - cabal-dev install-deps --enable-tests
25+ - cabal-1.18 update
26+ - cabal-1.18 install --only-dependencies --enable-tests
27+
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.
729script:
8− - 'cabal-dev configure --enable-tests && cabal-dev build --ghc-options=-Werror && cabal-dev test'
30+ - cabal-1.18 configure --enable-tests -v2 # -v2 provides useful information for debugging
31+ - cabal-1.18 build --ghc-options=-Werror # this builds all libraries and executables (including tests/benchmarks)
32+ - cabal-1.18 test
33+ - cabal-1.18 check
34+ - cabal-1.18 sdist # tests that a source-distribution can be generated
35+
36+# The following scriptlet checks that the resulting source distribution can be built & installed
37+ - export SRC_TGZ=$(cabal-1.18 info . | awk '{print $2 ".tar.gz";exit}') ;
38+ cd dist/;
39+ if [ -f "$SRC_TGZ" ]; then
40+ cabal-1.18 install "$SRC_TGZ";
41+ else
42+ echo "expected '$SRC_TGZ' not found";
43+ exit 1;
44+ fi
45+