diff --git a/.travis.yml b/.travis.yml index eb222307..61a5a326 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,9 +10,14 @@ addons: packages: - libgmp-dev +matrix: + include: + - env: CHECK_SCRIPT="./etc/ci-script.sh" + - env: CHECK_SCRIPT="./etc/curator-2-check.sh" + # Edit etc/ci-script.sh to change GHC version script: -- ./etc/ci-script.sh +- $CHECK_SCRIPT # Caching doesn't work with sudo: true #cache: diff --git a/etc/ci-script.sh b/etc/ci-script.sh index ec5f6e77..91c08bc3 100755 --- a/etc/ci-script.sh +++ b/etc/ci-script.sh @@ -15,13 +15,6 @@ bunzip2 stackage-curator.bz2 chmod +x stackage-curator mv stackage-curator ~/.local/bin -# Get new stackage-curator -CURATOR2=stackage-curator-2-9132b4b184f1f7f27c4c80ec0609460cea22ae75 -wget "https://s3.amazonaws.com/www.snoyman.com/stackage-curator-2/$CURATOR2.bz2" -bunzip2 "$CURATOR2.bz2" -chmod +x $CURATOR2 -mv $CURATOR2 ~/.local/bin/stackage-curator-2 - # Install GHC stack setup $GHCVER @@ -29,11 +22,4 @@ stack setup $GHCVER stack update # Check -stack --resolver ghc-$GHCVER exec stackage-curator check - -# New curator check -stackage-curator-2 update && - stackage-curator-2 constraints && - stackage-curator-2 snapshotincomplete && - stackage-curator-2 snapshot && - stackage-curator-2 checksnapshot +exec stack --resolver ghc-$GHCVER exec stackage-curator check diff --git a/etc/curator-2-check.sh b/etc/curator-2-check.sh new file mode 100755 index 00000000..6f16982e --- /dev/null +++ b/etc/curator-2-check.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +mkdir -p ~/.local/bin +export PATH=$HOME/.local/bin:$PATH + +# Get new Stackage curator +CURATOR2=stackage-curator-2-9132b4b184f1f7f27c4c80ec0609460cea22ae75 +wget "https://s3.amazonaws.com/www.snoyman.com/stackage-curator-2/$CURATOR2.bz2" +bunzip2 "$CURATOR2.bz2" +chmod +x $CURATOR2 +mv $CURATOR2 ~/.local/bin/stackage-curator-2 + +# New curator check +stackage-curator-2 update && + stackage-curator-2 constraints && + stackage-curator-2 snapshotincomplete && + stackage-curator-2 snapshot && + stackage-curator-2 checksnapshot