Skip to content

Commit ce3e93f

Browse files
committed
Travis: use pvp-bounds when building with cabal-install (commercialhaskell#1450)
1 parent 4f0b714 commit ce3e93f

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

.travis-setup.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
set -eux
44

5+
mkdir -p ~/.local/bin;
6+
if [ `uname` = "Darwin" ]; then
7+
curl -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin;
8+
else
9+
curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack';
10+
fi;
11+
stack --no-terminal setup;
12+
513
case "$BUILD" in
614
stack)
7-
mkdir -p ~/.local/bin;
8-
if [ `uname` = "Darwin" ]; then
9-
curl -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin;
10-
else
11-
curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack';
12-
fi
13-
stack --no-terminal setup;;
15+
;;
1416
cabal)
1517
mkdir -p $HOME/.cabal
1618
cat > $HOME/.cabal/config <<EOF

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ install:
7474
cabal)
7575
cabal --version;
7676
travis_retry cabal update;
77-
cabal install --only-dependencies --constraint="ignore +without-pcre" --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0;;
77+
rm -f $(stack path --dist-dir)/stack-*.tar.gz;
78+
stack sdist --pvp-bounds=both;
79+
tar xf $(stack path --dist-dir)/stack-*.tar.gz --wildcards --strip-components=1 '*/stack.cabal';
80+
cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0;;
7881
esac
7982

8083
script:

0 commit comments

Comments
 (0)