Travis: only do sdist with cabal != 1.16.

This commit is contained in:
John MacFarlane 2015-07-05 10:42:44 -07:00
parent edf55dcee8
commit 6e121bfafc

View file

@ -25,15 +25,14 @@ 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
# hsb2hs is needed for -fembed_data_files, and is needed for sdist on
# older cabal versions (1.16):
- cabal-$CABALVER install hsb2hs
# 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:
- cabal-$CABALVER configure --enable-tests # needed for sdist with ghc 7.4.2/cabal 1.16
- cabal-$CABALVER sdist --output-directory=build
- cd build
- |
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