Adapt travis script to improve build times

pull/59/merge
Lennart Spitzner 2017-09-29 17:39:39 +02:00
parent 8c6eb4d1e2
commit 5a12b63035
2 changed files with 6 additions and 11 deletions

View File

@ -180,7 +180,7 @@ before_install:
- | - |
function better_wait() { function better_wait() {
date date
time $* & # send the long living command to background! time "$*" & # send the long living command to background!
set +x set +x
MINUTES=0 MINUTES=0
@ -231,7 +231,7 @@ install:
echo "cabal build-cache MISS"; echo "cabal build-cache MISS";
rm -rf $HOME/.cabsnap; rm -rf $HOME/.cabsnap;
mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin; mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
cabal install -j$JOBS --only-dependencies --enable-tests --enable-benchmarks; cabal install -j$JOBS --only-dependencies --enable-tests --enable-benchmarks --ghc-options="-j1 +RTS -M500M";
fi fi
# snapshot package-db on cache miss # snapshot package-db on cache miss
@ -259,12 +259,12 @@ script:
set -ex set -ex
case "$BUILD" in case "$BUILD" in
stack) stack)
better_wait stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps better_wait stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps --ghc-options="-j1 +RTS -M500M"
;; ;;
cabal) cabal)
if [ -f configure.ac ]; then autoreconf -i; fi if [ -f configure.ac ]; then autoreconf -i; fi
cabal configure --enable-tests --enable-benchmarks -v # -v2 provides useful information for debugging cabal configure --enable-tests --enable-benchmarks -v # -v2 provides useful information for debugging
better_wait cabal build -j$JOBS # this builds all libraries and executables (including tests/benchmarks) better_wait cabal build -j$JOBS --ghc-options="-j1 +RTS -M500M" # this builds all libraries and executables (including tests/benchmarks)
cabal test cabal test
;; ;;
cabaldist) cabaldist)
@ -275,12 +275,12 @@ script:
# If there are no other `.tar.gz` files in `dist`, this can be even simpler: # If there are no other `.tar.gz` files in `dist`, this can be even simpler:
# `cabal install --force-reinstalls dist/*-*.tar.gz` # `cabal install --force-reinstalls dist/*-*.tar.gz`
SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
(cd dist && better_wait cabal install -j$JOBS --force-reinstalls "$SRC_TGZ") (cd dist && better_wait cabal install -j$JOBS --force-reinstalls "$SRC_TGZ" --ghc-options="-j1 +RTS -M500M")
;; ;;
canew) canew)
better_wait cabal new-build -j$JOBS --disable-tests --disable-benchmarks better_wait cabal new-build -j$JOBS --disable-tests --disable-benchmarks
better_wait cabal new-build -j$JOBS --enable-tests --enable-benchmarks better_wait cabal new-build -j$JOBS --enable-tests --enable-benchmarks
cabal new-test cabal new-test --ghc-options="-j1 +RTS -M500M"
;; ;;
esac esac
set +ex set +ex

View File

@ -80,7 +80,6 @@ library {
} }
ghc-options: { ghc-options: {
-Wall -Wall
-j
-fno-warn-unused-imports -fno-warn-unused-imports
-fno-warn-redundant-constraints -fno-warn-redundant-constraints
} }
@ -203,7 +202,6 @@ executable brittany
} }
ghc-options: { ghc-options: {
-Wall -Wall
-j
-fno-spec-constr -fno-spec-constr
-fno-warn-unused-imports -fno-warn-unused-imports
-fno-warn-redundant-constraints -fno-warn-redundant-constraints
@ -283,7 +281,6 @@ test-suite unittests
} }
ghc-options: { ghc-options: {
-Wall -Wall
-j
-fno-warn-unused-imports -fno-warn-unused-imports
-rtsopts -rtsopts
-with-rtsopts "-M2G" -with-rtsopts "-M2G"
@ -356,7 +353,6 @@ test-suite littests
} }
ghc-options: { ghc-options: {
-Wall -Wall
-j
-fno-warn-unused-imports -fno-warn-unused-imports
-rtsopts -rtsopts
-with-rtsopts "-M2G" -with-rtsopts "-M2G"
@ -395,7 +391,6 @@ test-suite libinterfacetests
} }
ghc-options: { ghc-options: {
-Wall -Wall
-j
-fno-warn-unused-imports -fno-warn-unused-imports
-rtsopts -rtsopts
-with-rtsopts "-M2G" -with-rtsopts "-M2G"