Skip to content

Commit bee9880

Browse files
ci: add GHC 9.14 to matrix
1 parent 6cd0b6f commit bee9880

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ jobs:
2828
strategy:
2929
matrix:
3030
include:
31+
- compiler: ghc-9.14.0.20250819
32+
compilerKind: ghc
33+
compilerVersion: 9.14.0.20250819
34+
setup-method: ghcup-prerelease
35+
allow-failure: false
3136
- compiler: ghc-9.12.2
3237
compilerKind: ghc
3338
compilerVersion: 9.12.2
@@ -78,6 +83,21 @@ jobs:
7883
HCKIND: ${{ matrix.compilerKind }}
7984
HCNAME: ${{ matrix.compiler }}
8085
HCVER: ${{ matrix.compilerVersion }}
86+
- name: Install GHC (GHCup prerelease)
87+
if: matrix.setup-method == 'ghcup-prerelease'
88+
run: |
89+
"$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases
90+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
91+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
92+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
93+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
94+
echo "HC=$HC" >> "$GITHUB_ENV"
95+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
96+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
97+
env:
98+
HCKIND: ${{ matrix.compilerKind }}
99+
HCNAME: ${{ matrix.compiler }}
100+
HCVER: ${{ matrix.compilerVersion }}
81101
- name: Set PATH and environment variables
82102
run: |
83103
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
@@ -88,7 +108,7 @@ jobs:
88108
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
89109
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
90110
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
91-
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
111+
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
92112
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
93113
env:
94114
HCKIND: ${{ matrix.compilerKind }}
@@ -116,6 +136,18 @@ jobs:
116136
repository hackage.haskell.org
117137
url: http://hackage.haskell.org/
118138
EOF
139+
if $HEADHACKAGE; then
140+
cat >> $CABAL_CONFIG <<EOF
141+
repository head.hackage.ghc.haskell.org
142+
url: https://ghc.gitlab.haskell.org/head.hackage/
143+
secure: True
144+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
145+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
146+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
147+
key-threshold: 3
148+
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
149+
EOF
150+
fi
119151
cat >> $CABAL_CONFIG <<EOF
120152
program-default-options
121153
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -171,6 +203,9 @@ jobs:
171203
echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project
172204
cat >> cabal.project <<EOF
173205
EOF
206+
if $HEADHACKAGE; then
207+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
208+
fi
174209
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(purebred)$/; }' >> cabal.project.local
175210
cat cabal.project
176211
cat cabal.project.local

purebred.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extra-source-files:
3838
configs/aliases
3939

4040
tested-with:
41-
GHC ==9.6.7 || ==9.8.4 || ==9.10.2 || ==9.12.2
41+
GHC ==9.6.7 || ==9.8.4 || ==9.10.2 || ==9.12.2 || ==9.14.1
4242

4343
source-repository head
4444
type: git

0 commit comments

Comments
 (0)