Skip to content

Commit 21c6bdf

Browse files
authored
Merge pull request #100 from jonathanknowles/jonathanknowles/support-ghc-9.10
Add support for GHC `9.10`.
2 parents 045cee4 + f6759bc commit 21c6bdf

File tree

2 files changed

+42
-22
lines changed

2 files changed

+42
-22
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 36 additions & 19 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.16.3
11+
# version: 0.18.1
1212
#
13-
# REGENDATA ("0.16.3",["github","deepseq.cabal"])
13+
# REGENDATA ("0.18.1",["github","deepseq.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -28,14 +28,29 @@ jobs:
2828
strategy:
2929
matrix:
3030
include:
31-
- compiler: ghc-9.4.3
31+
- compiler: ghc-9.10.1
3232
compilerKind: ghc
33-
compilerVersion: 9.4.3
33+
compilerVersion: 9.10.1
3434
setup-method: ghcup
3535
allow-failure: false
36-
- compiler: ghc-9.2.5
36+
- compiler: ghc-9.8.2
3737
compilerKind: ghc
38-
compilerVersion: 9.2.5
38+
compilerVersion: 9.8.2
39+
setup-method: ghcup
40+
allow-failure: false
41+
- compiler: ghc-9.6.5
42+
compilerKind: ghc
43+
compilerVersion: 9.6.5
44+
setup-method: ghcup
45+
allow-failure: false
46+
- compiler: ghc-9.4.8
47+
compilerKind: ghc
48+
compilerVersion: 9.4.8
49+
setup-method: ghcup
50+
allow-failure: false
51+
- compiler: ghc-9.2.8
52+
compilerKind: ghc
53+
compilerVersion: 9.2.8
3954
setup-method: ghcup
4055
allow-failure: false
4156
- compiler: ghc-9.0.2
@@ -51,12 +66,12 @@ jobs:
5166
- compiler: ghc-8.8.4
5267
compilerKind: ghc
5368
compilerVersion: 8.8.4
54-
setup-method: ghcup
69+
setup-method: hvr-ppa
5570
allow-failure: false
5671
- compiler: ghc-8.6.5
5772
compilerKind: ghc
5873
compilerVersion: 8.6.5
59-
setup-method: ghcup
74+
setup-method: hvr-ppa
6075
allow-failure: false
6176
fail-fast: false
6277
steps:
@@ -66,18 +81,18 @@ jobs:
6681
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
6782
if [ "${{ matrix.setup-method }}" = ghcup ]; then
6883
mkdir -p "$HOME/.ghcup/bin"
69-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
84+
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
7085
chmod a+x "$HOME/.ghcup/bin/ghcup"
7186
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
72-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
87+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
7388
else
7489
apt-add-repository -y 'ppa:hvr/ghc'
7590
apt-get update
7691
apt-get install -y "$HCNAME"
7792
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"
93+
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
7994
chmod a+x "$HOME/.ghcup/bin/ghcup"
80-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
95+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
8196
fi
8297
env:
8398
HCKIND: ${{ matrix.compilerKind }}
@@ -91,17 +106,19 @@ jobs:
91106
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
92107
HCDIR=/opt/$HCKIND/$HCVER
93108
if [ "${{ matrix.setup-method }}" = ghcup ]; then
94-
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
109+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
110+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
111+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
95112
echo "HC=$HC" >> "$GITHUB_ENV"
96-
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
97-
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
98-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
113+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
114+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
115+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
99116
else
100117
HC=$HCDIR/bin/$HCKIND
101118
echo "HC=$HC" >> "$GITHUB_ENV"
102119
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
103120
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
104-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
121+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
105122
fi
106123
107124
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
@@ -184,8 +201,8 @@ jobs:
184201
touch cabal.project
185202
touch cabal.project.local
186203
echo "packages: ${PKGDIR_deepseq}" >> cabal.project
187-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package deepseq" >> cabal.project ; fi
188-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
204+
echo "package deepseq" >> cabal.project
205+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
189206
cat >> cabal.project <<EOF
190207
EOF
191208
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(deepseq)$/; }' >> cabal.project.local

deepseq.cabal

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ description:
2626

2727
build-type: Simple
2828
tested-with:
29-
GHC==9.4.3,
30-
GHC==9.2.5,
29+
GHC==9.10.1,
30+
GHC==9.8.2,
31+
GHC==9.6.5,
32+
GHC==9.4.8,
33+
GHC==9.2.8,
3134
GHC==9.0.2,
3235
GHC==8.10.7,
3336
GHC==8.8.4,
@@ -58,7 +61,7 @@ library
5861
if impl(ghc >=9.0)
5962
build-depends: ghc-prim
6063

61-
build-depends: base >= 4.12 && < 4.20,
64+
build-depends: base >= 4.12 && < 4.21,
6265
array >= 0.4 && < 0.6
6366
ghc-options: -Wall
6467

0 commit comments

Comments
 (0)