From a89c2fbab9bcf7d769e9d27262ab29f93342f114 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Wed, 2 Sep 2020 14:47:34 -0400 Subject: ci.sh: Enforce minimum happy/alex versions Also, always invoke cabal-install to ensure that happy/alex symlinks are up-to-date. --- .gitlab/ci.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh index 938cc22da9..dfc3d9e6e4 100755 --- a/.gitlab/ci.sh +++ b/.gitlab/ci.sh @@ -7,6 +7,8 @@ set -e -o pipefail # Configuration: hackage_index_state="2020-09-14T19:30:43Z" +MIN_HAPPY_VERSION="1.20" +MIN_ALEX_VERSION="3.2" # Colors BLACK="0;30" @@ -294,17 +296,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>=$MIN_HAPPY_VERSION" + + info "Building alex..." + $cabal_install alex --constraint="alex>=$MIN_ALEX_VERSION" } function cleanup_submodules() { -- cgit v1.2.1