diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-09-02 14:47:34 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-09-21 15:27:17 -0400 |
commit | 17740c20e4c8e78add9e425910ac6546ffaeba03 (patch) | |
tree | 7cc0f0dbc6afa9b6acb6d6056fd302ce599371a9 | |
parent | fbdc93e72259542136827c8be67df0d716d9125e (diff) | |
download | haskell-17740c20e4c8e78add9e425910ac6546ffaeba03.tar.gz |
ci.sh: Enforce minimum happy/alex versions
Also, always invoke cabal-install to ensure that happy/alex symlinks are
up-to-date.
(cherry picked from commit a89c2fbab9bcf7d769e9d27262ab29f93342f114)
Modified to use happy-1.19
-rwxr-xr-x | .gitlab/ci.sh | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh index 5a42709c24..095043149d 100755 --- a/.gitlab/ci.sh +++ b/.gitlab/ci.sh @@ -8,6 +8,8 @@ set -e -o pipefail # Configuration: hackage_index_state="@1579718451" +MIN_ALEX_VERSION="3.2" + # Colors BLACK="0;30" GRAY="1;30" @@ -168,6 +170,7 @@ function set_toolchain_paths() { HAPPY="$HOME/.cabal/bin/happy" ALEX="$HOME/.cabal/bin/alex" fi + export GHC export CABAL export HAPPY @@ -286,17 +289,13 @@ function setup_toolchain() { *) ;; esac - if [ ! -e "$HAPPY" ]; then - info "Building happy..." - cabal update - $cabal_install happy - fi + cabal update - if [ ! -e "$ALEX" ]; then - info "Building alex..." - cabal update - $cabal_install alex - fi + info "Building happy..." + $cabal_install happy --constraint="happy==1.19.*" + + info "Building alex..." + $cabal_install alex --constraint="alex>=$MIN_ALEX_VERSION" } function cleanup_submodules() { |