[Git][ghc/ghc][wip/backports] ci.sh: Enforce minimum happy/alex versions

Ben Gamari gitlab at gitlab.haskell.org
Mon Sep 21 19:26:21 UTC 2020



Ben Gamari pushed to branch wip/backports at Glasgow Haskell Compiler / GHC


Commits:
5c4cf79e by Ben Gamari at 2020-09-21T15:26:11-04:00
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

- - - - -


1 changed file:

- .gitlab/ci.sh


Changes:

=====================================
.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() {



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5c4cf79e78eba57cbcc461d76d3397399d22a74d

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5c4cf79e78eba57cbcc461d76d3397399d22a74d
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200921/14348e00/attachment-0001.html>


More information about the ghc-commits mailing list