on master help sign in
Adds fast switch to compilation, pulls GHC from stack trying to leverage cache for GHC installation and moves dependencies to same command used to run tests
commit714282874ab48327b79f524fa1230e215788e2d1 authorDiogo Biazus <diogo@biazus.me> dateWed 10 Jan 2018, 22:52 (9 years ago) parentb0a23d4
2 files changed+6−8
.travis.yml+5−6 .travis/install-dependencies.sh+1−2
.travis.yml+5−6
@@ -16,13 +16,11 @@ cache:
1616matrix:
1717 fast_finish: true
1818 include:
19− - env: CACHE_NAME=7.10.3 STACK_YAML=stack.ghc7.10.yaml GHC_VERSION=7.10.3
19+ - env: CACHE_NAME=7.10.3 STACK_YAML=stack.ghc7.10.yaml
2020 compiler: ": #stack 7.10.3"
21− addons: {apt: {packages: [ghc-7.10.3], sources: [hvr-ghc]}}
2221
23− - env: CACHE_NAME=8.0.2 STACK_YAML=stack.yaml GHC_VERSION=8.0.2
22+ - env: CACHE_NAME=8.0.2 STACK_YAML=stack.yaml
2423 compiler: ": #stack 8.0.2"
25− addons: {apt: {packages: [ghc-8.0.2], sources: [hvr-ghc]}}
2624
2725 - env: CACHE_NAME=osx-8.0.2 STACK_YAML=stack.yaml
2826 os: osx
@@ -38,10 +36,11 @@ before_script:
3836# Here starts the actual work to be performed for the package under test;
3937# any command which exits with a non-zero exit code causes the build to fail.
4038script:
41− - ./.travis/install-dependencies.sh
4239 - |
4340 # Run tests
44− stack --no-terminal --jobs=2 --install-ghc --system-ghc test
41+ set -e
42+ ./.travis/install-dependencies.sh
43+ stack --no-terminal --jobs=2 --system-ghc test
4544 - |
4645 #Run HLint
4746 if [[ "$(uname)" = "Linux" ]]; then
.travis/install-dependencies.sh+1−2
@@ -1,11 +1,10 @@
11# Run tests
22if [[ "$(uname)" = "Darwin" ]]; then
3− brew update && brew install coreutils
43 timeout_cmd="gtimeout"
54else
65 timeout_cmd="timeout"
76fi
8−$timeout_cmd 20m stack --no-terminal --jobs=2 --install-ghc --system-ghc build --only-dependencies
7+$timeout_cmd 15m stack --no-terminal --jobs=2 --install-ghc --system-ghc build --only-dependencies --fast
98ret=$?
109case "$ret" in
1110 0)