Skip to content

Commit 3afd740

Browse files
committed
Support GHC-9.12
1 parent a6a6dbb commit 3afd740

File tree

3 files changed

+52
-59
lines changed

3 files changed

+52
-59
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 46 additions & 55 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.19.20240513
11+
# version: 0.19.20250104
1212
#
13-
# REGENDATA ("0.19.20240513",["github","--config=cabal.haskell-ci","--benchmarks-jobs=<9.0","cabal.project"])
13+
# REGENDATA ("0.19.20250104",["github","--config=cabal.haskell-ci","--benchmarks-jobs=<9.0","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -28,29 +28,34 @@ jobs:
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
3136
- compiler: ghc-9.10.1
3237
compilerKind: ghc
3338
compilerVersion: 9.10.1
3439
setup-method: ghcup
3540
allow-failure: false
36-
- compiler: ghc-9.8.2
41+
- compiler: ghc-9.8.4
3742
compilerKind: ghc
38-
compilerVersion: 9.8.2
43+
compilerVersion: 9.8.4
3944
setup-method: ghcup
4045
allow-failure: false
41-
- compiler: ghc-9.6.5
46+
- compiler: ghc-9.6.6
4247
compilerKind: ghc
43-
compilerVersion: 9.6.5
48+
compilerVersion: 9.6.6
4449
setup-method: ghcup
4550
allow-failure: false
46-
- compiler: ghc-9.4.8
51+
- compiler: ghc-9.4.4
4752
compilerKind: ghc
48-
compilerVersion: 9.4.8
53+
compilerVersion: 9.4.4
4954
setup-method: ghcup
5055
allow-failure: false
51-
- compiler: ghc-9.2.8
56+
- compiler: ghc-9.2.7
5257
compilerKind: ghc
53-
compilerVersion: 9.2.8
58+
compilerVersion: 9.2.7
5459
setup-method: ghcup
5560
allow-failure: false
5661
- compiler: ghc-9.0.2
@@ -66,49 +71,53 @@ jobs:
6671
- compiler: ghc-8.8.4
6772
compilerKind: ghc
6873
compilerVersion: 8.8.4
69-
setup-method: hvr-ppa
74+
setup-method: ghcup
7075
allow-failure: false
7176
- compiler: ghc-8.6.5
7277
compilerKind: ghc
7378
compilerVersion: 8.6.5
74-
setup-method: hvr-ppa
79+
setup-method: ghcup
7580
allow-failure: false
7681
- compiler: ghc-8.4.4
7782
compilerKind: ghc
7883
compilerVersion: 8.4.4
79-
setup-method: hvr-ppa
84+
setup-method: ghcup
8085
allow-failure: false
8186
- compiler: ghc-8.2.2
8287
compilerKind: ghc
8388
compilerVersion: 8.2.2
84-
setup-method: hvr-ppa
89+
setup-method: ghcup
8590
allow-failure: false
8691
- compiler: ghc-8.0.2
8792
compilerKind: ghc
8893
compilerVersion: 8.0.2
89-
setup-method: hvr-ppa
94+
setup-method: ghcup
9095
allow-failure: false
9196
fail-fast: false
9297
steps:
93-
- name: apt
98+
- name: apt-get install
9499
run: |
95100
apt-get update
96-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
97-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
98-
mkdir -p "$HOME/.ghcup/bin"
99-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
100-
chmod a+x "$HOME/.ghcup/bin/ghcup"
101-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
102-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
103-
else
104-
apt-add-repository -y 'ppa:hvr/ghc'
105-
apt-get update
106-
apt-get install -y "$HCNAME"
107-
mkdir -p "$HOME/.ghcup/bin"
108-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
109-
chmod a+x "$HOME/.ghcup/bin/ghcup"
110-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
111-
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.14.1.1 || (cat "$HOME"/.ghcup/logs/*.* && false)
110+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1 -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"
112121
env:
113122
HCKIND: ${{ matrix.compilerKind }}
114123
HCNAME: ${{ matrix.compiler }}
@@ -119,30 +128,12 @@ jobs:
119128
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
120129
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
121130
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
122-
HCDIR=/opt/$HCKIND/$HCVER
123-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
124-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
125-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
126-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
127-
echo "HC=$HC" >> "$GITHUB_ENV"
128-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
129-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
130-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
131-
else
132-
HC=$HCDIR/bin/$HCKIND
133-
echo "HC=$HC" >> "$GITHUB_ENV"
134-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
135-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
136-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
137-
fi
138-
139131
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
140132
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
141133
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
142134
if [ $((HCNUMVER < 90000)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" ; else echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV" ; fi
143135
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
144136
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
145-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
146137
env:
147138
HCKIND: ${{ matrix.compilerKind }}
148139
HCNAME: ${{ matrix.compiler }}
@@ -185,7 +176,7 @@ jobs:
185176
- name: cache (tools)
186177
uses: actions/cache/restore@v4
187178
with:
188-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-53a0204c
179+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-1e18572f
189180
path: ~/.haskell-ci-tools
190181
- name: install cabal-plan
191182
run: |
@@ -201,10 +192,10 @@ jobs:
201192
if [ $((HCNUMVER < 90000)) -ne 0 ] ; then $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.22.0' ; fi
202193
if [ $((HCNUMVER < 90000)) -ne 0 ] ; then doctest --version ; fi
203194
- name: save cache (tools)
204-
uses: actions/cache/save@v4
205195
if: always()
196+
uses: actions/cache/save@v4
206197
with:
207-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-53a0204c
198+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-1e18572f
208199
path: ~/.haskell-ci-tools
209200
- name: checkout
210201
uses: actions/checkout@v4
@@ -241,7 +232,7 @@ jobs:
241232
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
242233
cat >> cabal.project <<EOF
243234
EOF
244-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(generics-sop|sop-core)$/; }' >> cabal.project.local
235+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(generics-sop|sop-core)$/; }' >> cabal.project.local
245236
cat cabal.project
246237
cat cabal.project.local
247238
- name: dump install plan
@@ -287,8 +278,8 @@ jobs:
287278
rm -f cabal.project.local
288279
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
289280
- name: save cache
290-
uses: actions/cache/save@v4
291281
if: always()
282+
uses: actions/cache/save@v4
292283
with:
293284
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
294285
path: ~/.cabal/store

generics-sop/generics-sop.cabal

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: generics-sop
22
version: 0.5.1.4
3+
x-revision: 2
34
synopsis: Generic Programming using True Sums of Products
45
description:
56
A library to support the definition of generic functions.
@@ -42,7 +43,7 @@ category: Generics
4243
build-type: Simple
4344
cabal-version: >=1.10
4445
extra-source-files: CHANGELOG.md doctest.sh
45-
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.8, GHC == 9.4.8, GHC == 9.6.5, GHC == 9.8.2, GHC == 9.10.1
46+
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.7, GHC == 9.4.4, GHC == 9.6.6, GHC == 9.8.4, GHC == 9.10.1, GHC == 9.12.1
4647

4748
source-repository head
4849
type: git
@@ -65,7 +66,7 @@ library
6566
Generics.SOP.NP
6667
Generics.SOP.NS
6768
Generics.SOP.Sing
68-
build-depends: base >= 4.9 && < 4.21,
69+
build-depends: base >= 4.9 && < 4.22,
6970
sop-core == 0.5.0.*,
7071
template-haskell >= 2.8 && < 2.23,
7172
th-abstraction >= 0.6 && < 0.8,

sop-core/sop-core.cabal

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: sop-core
22
version: 0.5.0.2
3+
x-revision: 5
34
synopsis: True Sums of Products
45
description:
56
Implementation of n-ary sums and n-ary products.
@@ -25,7 +26,7 @@ category: Data
2526
build-type: Simple
2627
cabal-version: >=1.10
2728
extra-source-files: CHANGELOG.md doctest.sh
28-
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.8, GHC == 9.4.8, GHC == 9.6.5, GHC == 9.8.2, GHC == 9.10.1
29+
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.7, GHC == 9.4.4, GHC == 9.6.6, GHC == 9.8.4, GHC == 9.10.1, GHC == 9.12.1
2930

3031
source-repository head
3132
type: git
@@ -41,7 +42,7 @@ library
4142
Data.SOP.NP
4243
Data.SOP.NS
4344
Data.SOP.Sing
44-
build-depends: base >= 4.9 && < 4.21,
45+
build-depends: base >= 4.9 && < 4.22,
4546
deepseq >= 1.3 && < 1.6
4647
hs-source-dirs: src
4748
default-language: Haskell2010

0 commit comments

Comments
 (0)