summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-07-22 11:10:20 -0400
committerBen Gamari <ben@smart-cactus.org>2019-07-22 11:10:20 -0400
commit73d53f8c6fed31a12726afdde2e010ead1f0256c (patch)
tree0d6d60f7992d2f5e74489eb434235b360ea51a71
parent3e139dba8b8fcc15c201803a0ae27255ada43c14 (diff)
downloadhaskell-73d53f8c6fed31a12726afdde2e010ead1f0256c.tar.gz
gitlab-ci: Fix i386 builds
It looks like this was an incomplete cherry-pick.
-rw-r--r--.gitlab-ci.yml14
-rw-r--r--.gitlab/win32-init.sh17
2 files changed, 24 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a6bd2cfc75..a7368fc4ae 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,6 +4,10 @@ variables:
# Commit of ghc/ci-images repository from which to pull Docker images
DOCKER_REV: cefaee3c742af193e0f7783f87edb0d35374515c
+ # Sequential version number capturing the versions of all tools fetched by
+ # .gitlab/win32-init.sh.
+ WINDOWS_TOOLCHAIN_VERSION: 1
+
before_script:
- python3 .gitlab/fix-submodules.py
- git submodule sync --recursive
@@ -537,7 +541,7 @@ validate-x86_64-windows-hadrian:
variables:
MSYSTEM: MINGW64
cache:
- key: x86_64-windows-hadrian
+ key: "x86_64-windows-hadrian-$WINDOWS_TOOLCHAIN_VERSION"
nightly-i386-windows-hadrian:
extends: .build-windows-hadrian
@@ -547,7 +551,7 @@ nightly-i386-windows-hadrian:
variables:
- $NIGHTLY
cache:
- key: i386-windows-hadrian
+ key: "i386-windows-hadrian-$WINDOWS_TOOLCHAIN_VERSION"
.build-windows-make:
extends: .build-windows
@@ -584,7 +588,7 @@ validate-x86_64-windows:
MSYSTEM: MINGW64
CONFIGURE_ARGS: "--target=x86_64-unknown-mingw32"
cache:
- key: x86_64-windows
+ key: "x86_64-windows-$WINDOWS_TOOLCHAIN_VERSION"
# Normal Windows validate builds are profiled; that won't do for releases.
release-x86_64-windows:
@@ -607,7 +611,7 @@ release-i386-windows:
# Due to #15934
BUILD_PROF_LIBS: "NO"
cache:
- key: i386-windows
+ key: "i386-windows-$WINDOWS_TOOLCHAIN_VERSION"
nightly-i386-windows:
extends: .build-windows-make
@@ -620,7 +624,7 @@ nightly-i386-windows:
# Due to #15934
BUILD_PROF_LIBS: "NO"
cache:
- key: i386-windows
+ key: "i386-windows-$WINDOWS_TOOLCHAIN_VERSION"
############################################################
# Cleanup
diff --git a/.gitlab/win32-init.sh b/.gitlab/win32-init.sh
index dce9be8d16..f92f57c7d4 100644
--- a/.gitlab/win32-init.sh
+++ b/.gitlab/win32-init.sh
@@ -10,12 +10,25 @@ if [ -d "`pwd`/cabal-cache" ]; then
fi
if [ ! -e $toolchain/bin/ghc ]; then
- curl https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-x86_64-unknown-mingw32.tar.xz | tar -xJ
+ case $MSYSTEM in
+ MINGW32)
+ triple="i386-unknown-mingw32"
+ ;;
+ MINGW64)
+ triple="x86_64-unknown-mingw32"
+ ;;
+ *)
+ echo "win32-init: Unknown MSYSTEM $MSYSTEM"
+ exit 1
+ ;;
+ esac
+ curl https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-$triple.tar.xz | tar -xJ
mv ghc-$GHC_VERSION toolchain
fi
if [ ! -e $toolchain/bin/cabal ]; then
- curl https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-i386-unknown-mingw32.zip > /tmp/cabal.zip
+ url="https://downloads.haskell.org/~cabal/cabal-install-latest/cabal-install-2.4.1.0-x86_64-unknown-mingw32.zip"
+ curl $url > /tmp/cabal.zip
unzip /tmp/cabal.zip
mv cabal.exe $toolchain/bin
fi