Skip to content

Commit f6bb0bf

Browse files
ci: add GHC 9.8 to matrix
Fixes: #127
1 parent dd6bb16 commit f6bb0bf

File tree

3 files changed

+38
-31
lines changed

3 files changed

+38
-31
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This GitHub workflow config has been generated by a script via
22
#
3-
# haskell-ci 'github' '--haddock' '--hlint' '--hlint-job' '9.4.5' '--github-patches' '.github/haskell-ci.patch' 'cabal.project'
3+
# haskell-ci 'github' '--haddock' '--hlint' '--hlint-job' '9.4.8' '--github-patches' '.github/haskell-ci.patch' 'cabal.project'
44
#
55
# To regenerate the script (for example after adjusting tested-with) run
66
#
77
# haskell-ci regenerate
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.16.6
11+
# version: 0.17.20231110
1212
#
13-
# REGENDATA ("0.16.6",["github","--haddock","--hlint","--hlint-job","9.4.5","--github-patches",".github/haskell-ci.patch","cabal.project"])
13+
# REGENDATA ("0.17.20231110",["github","--haddock","--hlint","--hlint-job","9.4.8","--github-patches",".github/haskell-ci.patch","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -43,19 +43,24 @@ jobs:
4343
strategy:
4444
matrix:
4545
include:
46-
- compiler: ghc-9.6.2
46+
- compiler: ghc-9.8.1
4747
compilerKind: ghc
48-
compilerVersion: 9.6.2
48+
compilerVersion: 9.8.1
4949
setup-method: ghcup
5050
allow-failure: false
51-
- compiler: ghc-9.4.5
51+
- compiler: ghc-9.6.3
5252
compilerKind: ghc
53-
compilerVersion: 9.4.5
53+
compilerVersion: 9.6.3
5454
setup-method: ghcup
5555
allow-failure: false
56-
- compiler: ghc-9.2.7
56+
- compiler: ghc-9.4.8
5757
compilerKind: ghc
58-
compilerVersion: 9.2.7
58+
compilerVersion: 9.4.8
59+
setup-method: ghcup
60+
allow-failure: false
61+
- compiler: ghc-9.2.8
62+
compilerKind: ghc
63+
compilerVersion: 9.2.8
5964
setup-method: ghcup
6065
allow-failure: false
6166
- compiler: ghc-9.0.2
@@ -75,10 +80,10 @@ jobs:
7580
apt-get update
7681
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
7782
mkdir -p "$HOME/.ghcup/bin"
78-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
83+
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
7984
chmod a+x "$HOME/.ghcup/bin/ghcup"
8085
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
81-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
86+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
8287
env:
8388
HCKIND: ${{ matrix.compilerKind }}
8489
HCNAME: ${{ matrix.compiler }}
@@ -90,11 +95,13 @@ jobs:
9095
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
9196
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
9297
HCDIR=/opt/$HCKIND/$HCVER
93-
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
98+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
99+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
100+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
94101
echo "HC=$HC" >> "$GITHUB_ENV"
95-
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
96-
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
97-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
102+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
103+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
104+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
98105
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
99106
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
100107
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -144,7 +151,7 @@ jobs:
144151
- name: cache (tools)
145152
uses: actions/cache/restore@v3
146153
with:
147-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-6b1f90a1
154+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-d8b62173
148155
path: ~/.haskell-ci-tools
149156
- name: install cabal-plan
150157
run: |
@@ -165,7 +172,7 @@ jobs:
165172
uses: actions/cache/save@v3
166173
if: always()
167174
with:
168-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-6b1f90a1
175+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-d8b62173
169176
path: ~/.haskell-ci-tools
170177
- name: checkout
171178
uses: actions/checkout@v3
@@ -174,8 +181,8 @@ jobs:
174181
- name: initial cabal.project for sdist
175182
run: |
176183
touch cabal.project
177-
echo "packages: $GITHUB_WORKSPACE/source/code/cvss" >> cabal.project
178184
echo "packages: $GITHUB_WORKSPACE/source/code/hsec-tools" >> cabal.project
185+
echo "packages: $GITHUB_WORKSPACE/source/code/cvss" >> cabal.project
179186
cat cabal.project
180187
- name: sdist
181188
run: |
@@ -187,19 +194,19 @@ jobs:
187194
find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \;
188195
- name: generate cabal.project
189196
run: |
190-
PKGDIR_cvss="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/cvss-[0-9.]*')"
191-
echo "PKGDIR_cvss=${PKGDIR_cvss}" >> "$GITHUB_ENV"
192197
PKGDIR_hsec_tools="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/hsec-tools-[0-9.]*')"
193198
echo "PKGDIR_hsec_tools=${PKGDIR_hsec_tools}" >> "$GITHUB_ENV"
199+
PKGDIR_cvss="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/cvss-[0-9.]*')"
200+
echo "PKGDIR_cvss=${PKGDIR_cvss}" >> "$GITHUB_ENV"
194201
rm -f cabal.project cabal.project.local
195202
touch cabal.project
196203
touch cabal.project.local
197-
echo "packages: ${PKGDIR_cvss}" >> cabal.project
198204
echo "packages: ${PKGDIR_hsec_tools}" >> cabal.project
199-
echo "package cvss" >> cabal.project
200-
echo " ghc-options: -Werror=missing-methods" >> cabal.project
205+
echo "packages: ${PKGDIR_cvss}" >> cabal.project
201206
echo "package hsec-tools" >> cabal.project
202207
echo " ghc-options: -Werror=missing-methods" >> cabal.project
208+
echo "package cvss" >> cabal.project
209+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
203210
cat >> cabal.project <<EOF
204211
EOF
205212
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(cvss|hsec-tools)$/; }' >> cabal.project.local
@@ -230,15 +237,15 @@ jobs:
230237
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
231238
- name: hlint
232239
run: |
233-
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_cvss} && hlint -XHaskell2010 src) ; fi
234240
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_hsec_tools} && hlint -XHaskell2010 src) ; fi
235241
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_hsec_tools} && hlint -XHaskell2010 app) ; fi
242+
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_cvss} && hlint -XHaskell2010 src) ; fi
236243
- name: cabal check
237244
run: |
238-
cd ${PKGDIR_cvss} || false
239-
${CABAL} -vnormal check
240245
cd ${PKGDIR_hsec_tools} || false
241246
${CABAL} -vnormal check
247+
cd ${PKGDIR_cvss} || false
248+
${CABAL} -vnormal check
242249
- name: haddock
243250
run: |
244251
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all

code/cvss/cvss.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ author: Tristan de Cacqueray
1010
maintainer: [email protected]
1111
category: Data
1212
extra-doc-files: CHANGELOG.md
13-
tested-with: GHC ==8.10.7 || ==9.0.2 || ==9.2.7 || ==9.4.5 || ==9.6.2
13+
tested-with: GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1
1414

1515
library
1616
exposed-modules: Security.CVSS

code/hsec-tools/hsec-tools.cabal

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extra-source-files:
2727
test/golden/*.md
2828

2929
tested-with:
30-
GHC ==8.10.7 || ==9.0.2 || ==9.2.7 || ==9.4.5 || ==9.6.2
30+
GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1
3131

3232
library
3333
exposed-modules:
@@ -44,7 +44,7 @@ library
4444

4545
build-depends:
4646
, aeson >=2.0.1.0 && <3
47-
, base >=4.14 && <4.19
47+
, base >=4.14 && <4.20
4848
, Cabal-syntax >=3.8.1.0 && <3.11
4949
, commonmark ^>=0.2.2
5050
, commonmark-pandoc >=0.2 && <0.3
@@ -82,8 +82,8 @@ executable hsec-tools
8282
-- other-extensions:
8383
build-depends:
8484
, aeson >=2.0.1.0 && <3
85-
, base >=4.14 && <4.19
86-
, bytestring >=0.10 && <0.12
85+
, base >=4.14 && <4.20
86+
, bytestring >=0.10 && <0.13
8787
, Cabal-syntax >=3.8.1.0 && <3.11
8888
, filepath >=1.4 && <1.5
8989
, hsec-tools

0 commit comments

Comments
 (0)