Speed up Travis (#3304)

* travis: fast_finish

* travis: cabal use `-j` whenever appropriate

* travis: remove stack nightly in osx build to speed up
This commit is contained in:
ickc 2016-12-13 05:19:25 -08:00 committed by John MacFarlane
parent 60004cd518
commit 3354f5a0ca

View file

@ -24,6 +24,9 @@ cache:
# If you need to have different apt packages for each combination in the
# matrix, you can use a line such as:
# addons: {apt: {packages: [libfcgi-dev,libgmp-dev]}}
#
# fast_finish: build successful when every builds not in allow_failure are finished
# i.e. not waiting any of the allow_failure to finish
matrix:
include:
# We grab the appropriate GHC and cabal-install versions from hvr's PPA. See:
@ -60,14 +63,16 @@ matrix:
compiler: ": #stack 8.0.1 osx"
os: osx
- env: BUILD=stack ARGS="--resolver nightly"
compiler: ": #stack nightly osx"
os: osx
# - env: BUILD=stack ARGS="--resolver nightly"
# compiler: ": #stack nightly osx"
# os: osx
allow_failures:
- env: BUILD=cabal GHCVER=head CABALVER=head
- env: BUILD=stack ARGS="--resolver nightly"
fast_finish: true
before_install:
# Using compiler above sets CC to an invalid value, so unset it
- unset CC
@ -99,7 +104,7 @@ install:
cabal)
cabal --version
travis_retry cabal update
cabal install --only-dependencies -ffast --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS
cabal install -j --only-dependencies -ffast --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS
;;
esac
@ -112,12 +117,12 @@ script:
;;
cabal)
cabal configure --enable-tests --enable-benchmarks -v2 -ffast --ghc-options="-O0 -Wall -fno-warn-unused-do-bind -Werror"
cabal build
cabal build -j
cabal check
cabal test
cabal test -j
cabal copy
cabal sdist
SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && \
(cd dist && cabal install --enable-tests --force-reinstalls "$SRC_TGZ")
(cd dist && cabal install -j --enable-tests --force-reinstalls "$SRC_TGZ")
;;
esac