Skip to content

Commit 2168f61

Browse files
authored
Merge pull request #105 from BinderDavid/support-ghc-9.10
Add GHC 9.10.1 to the versions tested in CI
2 parents cce6a35 + 16f6951 commit 2168f61

File tree

2 files changed

+32
-45
lines changed

2 files changed

+32
-45
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 30 additions & 44 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.17.20231203
11+
# version: 0.19.20240608
1212
#
13-
# REGENDATA ("0.17.20231203",["github","ghc-events.cabal"])
13+
# REGENDATA ("0.19.20240608",["github","ghc-events.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -23,11 +23,16 @@ jobs:
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.10.1
32+
compilerKind: ghc
33+
compilerVersion: 9.10.1
34+
setup-method: ghcup
35+
allow-failure: false
3136
- compiler: ghc-9.8.1
3237
compilerKind: ghc
3338
compilerVersion: 9.8.1
@@ -61,49 +66,39 @@ jobs:
6166
- compiler: ghc-8.8.4
6267
compilerKind: ghc
6368
compilerVersion: 8.8.4
64-
setup-method: hvr-ppa
69+
setup-method: ghcup
6570
allow-failure: false
6671
- compiler: ghc-8.6.5
6772
compilerKind: ghc
6873
compilerVersion: 8.6.5
69-
setup-method: hvr-ppa
74+
setup-method: ghcup
7075
allow-failure: false
7176
- compiler: ghc-8.4.4
7277
compilerKind: ghc
7378
compilerVersion: 8.4.4
74-
setup-method: hvr-ppa
79+
setup-method: ghcup
7580
allow-failure: false
7681
- compiler: ghc-8.2.2
7782
compilerKind: ghc
7883
compilerVersion: 8.2.2
79-
setup-method: hvr-ppa
84+
setup-method: ghcup
8085
allow-failure: false
8186
- compiler: ghc-8.0.2
8287
compilerKind: ghc
8388
compilerVersion: 8.0.2
84-
setup-method: hvr-ppa
89+
setup-method: ghcup
8590
allow-failure: false
8691
fail-fast: false
8792
steps:
8893
- name: apt
8994
run: |
9095
apt-get update
91-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
92-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
93-
mkdir -p "$HOME/.ghcup/bin"
94-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
95-
chmod a+x "$HOME/.ghcup/bin/ghcup"
96-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
97-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
98-
else
99-
apt-add-repository -y 'ppa:hvr/ghc'
100-
apt-get update
101-
apt-get install -y "$HCNAME"
102-
mkdir -p "$HOME/.ghcup/bin"
103-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
104-
chmod a+x "$HOME/.ghcup/bin/ghcup"
105-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
106-
fi
96+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
97+
mkdir -p "$HOME/.ghcup/bin"
98+
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
99+
chmod a+x "$HOME/.ghcup/bin/ghcup"
100+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
101+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
107102
env:
108103
HCKIND: ${{ matrix.compilerKind }}
109104
HCNAME: ${{ matrix.compiler }}
@@ -115,22 +110,13 @@ jobs:
115110
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
116111
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
117112
HCDIR=/opt/$HCKIND/$HCVER
118-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
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"
125-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
126-
else
127-
HC=$HCDIR/bin/$HCKIND
128-
echo "HC=$HC" >> "$GITHUB_ENV"
129-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
130-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
131-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
132-
fi
133-
113+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
114+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
115+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
116+
echo "HC=$HC" >> "$GITHUB_ENV"
117+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
118+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
119+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
134120
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
135121
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
136122
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -187,7 +173,7 @@ jobs:
187173
chmod a+x $HOME/.cabal/bin/cabal-plan
188174
cabal-plan --version
189175
- name: checkout
190-
uses: actions/checkout@v3
176+
uses: actions/checkout@v4
191177
with:
192178
path: source
193179
- name: initial cabal.project for sdist
@@ -215,15 +201,15 @@ jobs:
215201
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
216202
cat >> cabal.project <<EOF
217203
EOF
218-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(ghc-events)$/; }' >> cabal.project.local
204+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(ghc-events)$/; }' >> cabal.project.local
219205
cat cabal.project
220206
cat cabal.project.local
221207
- name: dump install plan
222208
run: |
223209
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
224210
cabal-plan
225211
- name: restore cache
226-
uses: actions/cache/restore@v3
212+
uses: actions/cache/restore@v4
227213
with:
228214
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
229215
path: ~/.cabal/store
@@ -253,7 +239,7 @@ jobs:
253239
rm -f cabal.project.local
254240
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
255241
- name: save cache
256-
uses: actions/cache/save@v3
242+
uses: actions/cache/save@v4
257243
if: always()
258244
with:
259245
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

ghc-events.cabal

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ tested-with: GHC == 8.0.2
3232
GHC == 9.4.2
3333
GHC == 9.6.1
3434
GHC == 9.8.1
35+
GHC == 9.10.1
3536
extra-source-files: include/EventLogFormat.h
3637
test/*.eventlog
3738
test/*.reference
@@ -54,7 +55,7 @@ common default
5455

5556
library
5657
import: default
57-
build-depends: base >= 4.7 && < 4.20,
58+
build-depends: base >= 4.7 && < 4.21,
5859
containers >= 0.5 && < 0.8,
5960
binary >= 0.7 && < 0.11,
6061
bytestring >= 0.10.4,

0 commit comments

Comments
 (0)