New curator check as a separate build matrix component

This commit is contained in:
Kirill Zaborsky 2019-01-28 09:45:20 +03:00
parent 0e557ecd2c
commit c091a1435d
3 changed files with 27 additions and 16 deletions

View File

@ -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:

View File

@ -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

20
etc/curator-2-check.sh Executable file
View File

@ -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