From 00e2ae8a675f7e1605048e096e3ae70776b0030e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 8 Oct 2015 13:18:28 -0700 Subject: Simplified travis.yml. - Follows template on hvr/multi-ghc-travis. - Don't build with ghc 7.4.2. - Build tarball after main build. --- .travis.yml | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index 66fcccbfc..fddd78477 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,34 +6,32 @@ sudo: false # 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. matrix: include: - - env: CABALVER=1.16 GHCVER=7.4.2 GHCOPTS="-Werror" JOPTS="" - addons: {apt: {packages: [cabal-install-1.16, ghc-7.4.2], sources: [hvr-ghc]}} - - env: CABALVER=1.18 GHCVER=7.6.3 GHCOPTS="-Werror" JOPTS="-j2" + - env: CABALVER=1.18 GHCVER=7.6.3 GHCOPTS="-Werror" addons: {apt: {packages: [cabal-install-1.18, ghc-7.6.3], sources: [hvr-ghc]}} - - env: CABALVER=1.18 GHCVER=7.8.4 GHCOPTS="-Werror" JOPTS="-j2" + - env: CABALVER=1.18 GHCVER=7.8.4 GHCOPTS="-Werror" addons: {apt: {packages: [cabal-install-1.18, ghc-7.8.4], sources: [hvr-ghc]}} - - env: CABALVER=1.22 GHCVER=7.10.2 GHCOPTS="" JOPTS="-j2" + - env: CABALVER=1.22 GHCVER=7.10.2 GHCOPTS="" addons: {apt: {packages: [cabal-install-1.22, ghc-7.10.2],sources: [hvr-ghc]}} -# - env: CABALVER=head GHCVER=head GHCOPTS="-Werror" JOPTS="-j2" -# addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}} # Note: the distinction between `before_install` and `install` is not important. before_install: - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH install: - - cabal-$CABALVER update -# - git clone https://github.com/jgm/pandoc-types && cd pandoc-types && cabal-1.18 install && cd .. - - cabal-$CABALVER install $JOPTS --only-dependencies --enable-tests + - cabal --version + - ghc --version + - travis_retry cabal update + - cabal install --only-dependencies --enable-tests # 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. script: - - | - if [ "${CABALVER}" != "1.16" ]; then - cabal-$CABALVER sdist --output-directory=build - cd build - fi - - cabal-$CABALVER configure --enable-tests -v2 # -v2 provides useful information for debugging - - cabal-$CABALVER build $JOPTS --ghc-options=$GHCOPTS # this builds all libraries and executables (including tests/benchmarks) - - cabal-$CABALVER test - - cabal-$CABALVER check + - cabal configure --enable-tests -v2 # -v2 provides useful information for debugging + - cabal build --ghc-options=$GHCOPTS # this builds all libraries and executables (including tests/benchmarks) + - cabal test + - cabal check + - cabal sdist # tests that a source-distribution can be generated +# Check that the resulting source distribution can be built & installed. +# If there are no other `.tar.gz` files in `dist`, this can be even simpler: +# `cabal install --force-reinstalls dist/*-*.tar.gz` + - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && + (cd dist && cabal install --force-reinstalls "$SRC_TGZ") -- cgit v1.2.3