8
8
#
9
9
# For more information, see https://github.com/haskell-CI/haskell-ci
10
10
#
11
- # version: 0.17.20240109
11
+ # version: 0.19.20240514
12
12
#
13
- # REGENDATA ("0.17.20240109 ",["github","cabal.project"])
13
+ # REGENDATA ("0.19.20240514 ",["github","cabal.project"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
@@ -27,29 +27,29 @@ jobs:
27
27
timeout-minutes :
28
28
60
29
29
container :
30
- image : buildpack-deps:bionic
30
+ image : buildpack-deps:jammy
31
31
continue-on-error : ${{ matrix.allow-failure }}
32
32
strategy :
33
33
matrix :
34
34
include :
35
- - compiler : ghcjs-8.4
36
- compilerKind : ghcjs
37
- compilerVersion : " 8.4 "
38
- setup-method : hvr-ppa
35
+ - compiler : ghc-9.10.1
36
+ compilerKind : ghc
37
+ compilerVersion : 9.10.1
38
+ setup-method : ghcup
39
39
allow-failure : false
40
- - compiler : ghc-9.8.1
40
+ - compiler : ghc-9.8.2
41
41
compilerKind : ghc
42
- compilerVersion : 9.8.1
42
+ compilerVersion : 9.8.2
43
43
setup-method : ghcup
44
44
allow-failure : false
45
- - compiler : ghc-9.6.3
45
+ - compiler : ghc-9.6.5
46
46
compilerKind : ghc
47
- compilerVersion : 9.6.3
47
+ compilerVersion : 9.6.5
48
48
setup-method : ghcup
49
49
allow-failure : false
50
- - compiler : ghc-9.4.7
50
+ - compiler : ghc-9.4.8
51
51
compilerKind : ghc
52
- compilerVersion : 9.4.7
52
+ compilerVersion : 9.4.8
53
53
setup-method : ghcup
54
54
allow-failure : false
55
55
- compiler : ghc-9.2.8
@@ -70,119 +70,49 @@ jobs:
70
70
- compiler : ghc-8.8.4
71
71
compilerKind : ghc
72
72
compilerVersion : 8.8.4
73
- setup-method : hvr-ppa
73
+ setup-method : ghcup
74
74
allow-failure : false
75
75
- compiler : ghc-8.6.5
76
76
compilerKind : ghc
77
77
compilerVersion : 8.6.5
78
- setup-method : hvr-ppa
79
- allow-failure : false
80
- - compiler : ghc-8.4.4
81
- compilerKind : ghc
82
- compilerVersion : 8.4.4
83
- setup-method : hvr-ppa
84
- allow-failure : false
85
- - compiler : ghc-8.2.2
86
- compilerKind : ghc
87
- compilerVersion : 8.2.2
88
- setup-method : hvr-ppa
89
- allow-failure : false
90
- - compiler : ghc-8.0.2
91
- compilerKind : ghc
92
- compilerVersion : 8.0.2
93
- setup-method : hvr-ppa
94
- allow-failure : false
95
- - compiler : ghc-7.10.3
96
- compilerKind : ghc
97
- compilerVersion : 7.10.3
98
- setup-method : hvr-ppa
99
- allow-failure : false
100
- - compiler : ghc-7.8.4
101
- compilerKind : ghc
102
- compilerVersion : 7.8.4
103
- setup-method : hvr-ppa
104
- allow-failure : false
105
- - compiler : ghc-7.6.3
106
- compilerKind : ghc
107
- compilerVersion : 7.6.3
108
- setup-method : hvr-ppa
109
- allow-failure : false
110
- - compiler : ghc-7.4.2
111
- compilerKind : ghc
112
- compilerVersion : 7.4.2
113
- setup-method : hvr-ppa
78
+ setup-method : ghcup
114
79
allow-failure : false
115
80
fail-fast : false
116
81
steps :
117
- - name : Set GHCJS environment variables
118
- run : |
119
- if [ $HCKIND = ghcjs ]; then
120
- echo "GHCJS=true" >> "$GITHUB_ENV"
121
- echo "GHCJSARITH=1" >> "$GITHUB_ENV"
122
- else
123
- echo "GHCJS=false" >> "$GITHUB_ENV"
124
- echo "GHCJSARITH=0" >> "$GITHUB_ENV"
125
- fi
126
- env :
127
- HCKIND : ${{ matrix.compilerKind }}
128
- HCNAME : ${{ matrix.compiler }}
129
- HCVER : ${{ matrix.compilerVersion }}
130
82
- name : apt
131
83
run : |
132
84
apt-get update
133
85
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
134
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
135
- mkdir -p "$HOME/.ghcup/bin"
136
- curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
137
- chmod a+x "$HOME/.ghcup/bin/ghcup"
138
- "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
139
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
140
- else
141
- apt-add-repository -y 'ppa:hvr/ghc'
142
- if [ $((GHCJSARITH)) -ne 0 ] ; then apt-add-repository -y 'ppa:hvr/ghcjs' ; fi
143
- if [ $((GHCJSARITH)) -ne 0 ] ; then curl -sSL "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" | apt-key add - ; fi
144
- if [ $((GHCJSARITH)) -ne 0 ] ; then apt-add-repository -y 'deb https://deb.nodesource.com/node_10.x bionic main' ; fi
145
- apt-get update
146
- if [ $((GHCJSARITH)) -ne 0 ] ; then apt-get install -y "$HCNAME" ghc-8.4.4 nodejs ; else apt-get install -y "$HCNAME" ; fi
147
- mkdir -p "$HOME/.ghcup/bin"
148
- curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
149
- chmod a+x "$HOME/.ghcup/bin/ghcup"
150
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
151
- fi
86
+ mkdir -p "$HOME/.ghcup/bin"
87
+ curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
88
+ chmod a+x "$HOME/.ghcup/bin/ghcup"
89
+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
90
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
152
91
env :
153
92
HCKIND : ${{ matrix.compilerKind }}
154
93
HCNAME : ${{ matrix.compiler }}
155
94
HCVER : ${{ matrix.compilerVersion }}
156
95
- name : Set PATH and environment variables
157
96
run : |
158
97
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
159
- if [ $((GHCJSARITH)) -ne 0 ] ; then echo "/opt/ghc/8.4.4/bin" >> $GITHUB_PATH ; fi
160
98
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
161
99
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
162
100
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
163
101
HCDIR=/opt/$HCKIND/$HCVER
164
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
165
- HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
166
- HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
167
- HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
168
- echo "HC=$HC" >> "$GITHUB_ENV"
169
- echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
170
- echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
171
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
172
- else
173
- HC=$HCDIR/bin/$HCKIND
174
- echo "HC=$HC" >> "$GITHUB_ENV"
175
- echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
176
- echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
177
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
178
- fi
179
-
102
+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
103
+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
104
+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
105
+ echo "HC=$HC" >> "$GITHUB_ENV"
106
+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
107
+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
108
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
180
109
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
181
110
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
182
- if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 70600)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
111
+ echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
183
112
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
184
113
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
185
114
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
115
+ echo "GHCJSARITH=0" >> "$GITHUB_ENV"
186
116
env :
187
117
HCKIND : ${{ matrix.compilerKind }}
188
118
HCNAME : ${{ matrix.compiler }}
@@ -219,8 +149,6 @@ jobs:
219
149
$HC --version || true
220
150
$HC --print-project-git-commit-id || true
221
151
$CABAL --version || true
222
- if [ $((GHCJSARITH)) -ne 0 ] ; then node --version ; fi
223
- if [ $((GHCJSARITH)) -ne 0 ] ; then echo $GHCJS ; fi
224
152
- name : update cabal index
225
153
run : |
226
154
$CABAL v2-update -v
@@ -236,14 +164,14 @@ jobs:
236
164
- name : install cabal-docspec
237
165
run : |
238
166
mkdir -p $HOME/.cabal/bin
239
- curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20231219 /cabal-docspec-0.0.0.20231219 -x86_64-linux.xz > cabal-docspec.xz
240
- echo '8b60448275466bbe2b9409741b5dd07a41c541283017b95b44efe6e31379d067 cabal-docspec.xz' | sha256sum -c -
167
+ curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240414 /cabal-docspec-0.0.0.20240414 -x86_64-linux.xz > cabal-docspec.xz
168
+ echo '2d18a3f79619e8ec5f11870f926f6dc2616e02a6c889315b7f82044b95a1adb9 cabal-docspec.xz' | sha256sum -c -
241
169
xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
242
170
rm -f cabal-docspec.xz
243
171
chmod a+x $HOME/.cabal/bin/cabal-docspec
244
172
cabal-docspec --version
245
173
- name : checkout
246
- uses : actions/checkout@v3
174
+ uses : actions/checkout@v4
247
175
with :
248
176
path : source
249
177
- name : initial cabal.project for sdist
@@ -267,19 +195,19 @@ jobs:
267
195
touch cabal.project
268
196
touch cabal.project.local
269
197
echo "packages: ${PKGDIR_tree_diff}" >> cabal.project
270
- if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) -ne 0 ] ; then echo "package tree-diff" >> cabal.project ; fi
271
- if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
198
+ echo "package tree-diff" >> cabal.project
199
+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
272
200
cat >> cabal.project <<EOF
273
201
EOF
274
- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(tree-diff)$/; }' >> cabal.project.local
202
+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any. $_ installed\n" unless /^(tree-diff)$/; }' >> cabal.project.local
275
203
cat cabal.project
276
204
cat cabal.project.local
277
205
- name : dump install plan
278
206
run : |
279
207
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
280
208
cabal-plan
281
209
- name : restore cache
282
- uses : actions/cache/restore@v3
210
+ uses : actions/cache/restore@v4
283
211
with :
284
212
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
285
213
path : ~/.cabal/store
@@ -296,18 +224,18 @@ jobs:
296
224
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
297
225
- name : tests
298
226
run : |
299
- if [ $((! GHCJSARITH && HCNUMVER >= 70600)) -ne 0 ] ; then $ CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct ; fi
227
+ $ CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
300
228
- name : docspec
301
229
run : |
302
- if [ $((! GHCJSARITH && HCNUMVER >= 80000)) -ne 0 ] ; then $ CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all ; fi
303
- if [ $((! GHCJSARITH && HCNUMVER >= 80000)) -ne 0 ] ; then cabal-docspec $ARG_COMPILER ; fi
230
+ $ CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all
231
+ cabal-docspec $ARG_COMPILER
304
232
- name : cabal check
305
233
run : |
306
234
cd ${PKGDIR_tree_diff} || false
307
235
${CABAL} -vnormal check
308
236
- name : haddock
309
237
run : |
310
- if [ $((! GHCJSARITH && HCNUMVER >= 70800)) -ne 0 ] ; then $ CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ; fi
238
+ $ CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
311
239
- name : unconstrained build
312
240
run : |
313
241
rm -f cabal.project.local
@@ -317,13 +245,13 @@ jobs:
317
245
rm -f cabal.project.local
318
246
- name : constraint set random-hashable
319
247
run : |
320
- if [ $((! GHCJSARITH && HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='hashable >=1.3.2.0' --constraint='hashable +random-initial-seed' all --dry-run ; fi
321
- if [ $((! GHCJSARITH && HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then cabal-plan topo | sort ; fi
322
- if [ $((! GHCJSARITH && HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='hashable >=1.3.2.0' --constraint='hashable +random-initial-seed' --dependencies-only -j2 all ; fi
323
- if [ $((! GHCJSARITH && HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='hashable >=1.3.2.0' --constraint='hashable +random-initial-seed' all ; fi
324
- if [ $((! GHCJSARITH && HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='hashable >=1.3.2.0' --constraint='hashable +random-initial-seed' all ; fi
248
+ if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='hashable >=1.3.2.0' --constraint='hashable +random-initial-seed' all --dry-run ; fi
249
+ if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then cabal-plan topo | sort ; fi
250
+ if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='hashable >=1.3.2.0' --constraint='hashable +random-initial-seed' --dependencies-only -j2 all ; fi
251
+ if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='hashable >=1.3.2.0' --constraint='hashable +random-initial-seed' all ; fi
252
+ if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='hashable >=1.3.2.0' --constraint='hashable +random-initial-seed' all ; fi
325
253
- name : save cache
326
- uses : actions/cache/save@v3
254
+ uses : actions/cache/save@v4
327
255
if : always()
328
256
with :
329
257
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
0 commit comments