Skip to content

Commit 37eee22

Browse files
authored
Make CI work again and bump to 9.12.2 (#499)
* Bump CI to GHC 9.12.2 and ubuntu-24.04 (needed) * Relax bounds for GHC 9.12 (needed)
1 parent d52a0fd commit 37eee22

File tree

3 files changed

+49
-38
lines changed

3 files changed

+49
-38
lines changed

.github/workflows/haskell-ci.yml

+42-30
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This GitHub workflow config has been generated by a script via
22
#
3-
# haskell-ci 'github' 'cabal.project'
3+
# haskell-ci 'github' 'unordered-containers.cabal'
44
#
55
# To regenerate the script (for example after adjusting tested-with) run
66
#
77
# haskell-ci regenerate
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.17.20231010
11+
# version: 0.19.20250506
1212
#
13-
# REGENDATA ("0.17.20231010",["github","cabal.project"])
13+
# REGENDATA ("0.19.20250506",["github","unordered-containers.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:bionic
30+
image: buildpack-deps:jammy
3131
continue-on-error: ${{ matrix.allow-failure }}
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.8.1
35+
- compiler: ghc-9.12.2
3636
compilerKind: ghc
37-
compilerVersion: 9.8.1
37+
compilerVersion: 9.12.2
3838
setup-method: ghcup
3939
allow-failure: false
40-
- compiler: ghc-9.6.3
40+
- compiler: ghc-9.10.2
4141
compilerKind: ghc
42-
compilerVersion: 9.6.3
42+
compilerVersion: 9.10.2
4343
setup-method: ghcup
4444
allow-failure: false
45-
- compiler: ghc-9.4.7
45+
- compiler: ghc-9.8.4
4646
compilerKind: ghc
47-
compilerVersion: 9.4.7
47+
compilerVersion: 9.8.4
48+
setup-method: ghcup
49+
allow-failure: false
50+
- compiler: ghc-9.6.7
51+
compilerKind: ghc
52+
compilerVersion: 9.6.7
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
@@ -84,15 +94,29 @@ jobs:
8494
allow-failure: false
8595
fail-fast: false
8696
steps:
87-
- name: apt
97+
- name: apt-get install
8898
run: |
8999
apt-get update
90100
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
101+
- name: Install GHCup
102+
run: |
91103
mkdir -p "$HOME/.ghcup/bin"
92-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
104+
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
93105
chmod a+x "$HOME/.ghcup/bin/ghcup"
106+
- name: Install cabal-install
107+
run: |
108+
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
109+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
110+
- name: Install GHC (GHCup)
111+
if: matrix.setup-method == 'ghcup'
112+
run: |
94113
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
95-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
114+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
115+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
116+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
117+
echo "HC=$HC" >> "$GITHUB_ENV"
118+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
119+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
96120
env:
97121
HCKIND: ${{ matrix.compilerKind }}
98122
HCNAME: ${{ matrix.compiler }}
@@ -103,21 +127,12 @@ jobs:
103127
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
104128
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
105129
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
106-
HCDIR=/opt/$HCKIND/$HCVER
107-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
108-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
109-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
110-
echo "HC=$HC" >> "$GITHUB_ENV"
111-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
112-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
113-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
114130
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
115131
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
116132
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
117133
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
118134
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
119135
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
120-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
121136
env:
122137
HCKIND: ${{ matrix.compilerKind }}
123138
HCNAME: ${{ matrix.compiler }}
@@ -167,7 +182,7 @@ jobs:
167182
chmod a+x $HOME/.cabal/bin/cabal-plan
168183
cabal-plan --version
169184
- name: checkout
170-
uses: actions/checkout@v3
185+
uses: actions/checkout@v4
171186
with:
172187
path: source
173188
- name: initial cabal.project for sdist
@@ -194,19 +209,16 @@ jobs:
194209
echo "package unordered-containers" >> cabal.project
195210
echo " ghc-options: -Werror=missing-methods" >> cabal.project
196211
cat >> cabal.project <<EOF
197-
allow-newer: nothunks:bytestring
198-
allow-newer: nothunks:text
199-
allow-newer: ChasingBottoms:base
200212
EOF
201-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(binary|containers|unordered-containers)$/; }' >> cabal.project.local
213+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(binary|containers|unordered-containers)$/; }' >> cabal.project.local
202214
cat cabal.project
203215
cat cabal.project.local
204216
- name: dump install plan
205217
run: |
206218
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
207219
cabal-plan
208220
- name: restore cache
209-
uses: actions/cache/restore@v3
221+
uses: actions/cache/restore@v4
210222
with:
211223
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
212224
path: ~/.cabal/store
@@ -246,8 +258,8 @@ jobs:
246258
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='unordered-containers +debug' all
247259
$CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='unordered-containers +debug' all
248260
- name: save cache
249-
uses: actions/cache/save@v3
250261
if: always()
262+
uses: actions/cache/save@v4
251263
with:
252264
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
253265
path: ~/.cabal/store

cabal.haskell-ci

-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ constraint-set debug
1010
installed: -containers
1111
installed: -binary
1212

13-
-- Avoid HVR's PPA due to outage on 2022-04-27
14-
ghcup-jobs: True
15-
1613
-- With GHC < 9, haddock fails due to a parse error in the benchmarks.
1714
-- https://github.com/haskell-CI/haskell-ci/issues/605
1815
haddock: >= 9

unordered-containers.cabal

+7-5
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ cabal-version: >=1.10
2929
extra-source-files: CHANGES.md
3030

3131
tested-with:
32-
GHC ==9.8.1
33-
|| ==9.6.3
34-
|| ==9.4.7
32+
GHC ==9.12.2
33+
|| ==9.10.2
34+
|| ==9.8.4
35+
|| ==9.6.7
36+
|| ==9.4.8
3537
|| ==9.2.8
3638
|| ==9.0.2
3739
|| ==8.10.7
@@ -59,8 +61,8 @@ library
5961
build-depends:
6062
base >= 4.10 && < 5,
6163
deepseq >= 1.4.3,
62-
hashable >= 1.2.5 && < 1.5,
63-
template-haskell < 2.22
64+
hashable >= 1.2.5 && < 1.6,
65+
template-haskell < 2.24
6466

6567
default-language: Haskell2010
6668

0 commit comments

Comments
 (0)