on master help sign in
attempt to use correct GHC version when compiling

attempt to install GHC via stack on macos

commita80f8b2727baae272df2f92f48b20fcf58e0f78d authorAgentM <agentm@themactionfaction.com> dateFri 29 Dec 2017, 23:47 (9 years ago) parentfef1ed7
2 files changed+32−14
.travis.yml+16−14 .travis/install-ghc.sh+16
.travis.yml+16−14
@@ -27,10 +27,15 @@ matrix:
2727 compiler: ": #stack 8.2.1"
2828 addons: {apt: {packages: [ghc-8.2.1], sources: [hvr-ghc]}}
2929
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
3131 os: osx
32− compiler: ": #stack 8.2.1"
33− addons: {apt: {packages: [ghc-8.2.1], sources: [hvr-ghc]}}
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"
38+# addons: {apt: {packages: [ghc-8.2.1], sources: [hvr-ghc]}}
3439
3540install:
3641 - unset CC
@@ -42,16 +47,13 @@ install:
4247# any command which exits with a non-zero exit code causes the build to fail.
4348script:
4449 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
45− - GHC_OPTIONS=""
46− - |
47− set -ex
48− # Run tests
49− stack --no-terminal test --ghc-options="$GHC_OPTIONS"
50− set +ex
51−
52−after_success:
53− - |
54− # Build and ship binary
55− ./.travis/attach-binary.sh
50+ - stack --no-terminal --system-ghc build
51+ - stack --no-terminal --system-ghc test
52+ - stack --no-terminal --system-ghc haddock
53+
54+#after_success:
55+# - |
56+# # Build and ship binary
57+# ./.travis/attach-binary.sh
5658
5759# 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