Skip to content

Commit

Permalink
Speed up Travis (#3304)
Browse files Browse the repository at this point in the history
* travis: fast_finish

* travis: cabal use `-j` whenever appropriate

* travis: remove stack nightly in osx build to speed up
  • Loading branch information
ickc authored and jgm committed Dec 13, 2016
1 parent 60004cd commit 3354f5a
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit 3354f5a

Please sign in to comment.