Skip to content

Commit 95b2575

Browse files
committed
CI: download Stack for Cabal builds (fix commercialhaskell#2390)
1 parent df15da1 commit 95b2575

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

.travis-setup.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@ fetch_stack_linux() {
1515
curl -sL https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack';
1616
}
1717

18+
# We need stack to generate cabal files with precise bounds, even for cabal
19+
# builds.
20+
mkdir -p ~/.local/bin;
21+
if [ `uname` = "Darwin" ]; then
22+
travis_retry fetch_stack_osx
23+
else
24+
travis_retry fetch_stack_linux
25+
fi
26+
1827
case "$BUILD" in
1928
stack)
20-
mkdir -p ~/.local/bin;
21-
if [ `uname` = "Darwin" ]; then
22-
travis_retry fetch_stack_osx
23-
else
24-
travis_retry fetch_stack_linux
25-
fi;
26-
29+
# However, we only need stack to download GHC for stack builds.
2730
travis_retry stack --no-terminal setup;
2831
;;
2932
cabal)

0 commit comments

Comments
 (0)