Skip to content

Commit 21ecfaa

Browse files
authored
Haskell-CI: include GHC 9.4.1 alpha (#19)
- restrict CI to `master` branch - test with GHC 9.4 alpha - remove upper bound on `base`
1 parent f478f75 commit 21ecfaa

File tree

4 files changed

+47
-18
lines changed

4 files changed

+47
-18
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,22 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.14
11+
# version: 0.15.20220525
1212
#
13-
# REGENDATA ("0.14",["github","haskell-src.cabal"])
13+
# REGENDATA ("0.15.20220525",["github","haskell-src.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
17-
- push
18-
- pull_request
17+
push:
18+
branches:
19+
- master
20+
pull_request:
21+
branches:
22+
- master
1923
jobs:
2024
linux:
2125
name: Haskell-CI - Linux - ${{ matrix.compiler }}
22-
runs-on: ubuntu-18.04
26+
runs-on: ubuntu-20.04
2327
timeout-minutes:
2428
60
2529
container:
@@ -28,9 +32,14 @@ jobs:
2832
strategy:
2933
matrix:
3034
include:
31-
- compiler: ghc-9.2.1
35+
- compiler: ghc-9.4.0.20220501
3236
compilerKind: ghc
33-
compilerVersion: 9.2.1
37+
compilerVersion: 9.4.0.20220501
38+
setup-method: ghcup
39+
allow-failure: true
40+
- compiler: ghc-9.2.2
41+
compilerKind: ghc
42+
compilerVersion: 9.2.2
3443
setup-method: ghcup
3544
allow-failure: false
3645
- compiler: ghc-9.0.2
@@ -106,16 +115,17 @@ jobs:
106115
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
107116
if [ "${{ matrix.setup-method }}" = ghcup ]; then
108117
mkdir -p "$HOME/.ghcup/bin"
109-
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
118+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.8/x86_64-linux-ghcup-0.1.17.8 > "$HOME/.ghcup/bin/ghcup"
110119
chmod a+x "$HOME/.ghcup/bin/ghcup"
120+
if $HEADHACKAGE; then "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; fi
111121
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
112122
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
113123
else
114124
apt-add-repository -y 'ppa:hvr/ghc'
115125
apt-get update
116126
apt-get install -y "$HCNAME"
117127
mkdir -p "$HOME/.ghcup/bin"
118-
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
128+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.8/x86_64-linux-ghcup-0.1.17.8 > "$HOME/.ghcup/bin/ghcup"
119129
chmod a+x "$HOME/.ghcup/bin/ghcup"
120130
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
121131
fi
@@ -148,7 +158,7 @@ jobs:
148158
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
149159
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
150160
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
151-
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
161+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
152162
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
153163
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
154164
env:
@@ -177,6 +187,17 @@ jobs:
177187
repository hackage.haskell.org
178188
url: http://hackage.haskell.org/
179189
EOF
190+
if $HEADHACKAGE; then
191+
cat >> $CABAL_CONFIG <<EOF
192+
repository head.hackage.ghc.haskell.org
193+
url: https://ghc.gitlab.haskell.org/head.hackage/
194+
secure: True
195+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
196+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
197+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
198+
key-threshold: 3
199+
EOF
200+
fi
180201
cat >> $CABAL_CONFIG <<EOF
181202
program-default-options
182203
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -228,6 +249,9 @@ jobs:
228249
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
229250
cat >> cabal.project <<EOF
230251
EOF
252+
if $HEADHACKAGE; then
253+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
254+
fi
231255
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(haskell-src)$/; }' >> cabal.project.local
232256
cat cabal.project
233257
cat cabal.project.local
@@ -257,7 +281,7 @@ jobs:
257281
${CABAL} -vnormal check
258282
- name: haddock
259283
run: |
260-
$CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
284+
$CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
261285
- name: unconstrained build
262286
run: |
263287
rm -f cabal.project.local

cabal.haskell-ci

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
branches: master
2+
head-hackage: > 9.3

cabal.project

Lines changed: 0 additions & 1 deletion
This file was deleted.

haskell-src.cabal

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ description:
2020
<http://www.haskell.org/onlinereport/ Haskell 98> code.
2121

2222
tested-with:
23-
GHC == 9.2.1
23+
GHC == 9.4.1
24+
GHC == 9.2.2
2425
GHC == 9.0.2
2526
GHC == 8.10.7
2627
GHC == 8.8.4
@@ -50,13 +51,16 @@ library
5051
Language.Haskell.Syntax,
5152
Language.Haskell.ParseUtils
5253

53-
build-depends: base >= 4.3 && < 4.17
54-
, syb >= 0.1 && < 0.8
55-
, pretty >= 1.0.1.2 && < 1.2
56-
, array >= 0.3 && < 0.6
54+
build-depends: base >= 4.3 && < 5
55+
-- no confirmed upper bound on base yet
56+
, syb >= 0.1 && < 0.8
57+
, pretty >= 1.0.1.2 && < 1.2
58+
, array >= 0.3 && < 0.6
5759

5860
if !impl(ghc >= 8.0)
59-
build-depends: semigroups == 0.18.*, fail == 4.9.*
61+
build-depends: fail == 4.9.*
62+
, semigroups == 0.18.*
63+
-- semigroups >= 0.19 does not build with ghc < 8
6064
else
6165
ghc-options: -Wcompat -Wnoncanonical-monad-instances
6266

0 commit comments

Comments
 (0)