Skip to content

Commit e4a7f28

Browse files
authored
Add CI with GHC 9.2.1 (#210)
* Add CI with GHC 9.2.1 * Use GHC 8.10.7 for the 8.10 job * Run HLint in the GHC-8.10.7 job There was a problem in the GHC 9.2.1 job: https://github.com/quchen/prettyprinter/runs/4079878145
1 parent 6cafb52 commit e4a7f28

8 files changed

Lines changed: 69 additions & 36 deletions

File tree

.github/workflows/haskell-ci.yml

Lines changed: 54 additions & 28 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.13.20210901
11+
# version: 0.13.20211030
1212
#
13-
# REGENDATA ("0.13.20210901",["github","--config=cabal.haskell-ci","cabal.project"])
13+
# REGENDATA ("0.13.20211030",["github","--config=cabal.haskell-ci","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -30,15 +30,20 @@ jobs:
3030
strategy:
3131
matrix:
3232
include:
33+
- compiler: ghc-9.2.1
34+
compilerKind: ghc
35+
compilerVersion: 9.2.1
36+
setup-method: ghcup
37+
allow-failure: false
3338
- compiler: ghc-9.0.1
3439
compilerKind: ghc
3540
compilerVersion: 9.0.1
3641
setup-method: hvr-ppa
3742
allow-failure: false
38-
- compiler: ghc-8.10.4
43+
- compiler: ghc-8.10.7
3944
compilerKind: ghc
40-
compilerVersion: 8.10.4
41-
setup-method: hvr-ppa
45+
compilerVersion: 8.10.7
46+
setup-method: ghcup
4247
allow-failure: false
4348
- compiler: ghc-8.8.4
4449
compilerKind: ghc
@@ -91,9 +96,21 @@ jobs:
9196
run: |
9297
apt-get update
9398
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
94-
apt-add-repository -y 'ppa:hvr/ghc'
95-
apt-get update
96-
apt-get install -y "$HCNAME" cabal-install-3.4
99+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
100+
mkdir -p "$HOME/.ghcup/bin"
101+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
102+
chmod a+x "$HOME/.ghcup/bin/ghcup"
103+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
104+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
105+
else
106+
apt-add-repository -y 'ppa:hvr/ghc'
107+
apt-get update
108+
apt-get install -y "$HCNAME"
109+
mkdir -p "$HOME/.ghcup/bin"
110+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
111+
chmod a+x "$HOME/.ghcup/bin/ghcup"
112+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
113+
fi
97114
env:
98115
HCKIND: ${{ matrix.compilerKind }}
99116
HCNAME: ${{ matrix.compiler }}
@@ -105,15 +122,24 @@ jobs:
105122
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
106123
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
107124
HCDIR=/opt/$HCKIND/$HCVER
108-
HC=$HCDIR/bin/$HCKIND
109-
echo "HC=$HC" >> "$GITHUB_ENV"
110-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
111-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
112-
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> "$GITHUB_ENV"
125+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
126+
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
127+
echo "HC=$HC" >> "$GITHUB_ENV"
128+
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
129+
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
130+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
131+
else
132+
HC=$HCDIR/bin/$HCKIND
133+
echo "HC=$HC" >> "$GITHUB_ENV"
134+
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
135+
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
136+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
137+
fi
138+
113139
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
114140
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
115-
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
116-
if [ $((HCNUMVER >= 70800)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" ; else echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV" ; fi
141+
if [ $((HCNUMVER >= 80000 && HCNUMVER < 90200)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
142+
if [ $((HCNUMVER >= 70800 && HCNUMVER < 90200)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" ; else echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV" ; fi
117143
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
118144
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
119145
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
@@ -155,7 +181,7 @@ jobs:
155181
- name: cache (tools)
156182
uses: actions/cache@v2
157183
with:
158-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-a23eff0a
184+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-dcc1b9f0
159185
path: ~/.haskell-ci-tools
160186
- name: install cabal-plan
161187
run: |
@@ -168,10 +194,10 @@ jobs:
168194
cabal-plan --version
169195
- name: install hlint
170196
run: |
171-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint --constraint='hlint >=3.3 && <3.4' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
172-
if [ $((HCNUMVER >= 90000)) -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
173-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then mkdir -p $CABAL_DIR/bin && ln -sf "$HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint" $CABAL_DIR/bin/hlint ; fi
174-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then hlint --version ; fi
197+
if [ $((HCNUMVER >= 81000 && HCNUMVER < 90000)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint --constraint='hlint >=3.3 && <3.4' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
198+
if [ $((HCNUMVER >= 81000 && HCNUMVER < 90000)) -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
199+
if [ $((HCNUMVER >= 81000 && HCNUMVER < 90000)) -ne 0 ] ; then mkdir -p $CABAL_DIR/bin && ln -sf "$HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint" $CABAL_DIR/bin/hlint ; fi
200+
if [ $((HCNUMVER >= 81000 && HCNUMVER < 90000)) -ne 0 ] ; then hlint --version ; fi
175201
- name: checkout
176202
uses: actions/checkout@v2
177203
with:
@@ -256,16 +282,16 @@ jobs:
256282
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
257283
- name: tests
258284
run: |
259-
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct ; fi
285+
if [ $((HCNUMVER >= 80000 && HCNUMVER < 90200)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct ; fi
260286
- name: hlint
261287
run: |
262-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then (cd ${PKGDIR_prettyprinter} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml --cpp-include=misc src src-text) ; fi
263-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then (cd ${PKGDIR_prettyprinter} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml --cpp-include=misc app) ; fi
264-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then (cd ${PKGDIR_prettyprinter_ansi_terminal} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml --cpp-include=misc src) ; fi
265-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then (cd ${PKGDIR_prettyprinter_compat_wl_pprint} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml --cpp-include=misc src) ; fi
266-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then (cd ${PKGDIR_prettyprinter_compat_ansi_wl_pprint} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml --cpp-include=misc src) ; fi
267-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then (cd ${PKGDIR_prettyprinter_convert_ansi_wl_pprint} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml --cpp-include=misc src) ; fi
268-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then (cd ${PKGDIR_prettyprinter_compat_annotated_wl_pprint} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml --cpp-include=misc src) ; fi
288+
if [ $((HCNUMVER >= 81000 && HCNUMVER < 90000)) -ne 0 ] ; then (cd ${PKGDIR_prettyprinter} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml --cpp-include=misc src src-text) ; fi
289+
if [ $((HCNUMVER >= 81000 && HCNUMVER < 90000)) -ne 0 ] ; then (cd ${PKGDIR_prettyprinter} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml --cpp-include=misc app) ; fi
290+
if [ $((HCNUMVER >= 81000 && HCNUMVER < 90000)) -ne 0 ] ; then (cd ${PKGDIR_prettyprinter_ansi_terminal} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml --cpp-include=misc src) ; fi
291+
if [ $((HCNUMVER >= 81000 && HCNUMVER < 90000)) -ne 0 ] ; then (cd ${PKGDIR_prettyprinter_compat_wl_pprint} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml --cpp-include=misc src) ; fi
292+
if [ $((HCNUMVER >= 81000 && HCNUMVER < 90000)) -ne 0 ] ; then (cd ${PKGDIR_prettyprinter_compat_ansi_wl_pprint} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml --cpp-include=misc src) ; fi
293+
if [ $((HCNUMVER >= 81000 && HCNUMVER < 90000)) -ne 0 ] ; then (cd ${PKGDIR_prettyprinter_convert_ansi_wl_pprint} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml --cpp-include=misc src) ; fi
294+
if [ $((HCNUMVER >= 81000 && HCNUMVER < 90000)) -ne 0 ] ; then (cd ${PKGDIR_prettyprinter_compat_annotated_wl_pprint} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml --cpp-include=misc src) ; fi
269295
- name: haddock
270296
run: |
271297
$CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all

cabal.haskell-ci

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,21 @@
55
branches: master
66

77
-- gauge works only with newer GHC
8-
benchmarks: >=7.8.4
8+
9+
-- FIXME: Enable benchmarks for GHC 9.2 once basement (via gauge) is compatible:
10+
-- https://github.com/haskell-foundation/foundation/issues/554
11+
benchmarks: >=7.8.4 && <9.2
912

1013
-- Doctests fail with GHC 7.10
11-
tests: >=8.0
14+
15+
-- FIXME: Enable tests for GHC 9.2 once doctest is compatible:
16+
-- https://github.com/sol/doctest/issues/305
17+
tests: >=8.0 && <9.2
1218

1319
cabal-check: False
1420

1521
hlint: True
22+
hlint-job: 8.10.7
1623
hlint-yaml: .hlint.yaml
1724
hlint-download-binary: True
1825
-- haskell-ci runs hlint within the package directories, so the CPP include

prettyprinter-ansi-terminal/prettyprinter-ansi-terminal.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ maintainer: Simon Jakobi <simon.jakobi@gmail.com>, David Luposchainsky
1414
bug-reports: http://github.com/quchen/prettyprinter/issues
1515
homepage: http://github.com/quchen/prettyprinter
1616
build-type: Simple
17-
tested-with: GHC==9.0.1, GHC==8.10.4, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
17+
tested-with: GHC == 9.2.1, GHC==9.0.1, GHC==8.10.7, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
1818

1919
source-repository head
2020
type: git

prettyprinter-compat-annotated-wl-pprint/prettyprinter-compat-annotated-wl-pprint.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ maintainer: David Luposchainsky <dluposchainsky at google>
1313
bug-reports: http://github.com/quchen/prettyprinter/issues
1414
homepage: http://github.com/quchen/prettyprinter
1515
build-type: Simple
16-
tested-with: GHC==9.0.1, GHC==8.10.4, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
16+
tested-with: GHC == 9.2.1, GHC==9.0.1, GHC==8.10.7, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
1717

1818
source-repository head
1919
type: git

prettyprinter-compat-ansi-wl-pprint/prettyprinter-compat-ansi-wl-pprint.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ maintainer: David Luposchainsky <dluposchainsky at google>
1212
bug-reports: http://github.com/quchen/prettyprinter/issues
1313
homepage: http://github.com/quchen/prettyprinter
1414
build-type: Simple
15-
tested-with: GHC==9.0.1, GHC==8.10.4, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
15+
tested-with: GHC == 9.2.1, GHC==9.0.1, GHC==8.10.7, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
1616

1717
source-repository head
1818
type: git

prettyprinter-compat-wl-pprint/prettyprinter-compat-wl-pprint.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ maintainer: David Luposchainsky <dluposchainsky at google>
1212
bug-reports: http://github.com/quchen/prettyprinter/issues
1313
homepage: http://github.com/quchen/prettyprinter
1414
build-type: Simple
15-
tested-with: GHC==9.0.1, GHC==8.10.4, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
15+
tested-with: GHC == 9.2.1, GHC==9.0.1, GHC==8.10.7, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
1616

1717
source-repository head
1818
type: git

prettyprinter-convert-ansi-wl-pprint/prettyprinter-convert-ansi-wl-pprint.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ maintainer: Simon Jakobi <simon.jakobi@gmail.com>, David Luposchainsky
1212
bug-reports: http://github.com/quchen/prettyprinter/issues
1313
homepage: http://github.com/quchen/prettyprinter
1414
build-type: Simple
15-
tested-with: GHC==9.0.1, GHC==8.10.4, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
15+
tested-with: GHC == 9.2.1, GHC==9.0.1, GHC==8.10.7, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
1616

1717
source-repository head
1818
type: git

prettyprinter/prettyprinter.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ maintainer: Simon Jakobi <simon.jakobi@gmail.com>, David Luposchainsky
1414
bug-reports: http://github.com/quchen/prettyprinter/issues
1515
homepage: http://github.com/quchen/prettyprinter
1616
build-type: Simple
17-
tested-with: GHC==9.0.1, GHC==8.10.4, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
17+
tested-with: GHC == 9.2.1, GHC==9.0.1, GHC==8.10.7, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
1818

1919
source-repository head
2020
type: git

0 commit comments

Comments
 (0)