Skip to content

Commit ed296cb

Browse files
authored
Bump CI to GHC 9.6.0 (#491)
No code changes needed for GHC 9.6.
1 parent 28c7423 commit ed296cb

File tree

4 files changed

+51
-19
lines changed

4 files changed

+51
-19
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 44 additions & 15 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.15.20221009
11+
# version: 0.15.20230217
1212
#
13-
# REGENDATA ("0.15.20221009",["--config=cabal.haskell-ci","github","cabal.project"])
13+
# REGENDATA ("0.15.20230217",["--config=cabal.haskell-ci","github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -34,14 +34,19 @@ jobs:
3434
strategy:
3535
matrix:
3636
include:
37-
- compiler: ghc-9.4.2
37+
- compiler: ghc-9.6.0.20230210
3838
compilerKind: ghc
39-
compilerVersion: 9.4.2
39+
compilerVersion: 9.6.0.20230210
40+
setup-method: ghcup
41+
allow-failure: true
42+
- compiler: ghc-9.4.4
43+
compilerKind: ghc
44+
compilerVersion: 9.4.4
4045
setup-method: ghcup
4146
allow-failure: false
42-
- compiler: ghc-9.2.4
47+
- compiler: ghc-9.2.6
4348
compilerKind: ghc
44-
compilerVersion: 9.2.4
49+
compilerVersion: 9.2.6
4550
setup-method: ghcup
4651
allow-failure: false
4752
- compiler: ghc-9.0.2
@@ -99,16 +104,18 @@ jobs:
99104
mkdir -p "$HOME/.ghcup/bin"
100105
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
101106
chmod a+x "$HOME/.ghcup/bin/ghcup"
107+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
102108
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
103-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
109+
"$HOME/.ghcup/bin/ghcup" install cabal 3.9.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
104110
else
105111
apt-add-repository -y 'ppa:hvr/ghc'
106112
apt-get update
107113
apt-get install -y "$HCNAME"
108114
mkdir -p "$HOME/.ghcup/bin"
109115
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
110116
chmod a+x "$HOME/.ghcup/bin/ghcup"
111-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
117+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
118+
"$HOME/.ghcup/bin/ghcup" install cabal 3.9.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
112119
fi
113120
env:
114121
HCKIND: ${{ matrix.compilerKind }}
@@ -126,20 +133,20 @@ jobs:
126133
echo "HC=$HC" >> "$GITHUB_ENV"
127134
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
128135
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
129-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
136+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.9.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
130137
else
131138
HC=$HCDIR/bin/$HCKIND
132139
echo "HC=$HC" >> "$GITHUB_ENV"
133140
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
134141
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
135-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
142+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.9.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
136143
fi
137144
138145
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
139146
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
140147
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
141148
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
142-
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
149+
if [ $((HCNUMVER >= 90600)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
143150
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
144151
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
145152
env:
@@ -168,6 +175,18 @@ jobs:
168175
repository hackage.haskell.org
169176
url: http://hackage.haskell.org/
170177
EOF
178+
if $HEADHACKAGE; then
179+
cat >> $CABAL_CONFIG <<EOF
180+
repository head.hackage.ghc.haskell.org
181+
url: https://ghc.gitlab.haskell.org/head.hackage/
182+
secure: True
183+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
184+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
185+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
186+
key-threshold: 3
187+
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
188+
EOF
189+
fi
171190
cat >> $CABAL_CONFIG <<EOF
172191
program-default-options
173192
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -191,7 +210,7 @@ jobs:
191210
chmod a+x $HOME/.cabal/bin/cabal-plan
192211
cabal-plan --version
193212
- name: checkout
194-
uses: actions/checkout@v2
213+
uses: actions/checkout@v3
195214
with:
196215
path: source
197216
- name: initial cabal.project for sdist
@@ -226,17 +245,21 @@ jobs:
226245
cat >> cabal.project <<EOF
227246
constraints: github +openssl
228247
constraints: github-samples +openssl
248+
constraints: operational -buildExamples
229249
optimization: False
230250
EOF
251+
if $HEADHACKAGE; then
252+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
253+
fi
231254
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(github|github-samples)$/; }' >> cabal.project.local
232255
cat cabal.project
233256
cat cabal.project.local
234257
- name: dump install plan
235258
run: |
236259
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
237260
cabal-plan
238-
- name: cache
239-
uses: actions/cache@v2
261+
- name: restore cache
262+
uses: actions/cache/restore@v3
240263
with:
241264
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
242265
path: ~/.cabal/store
@@ -262,8 +285,14 @@ jobs:
262285
if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
263286
- name: haddock
264287
run: |
265-
if [ $((HCNUMVER >= 80600)) -ne 0 ] ; then $CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ; fi
288+
if [ $((HCNUMVER >= 80600)) -ne 0 ] ; then $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ; fi
266289
- name: unconstrained build
267290
run: |
268291
rm -f cabal.project.local
269292
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
293+
- name: save cache
294+
uses: actions/cache/save@v3
295+
if: always()
296+
with:
297+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
298+
path: ~/.cabal/store

cabal.project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ tests: True
66

77
constraints: github +openssl
88
constraints: github-samples +openssl
9+
constraints: operational -buildExamples
910

1011
-- constraints: text >=2
1112
-- allow-newer: *:text

github.cabal

Lines changed: 3 additions & 2 deletions
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.4.2
34-
GHC == 9.2.4
33+
GHC == 9.6.0
34+
GHC == 9.4.4
35+
GHC == 9.2.6
3536
GHC == 9.0.2
3637
GHC == 8.10.7
3738
GHC == 8.8.4

samples/github-samples.cabal

Lines changed: 3 additions & 2 deletions
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.4.2
14-
GHC == 9.2.4
13+
GHC == 9.6.0
14+
GHC == 9.4.4
15+
GHC == 9.2.6
1516
GHC == 9.0.2
1617
GHC == 8.10.7
1718
GHC == 8.8.4

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy