Skip to content

Commit 66a4e33

Browse files
committed
Update CI
1 parent 3474c75 commit 66a4e33

2 files changed

Lines changed: 56 additions & 39 deletions

File tree

.github/workflows/haskell-ci.yml

Lines changed: 54 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.15.20221107
11+
# version: 0.19.20250506
1212
#
13-
# REGENDATA ("0.15.20221107",["github","--config=cabal.haskell-ci","resource-pool.cabal"])
13+
# REGENDATA ("0.19.20250506",["github","--config=cabal.haskell-ci","resource-pool.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -23,61 +23,80 @@ 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.4.3
35+
- compiler: ghc-9.12.1
3636
compilerKind: ghc
37-
compilerVersion: 9.4.3
37+
compilerVersion: 9.12.1
3838
setup-method: ghcup
3939
allow-failure: false
40-
- compiler: ghc-9.2.5
40+
- compiler: ghc-9.10.2
4141
compilerKind: ghc
42-
compilerVersion: 9.2.5
42+
compilerVersion: 9.10.2
4343
setup-method: ghcup
4444
allow-failure: false
45-
- compiler: ghc-9.0.2
45+
- compiler: ghc-9.8.4
4646
compilerKind: ghc
47-
compilerVersion: 9.0.2
47+
compilerVersion: 9.8.4
4848
setup-method: ghcup
4949
allow-failure: false
50-
- compiler: ghc-8.10.7
50+
- compiler: ghc-9.6.7
5151
compilerKind: ghc
52-
compilerVersion: 8.10.7
52+
compilerVersion: 9.6.7
5353
setup-method: ghcup
5454
allow-failure: false
55-
- compiler: ghc-8.8.4
55+
- compiler: ghc-9.4.8
5656
compilerKind: ghc
57-
compilerVersion: 8.8.4
57+
compilerVersion: 9.4.8
5858
setup-method: ghcup
5959
allow-failure: false
60-
- compiler: ghc-8.6.5
60+
- compiler: ghc-9.2.8
6161
compilerKind: ghc
62-
compilerVersion: 8.6.5
62+
compilerVersion: 9.2.8
6363
setup-method: ghcup
6464
allow-failure: false
65-
- compiler: ghc-8.4.4
65+
- compiler: ghc-9.0.2
6666
compilerKind: ghc
67-
compilerVersion: 8.4.4
67+
compilerVersion: 9.0.2
68+
setup-method: ghcup
69+
allow-failure: false
70+
- compiler: ghc-8.10.7
71+
compilerKind: ghc
72+
compilerVersion: 8.10.7
6873
setup-method: ghcup
6974
allow-failure: false
7075
fail-fast: false
7176
steps:
72-
- name: apt
77+
- name: apt-get install
7378
run: |
7479
apt-get update
75-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
80+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
81+
- name: Install GHCup
82+
run: |
7683
mkdir -p "$HOME/.ghcup/bin"
77-
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
84+
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
7885
chmod a+x "$HOME/.ghcup/bin/ghcup"
86+
- name: Install cabal-install
87+
run: |
88+
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
89+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
90+
- name: Install GHC (GHCup)
91+
if: matrix.setup-method == 'ghcup'
92+
run: |
7993
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
80-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
94+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
95+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
96+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
97+
echo "HC=$HC" >> "$GITHUB_ENV"
98+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
99+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
81100
env:
82101
HCKIND: ${{ matrix.compilerKind }}
83102
HCNAME: ${{ matrix.compiler }}
@@ -88,19 +107,12 @@ jobs:
88107
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
89108
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
90109
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
91-
HCDIR=/opt/$HCKIND/$HCVER
92-
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
93-
echo "HC=$HC" >> "$GITHUB_ENV"
94-
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
95-
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
96-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
97110
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
98111
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
99112
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
100113
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
101114
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
102115
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
103-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
104116
env:
105117
HCKIND: ${{ matrix.compilerKind }}
106118
HCNAME: ${{ matrix.compiler }}
@@ -143,14 +155,14 @@ jobs:
143155
- name: install cabal-plan
144156
run: |
145157
mkdir -p $HOME/.cabal/bin
146-
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
147-
echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
158+
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3.0/cabal-plan-0.7.3.0-x86_64-linux.xz > cabal-plan.xz
159+
echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
148160
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
149161
rm -f cabal-plan.xz
150162
chmod a+x $HOME/.cabal/bin/cabal-plan
151163
cabal-plan --version
152164
- name: checkout
153-
uses: actions/checkout@v2
165+
uses: actions/checkout@v4
154166
with:
155167
path: source
156168
- name: initial cabal.project for sdist
@@ -178,15 +190,15 @@ jobs:
178190
echo " ghc-options: -Werror=missing-methods" >> cabal.project
179191
cat >> cabal.project <<EOF
180192
EOF
181-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(resource-pool)$/; }' >> cabal.project.local
193+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(resource-pool)$/; }' >> cabal.project.local
182194
cat cabal.project
183195
cat cabal.project.local
184196
- name: dump install plan
185197
run: |
186198
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
187199
cabal-plan
188-
- name: cache
189-
uses: actions/cache@v2
200+
- name: restore cache
201+
uses: actions/cache/restore@v4
190202
with:
191203
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
192204
path: ~/.cabal/store
@@ -207,8 +219,14 @@ jobs:
207219
${CABAL} -vnormal check
208220
- name: haddock
209221
run: |
210-
$CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
222+
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
211223
- name: unconstrained build
212224
run: |
213225
rm -f cabal.project.local
214226
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
227+
- name: save cache
228+
if: always()
229+
uses: actions/cache/save@v4
230+
with:
231+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
232+
path: ~/.cabal/store

resource-pool.cabal

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cabal-version: 2.4
1+
cabal-version: 3.0
22
build-type: Simple
33
name: resource-pool
44
version: 0.4.0.0
@@ -14,8 +14,7 @@ description: A high-performance striped pooling abstraction for managing
1414
flexibly-sized collections of resources such as database
1515
connections.
1616

17-
tested-with: GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.5
18-
|| ==9.4.3
17+
tested-with: GHC == { 8.10.7, 9.0.2, 9.2.8, 9.4.8, 9.6.7, 9.8.4, 9.10.2, 9.12.1 }
1918

2019
extra-doc-files:
2120
CHANGELOG.md

0 commit comments

Comments
 (0)