on master help sign in
attempt to use correct GHC version when compiling
a80f8b2AgentM
.travis.yml+16−14
@@ -27,10 +27,15 @@ matrix:
27 compiler: ": #stack 8.2.1"
27 compiler: ": #stack 8.2.1"
28 addons: {apt: {packages: [ghc-8.2.1], sources: [hvr-ghc]}}
28 addons: {apt: {packages: [ghc-8.2.1], sources: [hvr-ghc]}}
29
29
30− - env: GHCVER=8.2.1 CACHE_NAME=8.2.1-osx BUILD_BINARY=1
30+ - env: GHCVER=8.0.2 CACHE_NAME=8.0.2-osx BUILD_BINARY=1
31 os: osx
31 os: osx
32− compiler: ": #stack 8.2.1"
32+ compiler: ": #stack 8.0.2"
33+
34+
35+# - env: GHCVER=8.2.1 CACHE_NAME=8.2.1-osx BUILD_BINARY=1
36+# os: osx
37+# compiler: ": #stack 8.2.1"
33− addons: {apt: {packages: [ghc-8.2.1], sources: [hvr-ghc]}}
38+# addons: {apt: {packages: [ghc-8.2.1], sources: [hvr-ghc]}}
34
39
35install:
40install:
36 - unset CC
41 - unset CC
@@ -42,16 +47,13 @@ install:
42# any command which exits with a non-zero exit code causes the build to fail.
47# any command which exits with a non-zero exit code causes the build to fail.
43script:
48script:
44 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
49 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
45− - GHC_OPTIONS=""
50+ - stack --no-terminal --system-ghc build
46− - |
47− set -ex
48− # Run tests
49− stack --no-terminal test --ghc-options="$GHC_OPTIONS"
51+ - stack --no-terminal --system-ghc test
50− set +ex
52+ - stack --no-terminal --system-ghc haddock
51−
53+
52−after_success:
54+#after_success:
53− - |
55+# - |
54− # Build and ship binary
56+# # Build and ship binary
55− ./.travis/attach-binary.sh
57+# ./.travis/attach-binary.sh
56
58
57# EOF
59# EOF
.travis/install-ghc.shnew file+16
@@ -0,0 +1,16 @@
1+#!/bin/sh
2+set -eux
3+#assume stack is installed
4+STACK=~/.local/bin/stack
5+
6+fetch_ghc_osx() {
7+ echo "Using stack to install GHC $GHCVER"
8+ $STACK setup $GHCVER
9+}
10+
11+if [ "$(uname)" = "Darwin" ]; then
12+ fetch_ghc_osx
13+else
14+ #installed by apt
15+ echo "Linux GHC via APT already installed."
16+fi