Skip to content

Commit a71ddec

Browse files
committed
Bump CI to GHC 9.12.1
1 parent 415e474 commit a71ddec

File tree

4 files changed

+57
-40
lines changed

4 files changed

+57
-40
lines changed

.github/workflows/haskell-ci.yml

+44-29
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/andreasabel/haskell-ci
1010
#
11-
# version: 0.19.20240703
11+
# version: 0.19.20241219
1212
#
13-
# REGENDATA ("0.19.20240703",["--config=cabal.haskell-ci","github","cabal.project"])
13+
# REGENDATA ("0.19.20241219",["--config=cabal.haskell-ci","github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -32,14 +32,19 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35+
- compiler: ghc-9.12.1
36+
compilerKind: ghc
37+
compilerVersion: 9.12.1
38+
setup-method: ghcup
39+
allow-failure: false
3540
- compiler: ghc-9.10.1
3641
compilerKind: ghc
3742
compilerVersion: 9.10.1
3843
setup-method: ghcup
3944
allow-failure: false
40-
- compiler: ghc-9.8.2
45+
- compiler: ghc-9.8.4
4146
compilerKind: ghc
42-
compilerVersion: 9.8.2
47+
compilerVersion: 9.8.4
4348
setup-method: ghcup
4449
allow-failure: false
4550
- compiler: ghc-9.6.6
@@ -89,15 +94,30 @@ jobs:
8994
allow-failure: false
9095
fail-fast: false
9196
steps:
92-
- name: apt
97+
- name: apt-get install
9398
run: |
9499
apt-get update
95100
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
101+
- name: Install GHCup
102+
run: |
96103
mkdir -p "$HOME/.ghcup/bin"
97-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
104+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
98105
chmod a+x "$HOME/.ghcup/bin/ghcup"
106+
- name: Install cabal-install (prerelease)
107+
run: |
108+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
109+
"$HOME/.ghcup/bin/ghcup" install cabal 3.15.0.0.2024.10.3 || (cat "$HOME"/.ghcup/logs/*.* && false)
110+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.15.0.0.2024.10.3 -vnormal+nowrap" >> "$GITHUB_ENV"
111+
- name: Install GHC (GHCup)
112+
if: matrix.setup-method == 'ghcup'
113+
run: |
99114
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
100-
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (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"
101121
env:
102122
HCKIND: ${{ matrix.compilerKind }}
103123
HCNAME: ${{ matrix.compiler }}
@@ -108,21 +128,12 @@ jobs:
108128
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
109129
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
110130
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
111-
HCDIR=/opt/$HCKIND/$HCVER
112-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
113-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
114-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
115-
echo "HC=$HC" >> "$GITHUB_ENV"
116-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
117-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
118-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
119131
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
120132
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
121133
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
122134
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
123-
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
135+
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
124136
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
125-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
126137
env:
127138
HCKIND: ${{ matrix.compilerKind }}
128139
HCNAME: ${{ matrix.compiler }}
@@ -149,6 +160,18 @@ jobs:
149160
repository hackage.haskell.org
150161
url: http://hackage.haskell.org/
151162
EOF
163+
if $HEADHACKAGE; then
164+
cat >> $CABAL_CONFIG <<EOF
165+
repository head.hackage.ghc.haskell.org
166+
url: https://ghc.gitlab.haskell.org/head.hackage/
167+
secure: True
168+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
169+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
170+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
171+
key-threshold: 3
172+
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
173+
EOF
174+
fi
152175
cat >> $CABAL_CONFIG <<EOF
153176
program-default-options
154177
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -209,8 +232,10 @@ jobs:
209232
constraints: github-samples +openssl
210233
constraints: operational -buildExamples
211234
optimization: False
212-
allow-newer: containers
213235
EOF
236+
if $HEADHACKAGE; then
237+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
238+
fi
214239
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(github|github-samples)$/; }' >> cabal.project.local
215240
cat cabal.project
216241
cat cabal.project.local
@@ -250,19 +275,9 @@ jobs:
250275
run: |
251276
rm -f cabal.project.local
252277
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
253-
- name: prepare for constraint sets
254-
run: |
255-
rm -f cabal.project.local
256-
- name: constraint set containers-0.7
257-
run: |
258-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all --dry-run ; fi
259-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then cabal-plan topo | sort ; fi
260-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' --dependencies-only -j2 all ; fi
261-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all ; fi
262-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all ; fi
263278
- name: save cache
264-
uses: actions/cache/save@v4
265279
if: always()
280+
uses: actions/cache/save@v4
266281
with:
267282
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
268283
path: ~/.cabal/store

cabal.haskell-ci

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs-selection: any
1212
-- constraints: text >= 2.0
1313
-- allow-newer: *:text -- allow-newer not supported
1414

15-
constraint-set containers-0.7
16-
ghc: >= 9
17-
constraints: containers >= 0.7
18-
tests: True
19-
run-tests: True
15+
-- constraint-set containers-0.7
16+
-- ghc: >= 9
17+
-- constraints: containers >= 0.7
18+
-- tests: True
19+
-- run-tests: True
2020

21-
raw-project
22-
allow-newer: containers
21+
-- raw-project
22+
-- allow-newer: containers

github.cabal

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ copyright:
3030
Copyright 2012-2013 Mike Burns, Copyright 2013-2015 John Wiegley, Copyright 2016-2021 Oleg Grenrus
3131

3232
tested-with:
33+
GHC == 9.12.1
3334
GHC == 9.10.1
34-
GHC == 9.8.2
35+
GHC == 9.8.4
3536
GHC == 9.6.6
3637
GHC == 9.4.8
3738
GHC == 9.2.8

samples/github-samples.cabal

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ description: Various samples of github package
1010
build-type: Simple
1111

1212
tested-with:
13+
GHC == 9.12.1
1314
GHC == 9.10.1
14-
GHC == 9.8.2
15+
GHC == 9.8.4
1516
GHC == 9.6.6
1617
GHC == 9.4.8
1718
GHC == 9.2.8
@@ -40,7 +41,7 @@ executable github-operational
4041
hs-source-dirs: Operational
4142
ghc-options: -Wall -threaded
4243
build-depends:
43-
, base >=0 && <5
44+
, base
4445
, base-compat-batteries
4546
, github
4647
, github-samples
@@ -56,7 +57,7 @@ common deps
5657
-Wall
5758
-threaded
5859
build-depends:
59-
, base >=4.8 && <5
60+
, base
6061
, base-compat-batteries
6162
, base64-bytestring
6263
, github

0 commit comments

Comments
 (0)