diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-08-19 11:46:26 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-09-23 16:00:18 -0400 |
commit | 8a6598c798e384b98687af888bdb6cc701d97c02 (patch) | |
tree | 89ddd666b20303e2d3f8784fc277b027d2869aee /.gitlab | |
parent | 1c91e7210eeb2ba130b9c1f95373ed83efb24786 (diff) | |
download | haskell-8a6598c798e384b98687af888bdb6cc701d97c02.tar.gz |
Ensure that cabal update is invoked before building
Diffstat (limited to '.gitlab')
-rwxr-xr-x | .gitlab/ci.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh index 36e6c6d4c4..94be278aa1 100755 --- a/.gitlab/ci.sh +++ b/.gitlab/ci.sh @@ -209,6 +209,10 @@ function set_toolchain_paths() { export ALEX } +function cabal_update() { + "$CABAL" update --index="$HACKAGE_INDEX_STATE" +} + # Extract GHC toolchain function setup() { echo "=== TIMINGS ===" > ci-timings @@ -223,7 +227,7 @@ function setup() { time_it "setup" setup_toolchain fi - "$CABAL" update --index="$HACKAGE_INDEX_STATE" + cabal_update # Make sure that git works git config user.email "ghc-ci@gitlab-haskell.org" @@ -314,8 +318,9 @@ function fetch_cabal() { function setup_toolchain() { fetch_ghc fetch_cabal + cabal_update - cabal_install="$CABAL v2-install \ + local cabal_install="$CABAL v2-install \ --with-compiler=$GHC \ --index-state=$HACKAGE_INDEX_STATE \ --installdir=$toolchain/bin \ |