Skip to content

Commit a1af2eb

Browse files
Merge pull request #36 from ncaq/ghc-9.12
fix: allow GHC 9.12 of compiler and library versions
2 parents 505ffe4 + 327ad99 commit a1af2eb

File tree

2 files changed

+28
-18
lines changed

2 files changed

+28
-18
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 26 additions & 16 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.20250115
1212
#
13-
# REGENDATA ("0.19.20240513",["github","tasty-hspec.cabal"])
13+
# REGENDATA ("0.19.20250115",["github","tasty-hspec.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -28,6 +28,11 @@ 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
@@ -45,15 +50,29 @@ jobs:
4550
allow-failure: false
4651
fail-fast: false
4752
steps:
48-
- name: apt
53+
- name: apt-get install
4954
run: |
5055
apt-get update
5156
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
57+
- name: Install GHCup
58+
run: |
5259
mkdir -p "$HOME/.ghcup/bin"
53-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
60+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
5461
chmod a+x "$HOME/.ghcup/bin/ghcup"
62+
- name: Install cabal-install
63+
run: |
64+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
65+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
66+
- name: Install GHC (GHCup)
67+
if: matrix.setup-method == 'ghcup'
68+
run: |
5569
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
56-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
70+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
71+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
72+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
73+
echo "HC=$HC" >> "$GITHUB_ENV"
74+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
75+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
5776
env:
5877
HCKIND: ${{ matrix.compilerKind }}
5978
HCNAME: ${{ matrix.compiler }}
@@ -64,21 +83,12 @@ jobs:
6483
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
6584
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
6685
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
67-
HCDIR=/opt/$HCKIND/$HCVER
68-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
69-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
70-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
71-
echo "HC=$HC" >> "$GITHUB_ENV"
72-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
73-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
74-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
7586
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
7687
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
7788
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
7889
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
7990
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
8091
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
81-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
8292
env:
8393
HCKIND: ${{ matrix.compilerKind }}
8494
HCNAME: ${{ matrix.compiler }}
@@ -156,7 +166,7 @@ jobs:
156166
echo " ghc-options: -Werror=missing-methods" >> cabal.project
157167
cat >> cabal.project <<EOF
158168
EOF
159-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(tasty-hspec)$/; }' >> cabal.project.local
169+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(tasty-hspec)$/; }' >> cabal.project.local
160170
cat cabal.project
161171
cat cabal.project.local
162172
- name: dump install plan
@@ -191,8 +201,8 @@ jobs:
191201
rm -f cabal.project.local
192202
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
193203
- name: save cache
194-
uses: actions/cache/save@v4
195204
if: always()
205+
uses: actions/cache/save@v4
196206
with:
197207
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
198208
path: ~/.cabal/store

tasty-hspec.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ license: BSD-3-Clause
1010
maintainer: Mitchell Dalvi Rosen <[email protected]>
1111
name: tasty-hspec
1212
synopsis: Hspec support for the Tasty test framework.
13-
tested-with: GHC == 9.6.5, GHC == 9.8.2, GHC == 9.10.1
13+
tested-with: GHC == 9.6.5, GHC == 9.8.2, GHC == 9.10.1, GHC == 9.12.1
1414
version: 1.2.0.4
1515
x-revision: 5
1616

@@ -28,7 +28,7 @@ source-repository head
2828

2929
library
3030
build-depends:
31-
base ^>= 4.11 || ^>= 4.12 || ^>= 4.13 || ^>= 4.14 || ^>= 4.15 || ^>= 4.16 || ^>= 4.17 || ^>= 4.18 || ^>= 4.19 || ^>= 4.20,
31+
base ^>= 4.11 || ^>= 4.12 || ^>= 4.13 || ^>= 4.14 || ^>= 4.15 || ^>= 4.16 || ^>= 4.17 || ^>= 4.18 || ^>= 4.19 || ^>= 4.20 || ^>= 4.21,
3232
hspec ^>= 2.11.0,
3333
hspec-api ^>= 2.11.0,
3434
hspec-core ^>= 2.11.0,

0 commit comments

Comments
 (0)