on master help sign in
Use system ghc in linux
793fe60Diogo Biazus
.travis.yml+10−6
@@ -14,11 +14,13 @@ cache:
14
14
15matrix:
15matrix:
16 include:
16 include:
17− - env: CACHE_NAME=7.10.3 STACK_YAML=stack.ghc7.10.yaml
17+ - env: CACHE_NAME=7.10.3 STACK_YAML=stack.ghc7.10.yaml GHC_VERSION=7.10.3
18 compiler: ": #stack 7.10.3"
18 compiler: ": #stack 7.10.3"
19+ addons: {apt: {packages: [ghc-7.10.3], sources: [hvr-ghc]}}
19
20
20− - env: CACHE_NAME=8.0.2 STACK_YAML=stack.yaml
21+ - env: CACHE_NAME=8.0.2 STACK_YAML=stack.yaml GHC_VERSION=8.0.2
21 compiler: ": #stack 8.0.2"
22 compiler: ": #stack 8.0.2"
23+ addons: {apt: {packages: [ghc-8.0.2], sources: [hvr-ghc]}}
22
24
23 - env: CACHE_NAME=osx-7.10.3 STACK_YAML=stack.ghc7.10.yaml
25 - env: CACHE_NAME=osx-7.10.3 STACK_YAML=stack.ghc7.10.yaml
24 os: osx
26 os: osx
@@ -30,11 +32,9 @@ matrix:
30
32
31install:
33install:
32 - unset CC
34 - unset CC
33− - export PATH=$HOME/.local/bin:$PATH
35+ - export PATH=$HOME/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH
34 - ./.travis/install-ghr.sh
36 - ./.travis/install-ghr.sh
35 - ./.travis/install-stack.sh
37 - ./.travis/install-stack.sh
36− - travis_wait travis_retry stack setup
37− - travis_retry stack build --only-dependencies
38
38
39# Here starts the actual work to be performed for the package under test;
39# Here starts the actual work to be performed for the package under test;
40# any command which exits with a non-zero exit code causes the build to fail.
40# any command which exits with a non-zero exit code causes the build to fail.
@@ -43,7 +43,11 @@ script:
43 - |
43 - |
44 set -ex
44 set -ex
45 # Run tests
45 # Run tests
46+ if [ "$(uname)" = "Darwin" ]; then
47+ stack --install-ghc --no-terminal test --ghc-options="$GHC_OPTIONS"
48+ else
46− stack --no-terminal test --ghc-options="$GHC_OPTIONS"
49+ stack --no-install-ghc --system-ghc --no-terminal test --ghc-options="$GHC_OPTIONS"
50+ fi
47 set +ex
51 set +ex
48
52
49after_success:
53after_success: