Skip to content

Commit d3e17e1

Browse files
committed
Update Haskell CI
Test with 9.4 and head.
1 parent 85ccb8e commit d3e17e1

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35+
- compiler: ghc-9.4.0.20220523
36+
compilerKind: ghc
37+
compilerVersion: 9.4.0.20220523
38+
setup-method: ghcup
39+
allow-failure: true
3540
- compiler: ghc-9.2.2
3641
compilerKind: ghc
3742
compilerVersion: 9.2.2
@@ -82,6 +87,7 @@ jobs:
8287
mkdir -p "$HOME/.ghcup/bin"
8388
curl -sL https://downloads.haskell.org/ghcup/0.1.17.8/x86_64-linux-ghcup-0.1.17.8 > "$HOME/.ghcup/bin/ghcup"
8489
chmod a+x "$HOME/.ghcup/bin/ghcup"
90+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
8591
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
8692
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
8793
else
@@ -122,7 +128,7 @@ jobs:
122128
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
123129
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
124130
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
125-
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
131+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
126132
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
127133
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
128134
env:
@@ -151,6 +157,18 @@ jobs:
151157
repository hackage.haskell.org
152158
url: http://hackage.haskell.org/
153159
EOF
160+
if $HEADHACKAGE; then
161+
cat >> $CABAL_CONFIG <<EOF
162+
repository head.hackage.ghc.haskell.org
163+
url: https://ghc.gitlab.haskell.org/head.hackage/
164+
secure: True
165+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
166+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
167+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
168+
key-threshold: 3
169+
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
170+
EOF
171+
fi
154172
cat >> $CABAL_CONFIG <<EOF
155173
program-default-options
156174
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -208,6 +226,9 @@ jobs:
208226
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
209227
cat >> cabal.project <<EOF
210228
EOF
229+
if $HEADHACKAGE; then
230+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
231+
fi
211232
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(binary|containers|containers-tests|ghc-heap|text)$/; }' >> cabal.project.local
212233
cat cabal.project
213234
cat cabal.project.local

containers-tests/containers-tests.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extra-source-files:
2626
benchmarks/LookupGE/*.hs
2727

2828
tested-with:
29-
GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.2
29+
GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.2 || ==9.4.1
3030

3131
source-repository head
3232
type: git

containers/containers.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ extra-source-files:
2525
include/containers.h
2626
changelog.md
2727

28-
tested-with: GHC==9.2.2, GHC==9.0.2, GHC==8.10.7, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2
28+
tested-with: GHC==9.4.1, GHC==9.2.2, GHC==9.0.2, GHC==8.10.7, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2
2929

3030
source-repository head
3131
type: git

0 commit comments

Comments
 (0)