Skip to content

Commit eb2c8e2

Browse files
authored
Add CI with GHC 9.2.1 (#805)
1 parent ff3d6af commit eb2c8e2

File tree

4 files changed

+102
-34
lines changed

4 files changed

+102
-34
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 95 additions & 29 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.20210525
11+
# version: 0.13.20211111
1212
#
13-
# REGENDATA ("0.13.20210525",["github","--config=cabal.haskell-ci","cabal.project"])
13+
# REGENDATA ("0.13.20211111",["github","--config=cabal.haskell-ci","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -24,65 +24,126 @@ jobs:
2424
linux:
2525
name: Haskell-CI - Linux - ${{ matrix.compiler }}
2626
runs-on: ubuntu-18.04
27+
timeout-minutes:
28+
60
2729
container:
28-
image: buildpack-deps:xenial
30+
image: buildpack-deps:bionic
2931
continue-on-error: ${{ matrix.allow-failure }}
3032
strategy:
3133
matrix:
3234
include:
35+
- compiler: ghc-9.2.1
36+
compilerKind: ghc
37+
compilerVersion: 9.2.1
38+
setup-method: ghcup
39+
allow-failure: false
3340
- compiler: ghc-9.0.1
41+
compilerKind: ghc
42+
compilerVersion: 9.0.1
43+
setup-method: hvr-ppa
3444
allow-failure: false
35-
- compiler: ghc-8.10.4
45+
- compiler: ghc-8.10.7
46+
compilerKind: ghc
47+
compilerVersion: 8.10.7
48+
setup-method: ghcup
3649
allow-failure: false
3750
- compiler: ghc-8.8.4
51+
compilerKind: ghc
52+
compilerVersion: 8.8.4
53+
setup-method: hvr-ppa
3854
allow-failure: false
3955
- compiler: ghc-8.6.5
56+
compilerKind: ghc
57+
compilerVersion: 8.6.5
58+
setup-method: hvr-ppa
4059
allow-failure: false
4160
- compiler: ghc-8.4.4
61+
compilerKind: ghc
62+
compilerVersion: 8.4.4
63+
setup-method: hvr-ppa
4264
allow-failure: false
4365
- compiler: ghc-8.2.2
66+
compilerKind: ghc
67+
compilerVersion: 8.2.2
68+
setup-method: hvr-ppa
4469
allow-failure: false
4570
- compiler: ghc-8.0.2
71+
compilerKind: ghc
72+
compilerVersion: 8.0.2
73+
setup-method: hvr-ppa
4674
allow-failure: false
4775
- compiler: ghc-7.10.3
76+
compilerKind: ghc
77+
compilerVersion: 7.10.3
78+
setup-method: hvr-ppa
4879
allow-failure: false
4980
- compiler: ghc-7.8.4
81+
compilerKind: ghc
82+
compilerVersion: 7.8.4
83+
setup-method: hvr-ppa
5084
allow-failure: false
5185
- compiler: ghc-7.6.3
86+
compilerKind: ghc
87+
compilerVersion: 7.6.3
88+
setup-method: hvr-ppa
5289
allow-failure: false
5390
fail-fast: false
5491
steps:
5592
- name: apt
5693
run: |
5794
apt-get update
58-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
59-
apt-add-repository -y 'ppa:hvr/ghc'
60-
apt-get update
61-
apt-get install -y $CC cabal-install-3.4
95+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
96+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
97+
mkdir -p "$HOME/.ghcup/bin"
98+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
99+
chmod a+x "$HOME/.ghcup/bin/ghcup"
100+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
101+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
102+
else
103+
apt-add-repository -y 'ppa:hvr/ghc'
104+
apt-get update
105+
apt-get install -y "$HCNAME"
106+
mkdir -p "$HOME/.ghcup/bin"
107+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
108+
chmod a+x "$HOME/.ghcup/bin/ghcup"
109+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
110+
fi
62111
env:
63-
CC: ${{ matrix.compiler }}
112+
HCKIND: ${{ matrix.compilerKind }}
113+
HCNAME: ${{ matrix.compiler }}
114+
HCVER: ${{ matrix.compilerVersion }}
64115
- name: Set PATH and environment variables
65116
run: |
66117
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
67-
echo "LANG=C.UTF-8" >> $GITHUB_ENV
68-
echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
69-
echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
70-
HCDIR=$(echo "/opt/$CC" | sed 's/-/\//')
71-
HCNAME=ghc
72-
HC=$HCDIR/bin/$HCNAME
73-
echo "HC=$HC" >> $GITHUB_ENV
74-
echo "HCPKG=$HCDIR/bin/$HCNAME-pkg" >> $GITHUB_ENV
75-
echo "HADDOCK=$HCDIR/bin/haddock" >> $GITHUB_ENV
76-
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
118+
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
119+
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
120+
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
121+
HCDIR=/opt/$HCKIND/$HCVER
122+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
123+
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
124+
echo "HC=$HC" >> "$GITHUB_ENV"
125+
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
126+
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
127+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
128+
else
129+
HC=$HCDIR/bin/$HCKIND
130+
echo "HC=$HC" >> "$GITHUB_ENV"
131+
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
132+
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
133+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
134+
fi
135+
77136
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
78-
echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
79-
echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV
80-
if [ $((HCNUMVER >= 70800)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV ; else echo "ARG_BENCH=--disable-benchmarks" >> $GITHUB_ENV ; fi
81-
echo "HEADHACKAGE=false" >> $GITHUB_ENV
82-
echo "ARG_COMPILER=--$HCNAME --with-compiler=$HC" >> $GITHUB_ENV
83-
echo "GHCJSARITH=0" >> $GITHUB_ENV
137+
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
138+
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
139+
if [ $((HCNUMVER >= 70800 && HCNUMVER < 90200)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" ; else echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV" ; fi
140+
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
141+
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
142+
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
84143
env:
85-
CC: ${{ matrix.compiler }}
144+
HCKIND: ${{ matrix.compilerKind }}
145+
HCNAME: ${{ matrix.compiler }}
146+
HCVER: ${{ matrix.compilerVersion }}
86147
- name: env
87148
run: |
88149
env
@@ -105,6 +166,10 @@ jobs:
105166
repository hackage.haskell.org
106167
url: http://hackage.haskell.org/
107168
EOF
169+
cat >> $CABAL_CONFIG <<EOF
170+
program-default-options
171+
ghc-options: $GHCJOBS +RTS -M3G -RTS
172+
EOF
108173
cat $CABAL_CONFIG
109174
- name: versions
110175
run: |
@@ -144,9 +209,10 @@ jobs:
144209
- name: generate cabal.project
145210
run: |
146211
PKGDIR_containers="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/containers-[0-9.]*')"
147-
echo "PKGDIR_containers=${PKGDIR_containers}" >> $GITHUB_ENV
212+
echo "PKGDIR_containers=${PKGDIR_containers}" >> "$GITHUB_ENV"
148213
PKGDIR_containers_tests="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/containers-tests-[0-9.]*')"
149-
echo "PKGDIR_containers_tests=${PKGDIR_containers_tests}" >> $GITHUB_ENV
214+
echo "PKGDIR_containers_tests=${PKGDIR_containers_tests}" >> "$GITHUB_ENV"
215+
rm -f cabal.project cabal.project.local
150216
touch cabal.project
151217
touch cabal.project.local
152218
echo "packages: ${PKGDIR_containers}" >> cabal.project
@@ -157,7 +223,7 @@ jobs:
157223
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
158224
cat >> cabal.project <<EOF
159225
EOF
160-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(binary|containers|containers-tests|text)$/; }' >> cabal.project.local
226+
$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
161227
cat cabal.project
162228
cat cabal.project.local
163229
- name: dump install plan

cabal.haskell-ci

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ install-dependencies: False
99

1010
-- text depends on binary, and binary depends on containers, so we need to
1111
-- reinstall these boot libraries
12-
installed: +all -binary -text
12+
-- ghc-heap is depended on by nothunks which we use in the tests, and also
13+
-- depends on containers
14+
installed: +all -binary -text -ghc-heap
1315

14-
-- gauge works only with newer GHC
15-
benchmarks: >=7.8.4
16+
-- gauge works only with newer GHC, and not with GHC 9.2 yet.
17+
benchmarks: >=7.8.4 && < 9.2
1618

1719
haddock: >= 8.2
1820

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 ==7.6.3 || ==7.8.4 || ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.4 || ==9.0.1
29+
GHC ==7.6.3 || ==7.8.4 || ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.1 || ==9.2.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.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
28+
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
2929

3030
source-repository head
3131
type: git

0 commit comments

Comments
 (0)