Skip to content

Commit 50b287b

Browse files
authored
Merge pull request #11032 from haskell/wip/mp/release-boot-compiler
Update release CI scripts (boot compiler and platform support)
2 parents 269c1b1 + ca7a938 commit 50b287b

File tree

3 files changed

+73
-37
lines changed

3 files changed

+73
-37
lines changed

.github/workflows/validate.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ on:
3232
env:
3333
# We choose a stable ghc version across all os's
3434
# which will be used to do the next release
35-
GHC_FOR_RELEASE: "9.4.8"
35+
GHC_FOR_RELEASE: "9.10.2"
3636
# Ideally we should use the version about to be released for hackage tests and benchmarks
37-
GHC_FOR_SOLVER_BENCHMARKS: "9.4.8"
38-
GHC_FOR_COMPLETE_HACKAGE_TESTS: "9.4.8"
37+
GHC_FOR_SOLVER_BENCHMARKS: "9.10.2"
38+
GHC_FOR_COMPLETE_HACKAGE_TESTS: "9.10.2"
3939
COMMON_FLAGS: "-j 2 -v"
4040

4141
# See https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md#hackage-revisions
@@ -61,7 +61,7 @@ jobs:
6161
ghc:
6262
[
6363
"9.12.2",
64-
"9.10.1",
64+
"9.10.2",
6565
"9.8.4",
6666
"9.6.7",
6767
"9.4.8",

.gitlab-ci.yml

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ stages:
33

44
variables:
55
# Commit of ghc/ci-images repository from which to pull Docker images
6-
DOCKER_REV: "a9297a370025101b479cfd4977f8f910814e03ab"
6+
DOCKER_REV: "df20b2eb2fcc1c93aed5ad047c65752fbd4c38d4"
77

8-
GHC_VERSION: 9.6.4
9-
CABAL_INSTALL_VERSION: 3.10.2.0
8+
GHC_VERSION: 9.10.2
9+
CABAL_INSTALL_VERSION: 3.14.2.0
1010

1111
workflow:
1212
rules:
@@ -33,30 +33,20 @@ linux:
3333
- ARCH: i386
3434
TAG: x86_64-linux
3535
OS:
36-
- deb9
3736
- deb10
3837
- ARCH: x86_64
3938
TAG: x86_64-linux
4039
OS:
41-
- deb9
4240
- deb10
4341
- deb11
4442
- deb12
4543
- fedora33
4644
- fedora36
4745
- fedora38
4846
- rocky8
49-
- ubuntu18_04
5047
- ubuntu20_04
5148
- ubuntu22_04
52-
# Pull this one from the future, since it's missing.
53-
# We can't move the entire file to this DOCKER_REV, because
54-
# i386-linux-deb9 is missing from it.
55-
- ARCH: x86_64
56-
TAG: x86_64-linux
57-
OS: centos7
58-
DOCKER_REV: f2d12519f45a13a61fcca03a949f927ceead6492
59-
49+
- ubuntu24_04
6050
- ARCH: aarch64
6151
TAG: aarch64-linux
6252
OS:
@@ -76,12 +66,11 @@ alpine-linux:
7666
extends: .build
7767
parallel:
7868
matrix:
79-
- ARCH: [i386, x86_64]
80-
OS: [alpine3_12, alpine3_15, alpine3_17]
69+
- ARCH: [x86_64]
70+
OS: [alpine3_12, alpine3_20]
8171
TAG: x86_64-linux
82-
# Was 3_18 for i386 intentionally left off?
83-
- ARCH: x86_64
84-
OS: alpine3_18
72+
- ARCH: [i386]
73+
OS: alpine3_20
8574
TAG: x86_64-linux
8675
- ARCH: [aarch64]
8776
OS: [alpine3_18]
@@ -110,9 +99,6 @@ darwin:
11099
tags:
111100
- ${ARCH}-darwin-m1
112101
variables:
113-
# Using 9.8.2 to work around
114-
# https://gitlab.haskell.org/ghc/ghc/-/issues/24050
115-
GHC_VERSION: 9.8.2
116102
TARBALL_ARCHIVE_SUFFIX: ${ARCH}-darwin
117103
TARBALL_EXT: tar.xz
118104
ADD_CABAL_ARGS: ""

.gitlab/ci.sh

Lines changed: 61 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,70 @@ set -Eeuo pipefail
44

55
source "$CI_PROJECT_DIR/.gitlab/common.sh"
66

7-
## Figure out how to get the Haskell toolchain.
8-
9-
# For backport, the centos image no longer has the right GHC version, so use
10-
# ghcup.
11-
if [[ -f /etc/os-release && "$(grep ^ID /etc/os-release)" =~ "centos" ]]; then
12-
. "$CI_PROJECT_DIR/.gitlab/ghcup.sh"
13-
# All the other ones are fine.
14-
elif [[ "$(uname)" == "Linux" ]]; then
15-
export PATH="/opt/ghc/${GHC_VERSION}/bin:${PATH}"
16-
# Not all runners use ci-images, so ghcup is used.
7+
# Required arguments to the script
8+
: "${GHC_VERSION:?Need to set GHC_VERSION}"
9+
: "${CABAL_INSTALL_VERSION:?Need to set CABAL_INSTALL_VERSION}"
10+
11+
# If GHC is set, extract its directory and add it to PATH
12+
# The linux images set the GHC variable to specify the location of the GHC installation.
13+
if [[ -n "${GHC:-}" ]]; then
14+
echo "GHC variable is set to: $GHC"
15+
export PATH="$(dirname "$GHC"):$PATH"
16+
else
17+
GHC="ghc"
18+
fi
19+
20+
echo "Checking toolchain versions..."
21+
22+
# GHC check
23+
ghc_version_ok=false
24+
if command -v ghc &>/dev/null; then
25+
current_ghc_version=$(ghc --numeric-version)
26+
if [[ "$current_ghc_version" == "$GHC_VERSION" ]]; then
27+
ghc_version_ok=true
28+
else
29+
echo "Wrong GHC version: found $current_ghc_version, expected $GHC_VERSION"
30+
fi
1731
else
18-
. "$CI_PROJECT_DIR/.gitlab/ghcup.sh"
32+
echo "GHC executable '$GHC' not found on PATH"
1933
fi
2034

35+
# cabal check
36+
cabal_version_ok=false
37+
if command -v cabal &>/dev/null; then
38+
current_cabal_version=$(cabal --numeric-version)
39+
if [[ "$current_cabal_version" == "$CABAL_INSTALL_VERSION" ]]; then
40+
cabal_version_ok=true
41+
else
42+
echo "Wrong cabal version: found $current_cabal_version, expected $CABAL_INSTALL_VERSION"
43+
fi
44+
else
45+
echo "cabal not found on PATH"
46+
fi
47+
48+
# If either is wrong, install via ghcup
49+
if ! $ghc_version_ok || ! $cabal_version_ok; then
50+
echo "Installing correct GHC and/or cabal via ghcup..."
51+
. "$CI_PROJECT_DIR/.gitlab/ghcup.sh"
52+
fi
53+
54+
# Final verification (ghc and cabal must now be on PATH)
55+
echo "Verifying installed versions..."
56+
57+
actual_ghc_version=$(ghc --numeric-version)
58+
actual_cabal_version=$(cabal --numeric-version)
59+
60+
if [[ "$actual_ghc_version" != "$GHC_VERSION" ]]; then
61+
fail "Incorrect GHC version (actual: $actual_ghc_version, expected: $GHC_VERSION)"
62+
fi
63+
64+
if [[ "$actual_cabal_version" != "$CABAL_INSTALL_VERSION" ]]; then
65+
fail "Incorrect cabal version (actual: $actual_cabal_version, expected: $CABAL_INSTALL_VERSION)"
66+
fi
67+
68+
echo "Using GHC version: $actual_ghc_version"
69+
echo "Using cabal-install version: $actual_cabal_version"
70+
2171
export CABAL_DIR="$CI_PROJECT_DIR/cabal"
2272

2373
case "$(uname)" in

0 commit comments

Comments
 (0)