Skip to content

Commit 9103a00

Browse files
authored
Merge pull request #45 from andreasabel/ci-9.0/2
Haskell-CI: add GHC 9.0.2 and 9.2.1; remove broken IRC notification
2 parents d15ccf7 + 4c2f64f commit 9103a00

File tree

4 files changed

+132
-65
lines changed

4 files changed

+132
-65
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 125 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,162 @@
11
# This GitHub workflow config has been generated by a script via
22
#
3-
# haskell-ci 'github' '--irc-channels=irc.freenode.org#hackage' 'zlib.cabal' '--apt=zlib1g-dev' '--tests-jobs=>=7.4'
3+
# haskell-ci 'github' 'zlib.cabal'
44
#
55
# To regenerate the script (for example after adjusting tested-with) run
66
#
77
# haskell-ci regenerate
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.11.20210111
11+
# version: 0.14.1
1212
#
13-
# REGENDATA ("0.11.20210111",["github","--irc-channels=irc.freenode.org#hackage","zlib.cabal","--apt=zlib1g-dev","--tests-jobs=>=7.4"])
13+
# REGENDATA ("0.14.1",["github","zlib.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
1717
- push
1818
- pull_request
1919
jobs:
20-
irc:
21-
name: Haskell-CI (IRC notification)
22-
runs-on: ubuntu-18.04
23-
needs:
24-
- linux
25-
if: ${{ always() }}
26-
strategy:
27-
fail-fast: false
28-
steps:
29-
- name: IRC success notification (irc.freenode.org#hackage)
30-
uses: Gottox/[email protected]
31-
if: needs.linux.result == 'success'
32-
with:
33-
channel: "#hackage"
34-
message: "\x0313zlib\x03/\x0306${{ github.ref }}\x03 \x0314${{ github.sha }}\x03 https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} The build succeeded."
35-
nickname: github-actions
36-
server: irc.freenode.org
37-
- name: IRC failure notification (irc.freenode.org#hackage)
38-
uses: Gottox/[email protected]
39-
if: needs.linux.result != 'success'
40-
with:
41-
channel: "#hackage"
42-
message: "\x0313zlib\x03/\x0306${{ github.ref }}\x03 \x0314${{ github.sha }}\x03 https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} The build failed."
43-
nickname: github-actions
44-
server: irc.freenode.org
4520
linux:
46-
name: Haskell-CI Linux - GHC ${{ matrix.ghc }}
21+
name: Haskell-CI - Linux - ${{ matrix.compiler }}
4722
runs-on: ubuntu-18.04
23+
timeout-minutes:
24+
60
4825
container:
4926
image: buildpack-deps:bionic
5027
continue-on-error: ${{ matrix.allow-failure }}
5128
strategy:
5229
matrix:
5330
include:
54-
- ghc: 8.10.3
31+
- compiler: ghc-9.2.1
32+
compilerKind: ghc
33+
compilerVersion: 9.2.1
34+
setup-method: ghcup
35+
allow-failure: false
36+
- compiler: ghc-9.0.2
37+
compilerKind: ghc
38+
compilerVersion: 9.0.2
39+
setup-method: ghcup
5540
allow-failure: false
56-
- ghc: 8.8.4
41+
- compiler: ghc-8.10.7
42+
compilerKind: ghc
43+
compilerVersion: 8.10.7
44+
setup-method: ghcup
5745
allow-failure: false
58-
- ghc: 8.6.5
46+
- compiler: ghc-8.8.4
47+
compilerKind: ghc
48+
compilerVersion: 8.8.4
49+
setup-method: hvr-ppa
5950
allow-failure: false
60-
- ghc: 8.4.4
51+
- compiler: ghc-8.6.5
52+
compilerKind: ghc
53+
compilerVersion: 8.6.5
54+
setup-method: hvr-ppa
6155
allow-failure: false
62-
- ghc: 8.2.2
56+
- compiler: ghc-8.4.4
57+
compilerKind: ghc
58+
compilerVersion: 8.4.4
59+
setup-method: hvr-ppa
6360
allow-failure: false
64-
- ghc: 8.0.2
61+
- compiler: ghc-8.2.2
62+
compilerKind: ghc
63+
compilerVersion: 8.2.2
64+
setup-method: hvr-ppa
6565
allow-failure: false
66-
- ghc: 7.10.3
66+
- compiler: ghc-8.0.2
67+
compilerKind: ghc
68+
compilerVersion: 8.0.2
69+
setup-method: hvr-ppa
6770
allow-failure: false
68-
- ghc: 7.8.4
71+
- compiler: ghc-7.10.3
72+
compilerKind: ghc
73+
compilerVersion: 7.10.3
74+
setup-method: hvr-ppa
6975
allow-failure: false
70-
- ghc: 7.6.3
76+
- compiler: ghc-7.8.4
77+
compilerKind: ghc
78+
compilerVersion: 7.8.4
79+
setup-method: hvr-ppa
7180
allow-failure: false
72-
- ghc: 7.4.2
81+
- compiler: ghc-7.6.3
82+
compilerKind: ghc
83+
compilerVersion: 7.6.3
84+
setup-method: hvr-ppa
7385
allow-failure: false
74-
- ghc: 7.2.2
86+
- compiler: ghc-7.4.2
87+
compilerKind: ghc
88+
compilerVersion: 7.4.2
89+
setup-method: hvr-ppa
7590
allow-failure: false
76-
- ghc: 7.0.4
91+
- compiler: ghc-7.2.2
92+
compilerKind: ghc
93+
compilerVersion: 7.2.2
94+
setup-method: hvr-ppa
95+
allow-failure: false
96+
- compiler: ghc-7.0.4
97+
compilerKind: ghc
98+
compilerVersion: 7.0.4
99+
setup-method: hvr-ppa
77100
allow-failure: false
78101
fail-fast: false
79102
steps:
80103
- name: apt
81104
run: |
82105
apt-get update
83-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
84-
apt-add-repository -y 'ppa:hvr/ghc'
85-
apt-get update
86-
apt-get install -y ghc-$GHC_VERSION cabal-install-3.2 zlib1g-dev
106+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
107+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
108+
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"
110+
chmod a+x "$HOME/.ghcup/bin/ghcup"
111+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
112+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
113+
apt-get update
114+
apt-get install -y zlib1g-dev
115+
else
116+
apt-add-repository -y 'ppa:hvr/ghc'
117+
apt-get update
118+
apt-get install -y "$HCNAME" zlib1g-dev
119+
mkdir -p "$HOME/.ghcup/bin"
120+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
121+
chmod a+x "$HOME/.ghcup/bin/ghcup"
122+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
123+
fi
87124
env:
88-
GHC_VERSION: ${{ matrix.ghc }}
125+
HCKIND: ${{ matrix.compilerKind }}
126+
HCNAME: ${{ matrix.compiler }}
127+
HCVER: ${{ matrix.compilerVersion }}
89128
- name: Set PATH and environment variables
90129
run: |
91130
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
92-
echo "LANG=C.UTF-8" >> $GITHUB_ENV
93-
echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
94-
echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
95-
HC=/opt/ghc/$GHC_VERSION/bin/ghc
96-
echo "HC=$HC" >> $GITHUB_ENV
97-
echo "HCPKG=/opt/ghc/$GHC_VERSION/bin/ghc-pkg" >> $GITHUB_ENV
98-
echo "HADDOCK=/opt/ghc/$GHC_VERSION/bin/haddock" >> $GITHUB_ENV
99-
echo "CABAL=/opt/cabal/3.2/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
131+
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
132+
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
133+
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
134+
HCDIR=/opt/$HCKIND/$HCVER
135+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
136+
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
137+
echo "HC=$HC" >> "$GITHUB_ENV"
138+
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
139+
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
140+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
141+
else
142+
HC=$HCDIR/bin/$HCKIND
143+
echo "HC=$HC" >> "$GITHUB_ENV"
144+
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
145+
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
146+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
147+
fi
148+
100149
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
101-
echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
102-
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV ; else echo "ARG_TESTS=--disable-tests" >> $GITHUB_ENV ; fi
103-
echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV
104-
echo "ARG_COMPILER=--ghc --with-compiler=/opt/ghc/$GHC_VERSION/bin/ghc" >> $GITHUB_ENV
105-
echo "GHCJSARITH=0" >> $GITHUB_ENV
150+
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
151+
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
152+
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
153+
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
154+
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
155+
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
106156
env:
107-
GHC_VERSION: ${{ matrix.ghc }}
157+
HCKIND: ${{ matrix.compilerKind }}
158+
HCNAME: ${{ matrix.compiler }}
159+
HCVER: ${{ matrix.compilerVersion }}
108160
- name: env
109161
run: |
110162
env
@@ -127,6 +179,10 @@ jobs:
127179
repository hackage.haskell.org
128180
url: http://hackage.haskell.org/
129181
EOF
182+
cat >> $CABAL_CONFIG <<EOF
183+
program-default-options
184+
ghc-options: $GHCJOBS +RTS -M3G -RTS
185+
EOF
130186
cat $CABAL_CONFIG
131187
- name: versions
132188
run: |
@@ -149,10 +205,14 @@ jobs:
149205
uses: actions/checkout@v2
150206
with:
151207
path: source
208+
- name: initial cabal.project for sdist
209+
run: |
210+
touch cabal.project
211+
echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project
212+
cat cabal.project
152213
- name: sdist
153214
run: |
154215
mkdir -p sdist
155-
cd source || false
156216
$CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist
157217
- name: unpack
158218
run: |
@@ -161,7 +221,8 @@ jobs:
161221
- name: generate cabal.project
162222
run: |
163223
PKGDIR_zlib="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/zlib-[0-9.]*')"
164-
echo "PKGDIR_zlib=${PKGDIR_zlib}" >> $GITHUB_ENV
224+
echo "PKGDIR_zlib=${PKGDIR_zlib}" >> "$GITHUB_ENV"
225+
rm -f cabal.project cabal.project.local
165226
touch cabal.project
166227
touch cabal.project.local
167228
echo "packages: ${PKGDIR_zlib}" >> cabal.project
@@ -179,9 +240,9 @@ jobs:
179240
- name: cache
180241
uses: actions/cache@v2
181242
with:
182-
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
243+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
183244
path: ~/.cabal/store
184-
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
245+
restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
185246
- name: install dependencies
186247
run: |
187248
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.ghc.environment.*
2+
/dist-newstyle/

cabal.haskell-ci

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
apt: zlib1g-dev
2+
tests: >= 7.4

zlib.cabal

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ tested-with: GHC == 7.0.4
3333
, GHC == 8.4.4
3434
, GHC == 8.6.5
3535
, GHC == 8.8.4
36-
, GHC == 8.10.3
36+
, GHC == 8.10.7
37+
, GHC == 9.0.2
38+
, GHC == 9.2.1
3739

3840
extra-source-files: changelog
3941
-- zlib C sources (for Windows)

0 commit comments

Comments
 (0)