Skip to content

Commit 6ab1fa7

Browse files
committed
Update CI configuration
1 parent 7faaca4 commit 6ab1fa7

File tree

3 files changed

+78
-61
lines changed

3 files changed

+78
-61
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 70 additions & 56 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.13.20220102
11+
# version: 0.19.20250115
1212
#
13-
# REGENDATA ("0.13.20220102",["github","cabal.project"])
13+
# REGENDATA ("0.19.20250115",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -19,15 +19,40 @@ on:
1919
jobs:
2020
linux:
2121
name: Haskell-CI - Linux - ${{ matrix.compiler }}
22-
runs-on: ubuntu-18.04
22+
runs-on: ubuntu-20.04
2323
timeout-minutes:
2424
60
2525
container:
26-
image: buildpack-deps:bionic
26+
image: buildpack-deps:jammy
2727
continue-on-error: ${{ matrix.allow-failure }}
2828
strategy:
2929
matrix:
3030
include:
31+
- compiler: ghc-9.12.1
32+
compilerKind: ghc
33+
compilerVersion: 9.12.1
34+
setup-method: ghcup
35+
allow-failure: false
36+
- compiler: ghc-9.10.1
37+
compilerKind: ghc
38+
compilerVersion: 9.10.1
39+
setup-method: ghcup
40+
allow-failure: false
41+
- compiler: ghc-9.8.4
42+
compilerKind: ghc
43+
compilerVersion: 9.8.4
44+
setup-method: ghcup
45+
allow-failure: false
46+
- compiler: ghc-9.6.6
47+
compilerKind: ghc
48+
compilerVersion: 9.6.6
49+
setup-method: ghcup
50+
allow-failure: false
51+
- compiler: ghc-9.4.8
52+
compilerKind: ghc
53+
compilerVersion: 9.4.8
54+
setup-method: ghcup
55+
allow-failure: false
3156
- compiler: ghc-9.2.1
3257
compilerKind: ghc
3358
compilerVersion: 9.2.1
@@ -36,64 +61,63 @@ jobs:
3661
- compiler: ghc-9.0.1
3762
compilerKind: ghc
3863
compilerVersion: 9.0.1
39-
setup-method: hvr-ppa
64+
setup-method: ghcup
4065
allow-failure: false
4166
- compiler: ghc-8.10.4
4267
compilerKind: ghc
4368
compilerVersion: 8.10.4
44-
setup-method: hvr-ppa
69+
setup-method: ghcup
4570
allow-failure: false
4671
- compiler: ghc-8.8.3
4772
compilerKind: ghc
4873
compilerVersion: 8.8.3
49-
setup-method: hvr-ppa
74+
setup-method: ghcup
5075
allow-failure: false
5176
- compiler: ghc-8.6.5
5277
compilerKind: ghc
5378
compilerVersion: 8.6.5
54-
setup-method: hvr-ppa
79+
setup-method: ghcup
5580
allow-failure: false
5681
- compiler: ghc-8.4.4
5782
compilerKind: ghc
5883
compilerVersion: 8.4.4
59-
setup-method: hvr-ppa
84+
setup-method: ghcup
6085
allow-failure: false
6186
- compiler: ghc-8.2.2
6287
compilerKind: ghc
6388
compilerVersion: 8.2.2
64-
setup-method: hvr-ppa
89+
setup-method: ghcup
6590
allow-failure: false
6691
- compiler: ghc-8.0.2
6792
compilerKind: ghc
6893
compilerVersion: 8.0.2
69-
setup-method: hvr-ppa
70-
allow-failure: false
71-
- compiler: ghc-7.10.3
72-
compilerKind: ghc
73-
compilerVersion: 7.10.3
74-
setup-method: hvr-ppa
94+
setup-method: ghcup
7595
allow-failure: false
7696
fail-fast: false
7797
steps:
78-
- name: apt
98+
- name: apt-get install
7999
run: |
80100
apt-get update
81-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
82-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
83-
mkdir -p "$HOME/.ghcup/bin"
84-
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
85-
chmod a+x "$HOME/.ghcup/bin/ghcup"
86-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
87-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
88-
else
89-
apt-add-repository -y 'ppa:hvr/ghc'
90-
apt-get update
91-
apt-get install -y "$HCNAME"
92-
mkdir -p "$HOME/.ghcup/bin"
93-
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
94-
chmod a+x "$HOME/.ghcup/bin/ghcup"
95-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
96-
fi
101+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
102+
- name: Install GHCup
103+
run: |
104+
mkdir -p "$HOME/.ghcup/bin"
105+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
106+
chmod a+x "$HOME/.ghcup/bin/ghcup"
107+
- name: Install cabal-install
108+
run: |
109+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
110+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
111+
- name: Install GHC (GHCup)
112+
if: matrix.setup-method == 'ghcup'
113+
run: |
114+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
115+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
116+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
117+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
118+
echo "HC=$HC" >> "$GITHUB_ENV"
119+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
120+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
97121
env:
98122
HCKIND: ${{ matrix.compilerKind }}
99123
HCNAME: ${{ matrix.compiler }}
@@ -104,28 +128,12 @@ jobs:
104128
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
105129
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
106130
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
107-
HCDIR=/opt/$HCKIND/$HCVER
108-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
109-
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
110-
echo "HC=$HC" >> "$GITHUB_ENV"
111-
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
112-
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
113-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
114-
else
115-
HC=$HCDIR/bin/$HCKIND
116-
echo "HC=$HC" >> "$GITHUB_ENV"
117-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
118-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
119-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
120-
fi
121-
122131
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
123132
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
124133
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
125134
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
126135
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
127136
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
128-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
129137
env:
130138
HCKIND: ${{ matrix.compilerKind }}
131139
HCNAME: ${{ matrix.compiler }}
@@ -168,14 +176,14 @@ jobs:
168176
- name: install cabal-plan
169177
run: |
170178
mkdir -p $HOME/.cabal/bin
171-
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
172-
echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
179+
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
180+
echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
173181
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
174182
rm -f cabal-plan.xz
175183
chmod a+x $HOME/.cabal/bin/cabal-plan
176184
cabal-plan --version
177185
- name: checkout
178-
uses: actions/checkout@v2
186+
uses: actions/checkout@v4
179187
with:
180188
path: source
181189
- name: initial cabal.project for sdist
@@ -209,15 +217,15 @@ jobs:
209217
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
210218
cat >> cabal.project <<EOF
211219
EOF
212-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(ghc-dump-core|ghc-dump-util)$/; }' >> cabal.project.local
220+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(ghc-dump-core|ghc-dump-util)$/; }' >> cabal.project.local
213221
cat cabal.project
214222
cat cabal.project.local
215223
- name: dump install plan
216224
run: |
217225
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
218226
cabal-plan
219-
- name: cache
220-
uses: actions/cache@v2
227+
- name: restore cache
228+
uses: actions/cache/restore@v4
221229
with:
222230
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
223231
path: ~/.cabal/store
@@ -240,8 +248,14 @@ jobs:
240248
${CABAL} -vnormal check
241249
- name: haddock
242250
run: |
243-
$CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
251+
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
244252
- name: unconstrained build
245253
run: |
246254
rm -f cabal.project.local
247255
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
256+
- name: save cache
257+
if: always()
258+
uses: actions/cache/save@v4
259+
with:
260+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
261+
path: ~/.cabal/store

ghc-dump-core/ghc-dump-core.cabal

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,14 @@ author: Ben Gamari
2727
maintainer: [email protected]
2828
copyright: (c) 2017 Ben Gamari
2929
category: Development
30-
tested-with: GHC==7.10.3,
31-
GHC==8.0.2,
30+
tested-with: GHC==8.0.2,
3231
GHC==8.2.2,
3332
GHC==8.4.4,
3433
GHC==8.6.5,
3534
GHC==8.8.3,
3635
GHC==8.10.4,
3736
GHC==9.0.1,
38-
GHC==9.2.8,
37+
GHC==9.2.1,
3938
GHC==9.4.8,
4039
GHC==9.6.6,
4140
GHC==9.8.4,

ghc-dump-util/ghc-dump-util.cabal

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,19 @@ maintainer: [email protected]
1919
copyright: (c) 2017 Ben Gamari
2020
category: Development
2121
build-type: Simple
22-
tested-with: GHC==7.10.3,
23-
GHC==8.0.2,
22+
tested-with: GHC==8.0.2,
2423
GHC==8.2.2,
2524
GHC==8.4.4,
2625
GHC==8.6.5,
2726
GHC==8.8.3,
2827
GHC==8.10.4,
2928
GHC==9.0.1,
3029
GHC==9.2.1,
30+
GHC==9.4.8,
31+
GHC==9.6.6,
32+
GHC==9.8.4,
33+
GHC==9.10.1,
34+
GHC==9.12.1
3135

3236
source-repository head
3337
type: git

0 commit comments

Comments
 (0)