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
7142828Diogo Biazus
.travis.yml+5−6
@@ -16,13 +16,11 @@ cache:
16matrix:
16matrix:
17 fast_finish: true
17 fast_finish: true
18 include:
18 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
20 compiler: ": #stack 7.10.3"
20 compiler: ": #stack 7.10.3"
21− addons: {apt: {packages: [ghc-7.10.3], sources: [hvr-ghc]}}
22
21
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
24 compiler: ": #stack 8.0.2"
23 compiler: ": #stack 8.0.2"
25− addons: {apt: {packages: [ghc-8.0.2], sources: [hvr-ghc]}}
26
24
27 - env: CACHE_NAME=osx-8.0.2 STACK_YAML=stack.yaml
25 - env: CACHE_NAME=osx-8.0.2 STACK_YAML=stack.yaml
28 os: osx
26 os: osx
@@ -38,10 +36,11 @@ before_script:
38# Here starts the actual work to be performed for the package under test;
36# Here starts the actual work to be performed for the package under test;
39# any command which exits with a non-zero exit code causes the build to fail.
37# any command which exits with a non-zero exit code causes the build to fail.
40script:
38script:
41− - ./.travis/install-dependencies.sh
42 - |
39 - |
43 # Run tests
40 # Run tests
41+ set -e
42+ ./.travis/install-dependencies.sh
44− stack --no-terminal --jobs=2 --install-ghc --system-ghc test
43+ stack --no-terminal --jobs=2 --system-ghc test
45 - |
44 - |
46 #Run HLint
45 #Run HLint
47 if [[ "$(uname)" = "Linux" ]]; then
46 if [[ "$(uname)" = "Linux" ]]; then
.travis/install-dependencies.sh+1−2
@@ -1,11 +1,10 @@
1# Run tests
1# Run tests
2if [[ "$(uname)" = "Darwin" ]]; then
2if [[ "$(uname)" = "Darwin" ]]; then
3− brew update && brew install coreutils
4 timeout_cmd="gtimeout"
3 timeout_cmd="gtimeout"
5else
4else
6 timeout_cmd="timeout"
5 timeout_cmd="timeout"
7fi
6fi
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
9ret=$?
8ret=$?
10case "$ret" in
9case "$ret" in
11 0)
10 0)