Skip to content

Commit 2ec5933

Browse files
committed
CI: Add ghc 9.12 to tbe build matix
1 parent 6767092 commit 2ec5933

File tree

7 files changed

+47
-17
lines changed

7 files changed

+47
-17
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 41 additions & 17 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.20240514
11+
# version: 0.19.20241121
1212
#
13-
# REGENDATA ("0.19.20240514",["github","cabal.project"])
13+
# REGENDATA ("0.19.20241121",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -32,6 +32,11 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35+
- compiler: ghc-9.12.0.20241114
36+
compilerKind: ghc
37+
compilerVersion: 9.12.0.20241114
38+
setup-method: ghcup-prerelease
39+
allow-failure: false
3540
- compiler: ghc-9.10.1
3641
compilerKind: ghc
3742
compilerVersion: 9.10.1
@@ -79,40 +84,60 @@ jobs:
7984
allow-failure: false
8085
fail-fast: false
8186
steps:
82-
- name: apt
87+
- name: apt-get install
8388
run: |
8489
apt-get update
8590
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
91+
- name: Install GHCup
92+
run: |
8693
mkdir -p "$HOME/.ghcup/bin"
87-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
94+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
8895
chmod a+x "$HOME/.ghcup/bin/ghcup"
96+
- name: Install cabal-install
97+
run: |
98+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
99+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
100+
- name: Install GHC (GHCup)
101+
if: matrix.setup-method == 'ghcup'
102+
run: |
89103
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
90-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
104+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
105+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
106+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
107+
echo "HC=$HC" >> "$GITHUB_ENV"
108+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
109+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
91110
env:
92111
HCKIND: ${{ matrix.compilerKind }}
93112
HCNAME: ${{ matrix.compiler }}
94113
HCVER: ${{ matrix.compilerVersion }}
95-
- name: Set PATH and environment variables
114+
- name: Install GHC (GHCup prerelease)
115+
if: matrix.setup-method == 'ghcup-prerelease'
96116
run: |
97-
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
98-
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
99-
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
100-
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
101-
HCDIR=/opt/$HCKIND/$HCVER
117+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
118+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
102119
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
103120
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
104121
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
105122
echo "HC=$HC" >> "$GITHUB_ENV"
106123
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
107124
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
108-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
125+
env:
126+
HCKIND: ${{ matrix.compilerKind }}
127+
HCNAME: ${{ matrix.compiler }}
128+
HCVER: ${{ matrix.compilerVersion }}
129+
- name: Set PATH and environment variables
130+
run: |
131+
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
132+
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
133+
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
134+
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
109135
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
110136
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
111137
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
112138
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
113139
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
114140
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
115-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
116141
env:
117142
HCKIND: ${{ matrix.compilerKind }}
118143
HCNAME: ${{ matrix.compiler }}
@@ -164,8 +189,8 @@ jobs:
164189
- name: install cabal-docspec
165190
run: |
166191
mkdir -p $HOME/.cabal/bin
167-
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240414/cabal-docspec-0.0.0.20240414-x86_64-linux.xz > cabal-docspec.xz
168-
echo '2d18a3f79619e8ec5f11870f926f6dc2616e02a6c889315b7f82044b95a1adb9 cabal-docspec.xz' | sha256sum -c -
192+
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240703/cabal-docspec-0.0.0.20240703-x86_64-linux.xz > cabal-docspec.xz
193+
echo '48bf3b7fd2f7f0caa6162afee57a755be8523e7f467b694900eb420f5f9a7b76 cabal-docspec.xz' | sha256sum -c -
169194
xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
170195
rm -f cabal-docspec.xz
171196
chmod a+x $HOME/.cabal/bin/cabal-docspec
@@ -228,7 +253,6 @@ jobs:
228253
echo "package aeson-benchmarks" >> cabal.project
229254
echo " ghc-options: -Werror=missing-methods" >> cabal.project
230255
cat >> cabal.project <<EOF
231-
allow-newer: hermes-json:attoparsec-iso8601
232256
EOF
233257
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(aeson|aeson-benchmarks|aeson-examples|attoparsec-aeson|attoparsec-iso8601|text-iso8601)$/; }' >> cabal.project.local
234258
cat cabal.project
@@ -279,8 +303,8 @@ jobs:
279303
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='aeson +ordered-keymap' all
280304
$CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='aeson +ordered-keymap' all
281305
- name: save cache
282-
uses: actions/cache/save@v4
283306
if: always()
307+
uses: actions/cache/save@v4
284308
with:
285309
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
286310
path: ~/.cabal/store

aeson.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ tested-with:
2222
|| ==9.6.5
2323
|| ==9.8.2
2424
|| ==9.10.1
25+
|| ==9.12.1
2526

2627
synopsis: Fast JSON parsing and encoding
2728
homepage: https://github.com/haskell/aeson

attoparsec-aeson/attoparsec-aeson.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ tested-with:
2828
|| ==9.6.5
2929
|| ==9.8.2
3030
|| ==9.10.1
31+
|| ==9.12.1
3132

3233
library
3334
hs-source-dirs: src

attoparsec-iso8601/attoparsec-iso8601.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ tested-with:
2626
|| ==9.6.5
2727
|| ==9.8.2
2828
|| ==9.10.1
29+
|| ==9.12.1
2930

3031
extra-source-files:
3132
changelog.md

benchmarks/aeson-benchmarks.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ tested-with:
1212
|| ==9.6.5
1313
|| ==9.8.2
1414
|| ==9.10.1
15+
|| ==9.12.1
1516

1617
flag tasty-bench
1718
description: Use tasty-bench, otherwise criterion

examples/aeson-examples.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ tested-with:
1818
|| ==9.6.5
1919
|| ==9.8.2
2020
|| ==9.10.1
21+
|| ==9.12.1
2122

2223
library twitter-generic
2324
default-language: Haskell2010

text-iso8601/text-iso8601.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ tested-with:
2727
|| ==9.6.5
2828
|| ==9.8.2
2929
|| ==9.10.1
30+
|| ==9.12.1
3031

3132
extra-source-files: changelog.md
3233

0 commit comments

Comments
 (0)