Skip to content

Commit bab4b25

Browse files
committed
ci: update list of supported compilers to include ghc-9.8.x
1 parent daa758b commit bab4b25

File tree

2 files changed

+34
-28
lines changed

2 files changed

+34
-28
lines changed

.github/workflows/haskell-ci.yml

+33-27
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
# This GitHub workflow config has been generated by a script via
22
#
3-
# haskell-ci 'github' '--hlint' '--doctest' '--installed=+all -Cabal' 'cabal2spec.cabal'
3+
# haskell-ci 'github' '--hlint' '--doctest' '--doctest-version=^>= 0.22' '--installed=+all -Cabal' 'cabal2spec.cabal'
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.15.20230312
11+
# version: 0.18.1
1212
#
13-
# REGENDATA ("0.15.20230312",["github","--hlint","--doctest","--installed=+all -Cabal","cabal2spec.cabal"])
13+
# REGENDATA ("0.18.1",["github","--hlint","--doctest","--doctest-version=^>= 0.22","--installed=+all -Cabal","cabal2spec.cabal"])
1414
#
15-
# Manual changes - hlint run condition, doctest version and ghcup version
1615
name: Haskell-CI
1716
on:
1817
- push
@@ -29,19 +28,24 @@ jobs:
2928
strategy:
3029
matrix:
3130
include:
32-
- compiler: ghc-9.6.1
31+
- compiler: ghc-9.8.2
3332
compilerKind: ghc
34-
compilerVersion: 9.6.1
33+
compilerVersion: 9.8.2
3534
setup-method: ghcup
3635
allow-failure: false
37-
- compiler: ghc-9.4.4
36+
- compiler: ghc-9.6.4
3837
compilerKind: ghc
39-
compilerVersion: 9.4.4
38+
compilerVersion: 9.6.4
4039
setup-method: ghcup
4140
allow-failure: false
42-
- compiler: ghc-9.2.7
41+
- compiler: ghc-9.4.8
4342
compilerKind: ghc
44-
compilerVersion: 9.2.7
43+
compilerVersion: 9.4.8
44+
setup-method: ghcup
45+
allow-failure: false
46+
- compiler: ghc-9.2.8
47+
compilerKind: ghc
48+
compilerVersion: 9.2.8
4549
setup-method: ghcup
4650
allow-failure: false
4751
fail-fast: false
@@ -51,10 +55,10 @@ jobs:
5155
apt-get update
5256
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
5357
mkdir -p "$HOME/.ghcup/bin"
54-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
58+
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
5559
chmod a+x "$HOME/.ghcup/bin/ghcup"
5660
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
57-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
61+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
5862
env:
5963
HCKIND: ${{ matrix.compilerKind }}
6064
HCNAME: ${{ matrix.compiler }}
@@ -66,11 +70,13 @@ jobs:
6670
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
6771
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
6872
HCDIR=/opt/$HCKIND/$HCVER
69-
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
73+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
74+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
75+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
7076
echo "HC=$HC" >> "$GITHUB_ENV"
71-
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
72-
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
73-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
77+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
78+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
79+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
7480
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
7581
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
7682
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -120,32 +126,32 @@ jobs:
120126
- name: cache (tools)
121127
uses: actions/cache/restore@v3
122128
with:
123-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-edbf4cb5
129+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-54825751
124130
path: ~/.haskell-ci-tools
125131
- name: install cabal-plan
126132
run: |
127133
mkdir -p $HOME/.cabal/bin
128-
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
129-
echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
134+
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3.0/cabal-plan-0.7.3.0-x86_64-linux.xz > cabal-plan.xz
135+
echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
130136
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
131137
rm -f cabal-plan.xz
132138
chmod a+x $HOME/.cabal/bin/cabal-plan
133139
cabal-plan --version
134140
- name: install doctest
135141
run: |
136-
$CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.21'
142+
$CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.22'
137143
doctest --version
138144
- name: install hlint
139145
run: |
140-
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint --constraint='hlint >=3.5 && <3.6' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
141-
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then if [ ! -e $HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint ]; then echo "Downloading HLint version $HLINTVER"; mkdir -p $HOME/.haskell-ci-tools; curl --write-out 'Status Code: %{http_code} Redirects: %{num_redirects} Total time: %{time_total} Total Dsize: %{size_download}\n' --silent --location --output $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz "https://github.com/ndmitchell/hlint/releases/download/v$HLINTVER/hlint-$HLINTVER-x86_64-linux.tar.gz"; tar -xzv -f $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz -C $HOME/.haskell-ci-tools; fi ; fi
142-
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then mkdir -p $CABAL_DIR/bin && ln -sf "$HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint" $CABAL_DIR/bin/hlint ; fi
143-
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then hlint --version ; fi
146+
if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint --constraint='hlint >=3.5 && <3.6' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
147+
if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then if [ ! -e $HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint ]; then echo "Downloading HLint version $HLINTVER"; mkdir -p $HOME/.haskell-ci-tools; curl --write-out 'Status Code: %{http_code} Redirects: %{num_redirects} Total time: %{time_total} Total Dsize: %{size_download}\n' --silent --location --output $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz "https://github.com/ndmitchell/hlint/releases/download/v$HLINTVER/hlint-$HLINTVER-x86_64-linux.tar.gz"; tar -xzv -f $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz -C $HOME/.haskell-ci-tools; fi ; fi
148+
if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then mkdir -p $CABAL_DIR/bin && ln -sf "$HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint" $CABAL_DIR/bin/hlint ; fi
149+
if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then hlint --version ; fi
144150
- name: save cache (tools)
145151
uses: actions/cache/save@v3
146152
if: always()
147153
with:
148-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-edbf4cb5
154+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-54825751
149155
path: ~/.haskell-ci-tools
150156
- name: checkout
151157
uses: actions/checkout@v3
@@ -208,8 +214,8 @@ jobs:
208214
doctest -XHaskell2010 src
209215
- name: hlint
210216
run: |
211-
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_cabal2spec} && hlint -XHaskell2010 src) ; fi
212-
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_cabal2spec} && hlint -XHaskell2010 cabal2spec) ; fi
217+
if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then (cd ${PKGDIR_cabal2spec} && hlint -XHaskell2010 src) ; fi
218+
if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then (cd ${PKGDIR_cabal2spec} && hlint -XHaskell2010 cabal2spec) ; fi
213219
- name: cabal check
214220
run: |
215221
cd ${PKGDIR_cabal2spec} || false

cabal2spec.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ license: GPL-3
1414
license-file: LICENSE
1515
author: Peter Simons, Bryan O'Sullivan, Jens Petersen
1616
maintainer: simons@cryp.to
17-
tested-with: GHC == 9.2.7, GHC == 9.4.4, GHC == 9.6.1
17+
tested-with: GHC == 9.2.8 || == 9.4.8 || == 9.6.4 || == 9.8.2
1818
category: Distribution
1919
homepage: https://github.com/peti/cabal2spec
2020
build-type: Simple

0 commit comments

Comments
 (0)