1
1
# This GitHub workflow config has been generated by a script via
2
2
#
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'
4
4
#
5
5
# To regenerate the script (for example after adjusting tested-with) run
6
6
#
7
7
# haskell-ci regenerate
8
8
#
9
9
# For more information, see https://github.com/haskell-CI/haskell-ci
10
10
#
11
- # version: 0.11.20210111
11
+ # version: 0.14.1
12
12
#
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"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
17
17
- push
18
18
- pull_request
19
19
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
-
31
- if : needs.linux.result == 'success'
32
- with :
33
- channel : " #hackage"
34
- message : " \x03 13zlib\x03 /\x03 06${{ github.ref }}\x03 \x03 14${{ 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
-
39
- if : needs.linux.result != 'success'
40
- with :
41
- channel : " #hackage"
42
- message : " \x03 13zlib\x03 /\x03 06${{ github.ref }}\x03 \x03 14${{ 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
45
20
linux :
46
- name : Haskell-CI Linux - GHC ${{ matrix.ghc }}
21
+ name : Haskell-CI - Linux - ${{ matrix.compiler }}
47
22
runs-on : ubuntu-18.04
23
+ timeout-minutes :
24
+ 60
48
25
container :
49
26
image : buildpack-deps:bionic
50
27
continue-on-error : ${{ matrix.allow-failure }}
51
28
strategy :
52
29
matrix :
53
30
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
55
40
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
57
45
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
59
50
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
61
55
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
63
60
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
65
65
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
67
70
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
69
75
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
71
80
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
73
85
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
75
90
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
77
100
allow-failure : false
78
101
fail-fast : false
79
102
steps :
80
103
- name : apt
81
104
run : |
82
105
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
87
124
env :
88
- GHC_VERSION : ${{ matrix.ghc }}
125
+ HCKIND : ${{ matrix.compilerKind }}
126
+ HCNAME : ${{ matrix.compiler }}
127
+ HCVER : ${{ matrix.compilerVersion }}
89
128
- name : Set PATH and environment variables
90
129
run : |
91
130
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
+
100
149
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"
106
156
env :
107
- GHC_VERSION : ${{ matrix.ghc }}
157
+ HCKIND : ${{ matrix.compilerKind }}
158
+ HCNAME : ${{ matrix.compiler }}
159
+ HCVER : ${{ matrix.compilerVersion }}
108
160
- name : env
109
161
run : |
110
162
env
@@ -127,6 +179,10 @@ jobs:
127
179
repository hackage.haskell.org
128
180
url: http://hackage.haskell.org/
129
181
EOF
182
+ cat >> $CABAL_CONFIG <<EOF
183
+ program-default-options
184
+ ghc-options: $GHCJOBS +RTS -M3G -RTS
185
+ EOF
130
186
cat $CABAL_CONFIG
131
187
- name : versions
132
188
run : |
@@ -149,10 +205,14 @@ jobs:
149
205
uses : actions/checkout@v2
150
206
with :
151
207
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
152
213
- name : sdist
153
214
run : |
154
215
mkdir -p sdist
155
- cd source || false
156
216
$CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist
157
217
- name : unpack
158
218
run : |
@@ -161,7 +221,8 @@ jobs:
161
221
- name : generate cabal.project
162
222
run : |
163
223
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
165
226
touch cabal.project
166
227
touch cabal.project.local
167
228
echo "packages: ${PKGDIR_zlib}" >> cabal.project
@@ -179,9 +240,9 @@ jobs:
179
240
- name : cache
180
241
uses : actions/cache@v2
181
242
with :
182
- key : ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
243
+ key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
183
244
path : ~/.cabal/store
184
- restore-keys : ${{ runner.os }}-${{ matrix.ghc }}-
245
+ restore-keys : ${{ runner.os }}-${{ matrix.compiler }}-
185
246
- name : install dependencies
186
247
run : |
187
248
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all
0 commit comments