Skip to content

Commit e6f9955

Browse files
erikdkonsumlamm
authored andcommitted
Support ghc 9.12
1 parent b35e967 commit e6f9955

File tree

2 files changed

+32
-51
lines changed

2 files changed

+32
-51
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 27 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/andreasabel/haskell-ci
1010
#
11-
# version: 0.19.20240403
11+
# version: 0.19.20241021
1212
#
13-
# REGENDATA ("0.19.20240403",["github","parallel.cabal"])
13+
# REGENDATA ("0.19.20241021",["github","parallel.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -27,24 +27,29 @@ jobs:
2727
timeout-minutes:
2828
60
2929
container:
30-
image: buildpack-deps:focal
30+
image: buildpack-deps:jammy
3131
continue-on-error: ${{ matrix.allow-failure }}
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.10.0.20240328
35+
- compiler: ghc-9.12.20241014
3636
compilerKind: ghc
37-
compilerVersion: 9.10.0.20240328
37+
compilerVersion: 9.12.20241014
38+
setup-method: ghcup
39+
allow-failure: false
40+
- compiler: ghc-9.10.1
41+
compilerKind: ghc
42+
compilerVersion: 9.10.1
3843
setup-method: ghcup
3944
allow-failure: false
4045
- compiler: ghc-9.8.2
4146
compilerKind: ghc
4247
compilerVersion: 9.8.2
4348
setup-method: ghcup
4449
allow-failure: false
45-
- compiler: ghc-9.6.4
50+
- compiler: ghc-9.6.6
4651
compilerKind: ghc
47-
compilerVersion: 9.6.4
52+
compilerVersion: 9.6.6
4853
setup-method: ghcup
4954
allow-failure: false
5055
- compiler: ghc-9.4.8
@@ -92,34 +97,18 @@ jobs:
9297
compilerVersion: 8.0.2
9398
setup-method: ghcup
9499
allow-failure: false
95-
- compiler: ghc-7.10.3
96-
compilerKind: ghc
97-
compilerVersion: 7.10.3
98-
setup-method: hvr-ppa
99-
allow-failure: false
100100
fail-fast: false
101101
steps:
102102
- name: apt
103103
run: |
104104
apt-get update
105105
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
106-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
107-
mkdir -p "$HOME/.ghcup/bin"
108-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
109-
chmod a+x "$HOME/.ghcup/bin/ghcup"
110-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
111-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
112-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.3.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
113-
else
114-
apt-add-repository -y 'ppa:hvr/ghc'
115-
apt-get update
116-
apt-get install -y "$HCNAME"
117-
mkdir -p "$HOME/.ghcup/bin"
118-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
119-
chmod a+x "$HOME/.ghcup/bin/ghcup"
120-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
121-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.3.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
122-
fi
106+
mkdir -p "$HOME/.ghcup/bin"
107+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
108+
chmod a+x "$HOME/.ghcup/bin/ghcup"
109+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
110+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
111+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
123112
env:
124113
HCKIND: ${{ matrix.compilerKind }}
125114
HCNAME: ${{ matrix.compiler }}
@@ -131,27 +120,18 @@ jobs:
131120
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
132121
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
133122
HCDIR=/opt/$HCKIND/$HCVER
134-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
135-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
136-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
137-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
138-
echo "HC=$HC" >> "$GITHUB_ENV"
139-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
140-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
141-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.3.0 -vnormal+nowrap" >> "$GITHUB_ENV"
142-
else
143-
HC=$HCDIR/bin/$HCKIND
144-
echo "HC=$HC" >> "$GITHUB_ENV"
145-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
146-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
147-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.3.0 -vnormal+nowrap" >> "$GITHUB_ENV"
148-
fi
149-
123+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
124+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
125+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
126+
echo "HC=$HC" >> "$GITHUB_ENV"
127+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
128+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
129+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
150130
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
151131
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
152132
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
153133
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
154-
if [ $((HCNUMVER >= 91000)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
134+
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
155135
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
156136
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
157137
env:
@@ -246,7 +226,7 @@ jobs:
246226
if $HEADHACKAGE; then
247227
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
248228
fi
249-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(parallel)$/; }' >> cabal.project.local
229+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(parallel)$/; }' >> cabal.project.local
250230
cat cabal.project
251231
cat cabal.project.local
252232
- name: dump install plan

parallel.cabal

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ category: Control, Parallelism
1212
build-type: Simple
1313

1414
tested-with:
15-
GHC == 9.10.0
15+
GHC == 9.12.0
16+
GHC == 9.10.1
1617
GHC == 9.8.2
17-
GHC == 9.6.4
18+
GHC == 9.6.6
1819
GHC == 9.4.8
1920
GHC == 9.2.8
2021
GHC == 9.0.2
@@ -24,8 +25,8 @@ tested-with:
2425
GHC == 8.4.4
2526
GHC == 8.2.2
2627
GHC == 8.0.2
27-
GHC == 7.10.3
2828
-- Drop these old GHCs from CI:
29+
-- GHC == 7.10.3
2930
-- GHC == 7.8.4
3031
-- GHC == 7.6.3
3132
-- GHC == 7.4.2
@@ -65,7 +66,7 @@ library
6566

6667
build-depends:
6768
array >= 0.3 && < 0.6,
68-
base >= 4.3 && < 4.21,
69+
base >= 4.3 && < 4.22,
6970
containers >= 0.4 && < 0.8,
7071
deepseq >= 1.1 && < 1.6
7172

0 commit comments

Comments
 (0)