git.iko.soy/typeable/pandoc
on master help sign in
Simplified travis.yml.

- Follows template on hvr/multi-ghc-travis. - Don't build with ghc 7.4.2. - Build tarball after main build.

commit00e2ae8a675f7e1605048e096e3ae70776b0030e authorJohn MacFarlane <jgm@berkeley.edu> dateThu 8 Oct 2015, 13:18 (11 years ago) parentfb8b780
1 file changed+17−19
.travis.yml+17−19
.travis.yml+17−19
@@ -6,34 +6,32 @@ sudo: false
66# 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.
77matrix:
88 include:
9− - env: CABALVER=1.16 GHCVER=7.4.2 GHCOPTS="-Werror" JOPTS=""
10− addons: {apt: {packages: [cabal-install-1.16, ghc-7.4.2], sources: [hvr-ghc]}}
11− - env: CABALVER=1.18 GHCVER=7.6.3 GHCOPTS="-Werror" JOPTS="-j2"
9+ - env: CABALVER=1.18 GHCVER=7.6.3 GHCOPTS="-Werror"
1210 addons: {apt: {packages: [cabal-install-1.18, ghc-7.6.3], sources: [hvr-ghc]}}
13− - env: CABALVER=1.18 GHCVER=7.8.4 GHCOPTS="-Werror" JOPTS="-j2"
11+ - env: CABALVER=1.18 GHCVER=7.8.4 GHCOPTS="-Werror"
1412 addons: {apt: {packages: [cabal-install-1.18, ghc-7.8.4], sources: [hvr-ghc]}}
15− - env: CABALVER=1.22 GHCVER=7.10.2 GHCOPTS="" JOPTS="-j2"
13+ - env: CABALVER=1.22 GHCVER=7.10.2 GHCOPTS=""
1614 addons: {apt: {packages: [cabal-install-1.22, ghc-7.10.2],sources: [hvr-ghc]}}
17−# - env: CABALVER=head GHCVER=head GHCOPTS="-Werror" JOPTS="-j2"
18−# addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
1915
2016# Note: the distinction between `before_install` and `install` is not important.
2117before_install:
2218 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
2319
2420install:
25− - cabal-$CABALVER update
26−# - git clone https://github.com/jgm/pandoc-types && cd pandoc-types && cabal-1.18 install && cd ..
27− - cabal-$CABALVER install $JOPTS --only-dependencies --enable-tests
21+ - cabal --version
22+ - ghc --version
23+ - travis_retry cabal update
24+ - cabal install --only-dependencies --enable-tests
2825
2926# 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.
3027script:
31− - |
32− if [ "${CABALVER}" != "1.16" ]; then
33− cabal-$CABALVER sdist --output-directory=build
34− cd build
35− fi
36− - cabal-$CABALVER configure --enable-tests -v2 # -v2 provides useful information for debugging
37− - cabal-$CABALVER build $JOPTS --ghc-options=$GHCOPTS # this builds all libraries and executables (including tests/benchmarks)
38− - cabal-$CABALVER test
39− - cabal-$CABALVER check
28+ - cabal configure --enable-tests -v2 # -v2 provides useful information for debugging
29+ - cabal build --ghc-options=$GHCOPTS # this builds all libraries and executables (including tests/benchmarks)
30+ - cabal test
31+ - cabal check
32+ - cabal sdist # tests that a source-distribution can be generated
33+# Check that the resulting source distribution can be built & installed.
34+# If there are no other `.tar.gz` files in `dist`, this can be even simpler:
35+# `cabal install --force-reinstalls dist/*-*.tar.gz`
36+ - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
37+ (cd dist && cabal install --force-reinstalls "$SRC_TGZ")