summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorickc <ickc@users.noreply.github.com>2017-01-17 05:09:02 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-17 14:09:02 +0100
commit117f3d2323b37fdd035acc1bf88e74af19482ddb (patch)
tree0abcd09cb9ff1adc851e978fe9cfd3955bcafe2b /.travis.yml
parent1b2ba57270f966bf5738f059104cd2b7a3f41ed4 (diff)
travis: download stack only in stack BUILD (#3357)
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml17
1 files changed, 9 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml
index f8a5fed81..b4c1b72d8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -80,16 +80,17 @@ before_install:
# We want to always allow newer versions of packages when building on GHC HEAD
- CABALARGS=""
- if [ "x$GHCVER" = "xhead" ]; then CABALARGS=--allow-newer; fi
-
-# Download and unpack the stack executable
- export PATH=$PATH:/opt/happy/1.19.5/bin/:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.local/bin
-- mkdir -p ~/.local/bin
+# Download and unpack the stack executable
- |
- if [ `uname` = "Darwin" ]
- then
- curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
- else
- curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
+ if [[ $BUILD == "stack" ]]; then
+ mkdir -p ~/.local/bin
+ if [ `uname` = "Darwin" ]
+ then
+ curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
+ else
+ curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
+ fi
fi
install: