Skip to content

Commit b6d11d4

Browse files
committed
Update CI to GHC 9.12.1
1 parent 42e664c commit b6d11d4

File tree

3 files changed

+64
-99
lines changed

3 files changed

+64
-99
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 52 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
#
77
# haskell-ci regenerate
88
#
9-
# For more information, see https://github.com/andreasabel/haskell-ci
9+
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.17.20230928
11+
# version: 0.19.20250216
1212
#
13-
# REGENDATA ("0.17.20230928",["github","regex-posix.cabal"])
13+
# REGENDATA ("0.19.20250216",["github","regex-posix.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -23,28 +23,38 @@ on:
2323
jobs:
2424
linux:
2525
name: Haskell-CI - Linux - ${{ matrix.compiler }}
26-
runs-on: ubuntu-20.04
26+
runs-on: ubuntu-24.04
2727
timeout-minutes:
2828
60
2929
container:
30-
image: buildpack-deps:focal
30+
image: buildpack-deps:jammy
3131
continue-on-error: ${{ matrix.allow-failure }}
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.8.0.20230919
35+
- compiler: ghc-9.12.1
3636
compilerKind: ghc
37-
compilerVersion: 9.8.0.20230919
37+
compilerVersion: 9.12.1
3838
setup-method: ghcup
39-
allow-failure: true
40-
- compiler: ghc-9.6.3
39+
allow-failure: false
40+
- compiler: ghc-9.10.1
41+
compilerKind: ghc
42+
compilerVersion: 9.10.1
43+
setup-method: ghcup
44+
allow-failure: false
45+
- compiler: ghc-9.8.4
4146
compilerKind: ghc
42-
compilerVersion: 9.6.3
47+
compilerVersion: 9.8.4
4348
setup-method: ghcup
4449
allow-failure: false
45-
- compiler: ghc-9.4.7
50+
- compiler: ghc-9.6.6
4651
compilerKind: ghc
47-
compilerVersion: 9.4.7
52+
compilerVersion: 9.6.6
53+
setup-method: ghcup
54+
allow-failure: false
55+
- compiler: ghc-9.4.8
56+
compilerKind: ghc
57+
compilerVersion: 9.4.8
4858
setup-method: ghcup
4959
allow-failure: false
5060
- compiler: ghc-9.2.8
@@ -65,56 +75,53 @@ jobs:
6575
- compiler: ghc-8.8.4
6676
compilerKind: ghc
6777
compilerVersion: 8.8.4
68-
setup-method: hvr-ppa
78+
setup-method: ghcup
6979
allow-failure: false
7080
- compiler: ghc-8.6.5
7181
compilerKind: ghc
7282
compilerVersion: 8.6.5
73-
setup-method: hvr-ppa
83+
setup-method: ghcup
7484
allow-failure: false
7585
- compiler: ghc-8.4.4
7686
compilerKind: ghc
7787
compilerVersion: 8.4.4
78-
setup-method: hvr-ppa
88+
setup-method: ghcup
7989
allow-failure: false
8090
- compiler: ghc-8.2.2
8191
compilerKind: ghc
8292
compilerVersion: 8.2.2
83-
setup-method: hvr-ppa
93+
setup-method: ghcup
8494
allow-failure: false
8595
- compiler: ghc-8.0.2
8696
compilerKind: ghc
8797
compilerVersion: 8.0.2
88-
setup-method: hvr-ppa
89-
allow-failure: false
90-
- compiler: ghc-7.10.3
91-
compilerKind: ghc
92-
compilerVersion: 7.10.3
93-
setup-method: hvr-ppa
98+
setup-method: ghcup
9499
allow-failure: false
95100
fail-fast: false
96101
steps:
97-
- name: apt
102+
- name: apt-get install
98103
run: |
99104
apt-get update
100-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
101-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
102-
mkdir -p "$HOME/.ghcup/bin"
103-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
104-
chmod a+x "$HOME/.ghcup/bin/ghcup"
105-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
106-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
107-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
108-
else
109-
apt-add-repository -y 'ppa:hvr/ghc'
110-
apt-get update
111-
apt-get install -y "$HCNAME"
112-
mkdir -p "$HOME/.ghcup/bin"
113-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
114-
chmod a+x "$HOME/.ghcup/bin/ghcup"
115-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
116-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
117-
fi
105+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
106+
- name: Install GHCup
107+
run: |
108+
mkdir -p "$HOME/.ghcup/bin"
109+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
110+
chmod a+x "$HOME/.ghcup/bin/ghcup"
111+
- name: Install cabal-install
112+
run: |
113+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
114+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
115+
- name: Install GHC (GHCup)
116+
if: matrix.setup-method == 'ghcup'
117+
run: |
118+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
119+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
120+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
121+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
122+
echo "HC=$HC" >> "$GITHUB_ENV"
123+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
124+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
118125
env:
119126
HCKIND: ${{ matrix.compilerKind }}
120127
HCNAME: ${{ matrix.compiler }}
@@ -125,30 +132,12 @@ jobs:
125132
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
126133
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
127134
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
128-
HCDIR=/opt/$HCKIND/$HCVER
129-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
130-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
131-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
132-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
133-
echo "HC=$HC" >> "$GITHUB_ENV"
134-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
135-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
136-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
137-
else
138-
HC=$HCDIR/bin/$HCKIND
139-
echo "HC=$HC" >> "$GITHUB_ENV"
140-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
141-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
142-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
143-
fi
144-
145135
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
146136
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
147137
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
148138
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
149-
if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
139+
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
150140
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
151-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
152141
env:
153142
HCKIND: ${{ matrix.compilerKind }}
154143
HCNAME: ${{ matrix.compiler }}
@@ -175,18 +164,6 @@ jobs:
175164
repository hackage.haskell.org
176165
url: http://hackage.haskell.org/
177166
EOF
178-
if $HEADHACKAGE; then
179-
cat >> $CABAL_CONFIG <<EOF
180-
repository head.hackage.ghc.haskell.org
181-
url: https://ghc.gitlab.haskell.org/head.hackage/
182-
secure: True
183-
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
184-
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
185-
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
186-
key-threshold: 3
187-
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
188-
EOF
189-
fi
190167
cat >> $CABAL_CONFIG <<EOF
191168
program-default-options
192169
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -237,20 +214,16 @@ jobs:
237214
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package regex-posix" >> cabal.project ; fi
238215
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
239216
cat >> cabal.project <<EOF
240-
allow-newer: containers
241217
EOF
242-
if $HEADHACKAGE; then
243-
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
244-
fi
245-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(regex-posix)$/; }' >> cabal.project.local
218+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(regex-posix)$/; }' >> cabal.project.local
246219
cat cabal.project
247220
cat cabal.project.local
248221
- name: dump install plan
249222
run: |
250223
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
251224
cabal-plan
252225
- name: restore cache
253-
uses: actions/cache/restore@v3
226+
uses: actions/cache/restore@v4
254227
with:
255228
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
256229
path: ~/.cabal/store
@@ -276,18 +249,9 @@ jobs:
276249
run: |
277250
rm -f cabal.project.local
278251
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
279-
- name: prepare for constraint sets
280-
run: |
281-
rm -f cabal.project.local
282-
- name: constraint set containers-0.7
283-
run: |
284-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' all --dry-run ; fi
285-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
286-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' --dependencies-only -j2 all ; fi
287-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' all ; fi
288252
- name: save cache
289-
uses: actions/cache/save@v3
290253
if: always()
254+
uses: actions/cache/save@v4
291255
with:
292256
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
293257
path: ~/.cabal/store

cabal.haskell-ci

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
branches: master
22

3-
constraint-set containers-0.7
4-
ghc: >= 8.2
5-
constraints: containers ^>= 0.7
6-
tests: True
7-
run-tests: True
3+
-- constraint-set containers-0.7
4+
-- ghc: >= 8.2
5+
-- constraints: containers ^>= 0.7
6+
-- tests: True
7+
-- run-tests: True
88

9-
raw-project
10-
allow-newer: containers
9+
-- raw-project
10+
-- allow-newer: containers

regex-posix.cabal

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ extra-source-files:
2424
cbits/myfree.h
2525

2626
tested-with:
27-
GHC == 9.8.0
28-
GHC == 9.6.3
29-
GHC == 9.4.7
27+
GHC == 9.12.1
28+
GHC == 9.10.1
29+
GHC == 9.8.4
30+
GHC == 9.6.6
31+
GHC == 9.4.8
3032
GHC == 9.2.8
3133
GHC == 9.0.2
3234
GHC == 8.10.7
@@ -35,7 +37,6 @@ tested-with:
3537
GHC == 8.4.4
3638
GHC == 8.2.2
3739
GHC == 8.0.2
38-
GHC == 7.10.3
3940

4041
source-repository head
4142
type: git

0 commit comments

Comments
 (0)