8
8
#
9
9
# For more information, see https://github.com/haskell-CI/haskell-ci
10
10
#
11
- # version: 0.17.20231010
11
+ # version: 0.19.20240501
12
12
#
13
- # REGENDATA ("0.17.20231010 ",["--config=cabal.haskell-ci","github","cabal.project"])
13
+ # REGENDATA ("0.19.20240501 ",["--config=cabal.haskell-ci","github","cabal.project"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
@@ -27,24 +27,24 @@ 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 : ghc-9.8.1
35
+ - compiler : ghc-9.8.2
36
36
compilerKind : ghc
37
- compilerVersion : 9.8.1
37
+ compilerVersion : 9.8.2
38
38
setup-method : ghcup
39
39
allow-failure : false
40
- - compiler : ghc-9.6.3
40
+ - compiler : ghc-9.6.5
41
41
compilerKind : ghc
42
- compilerVersion : 9.6.3
42
+ compilerVersion : 9.6.5
43
43
setup-method : ghcup
44
44
allow-failure : false
45
- - compiler : ghc-9.4.7
45
+ - compiler : ghc-9.4.8
46
46
compilerKind : ghc
47
- compilerVersion : 9.4.7
47
+ compilerVersion : 9.4.8
48
48
setup-method : ghcup
49
49
allow-failure : false
50
50
- compiler : ghc-9.2.8
@@ -65,79 +65,25 @@ jobs:
65
65
- compiler : ghc-8.8.4
66
66
compilerKind : ghc
67
67
compilerVersion : 8.8.4
68
- setup-method : hvr-ppa
68
+ setup-method : ghcup
69
69
allow-failure : false
70
70
- compiler : ghc-8.6.5
71
71
compilerKind : ghc
72
72
compilerVersion : 8.6.5
73
- setup-method : hvr-ppa
74
- allow-failure : false
75
- - compiler : ghc-8.4.4
76
- compilerKind : ghc
77
- compilerVersion : 8.4.4
78
- setup-method : hvr-ppa
79
- allow-failure : false
80
- - compiler : ghc-8.2.2
81
- compilerKind : ghc
82
- compilerVersion : 8.2.2
83
- setup-method : hvr-ppa
84
- allow-failure : false
85
- - compiler : ghc-8.0.2
86
- compilerKind : ghc
87
- compilerVersion : 8.0.2
88
- setup-method : hvr-ppa
89
- allow-failure : false
90
- - compiler : ghc-7.10.3
91
- compilerKind : ghc
92
- compilerVersion : 7.10.3
93
- setup-method : hvr-ppa
94
- allow-failure : false
95
- - compiler : ghc-7.8.4
96
- compilerKind : ghc
97
- compilerVersion : 7.8.4
98
- setup-method : hvr-ppa
99
- allow-failure : false
100
- - compiler : ghc-7.6.3
101
- compilerKind : ghc
102
- compilerVersion : 7.6.3
103
- setup-method : hvr-ppa
104
- allow-failure : false
105
- - compiler : ghc-7.4.2
106
- compilerKind : ghc
107
- compilerVersion : 7.4.2
108
- setup-method : hvr-ppa
109
- allow-failure : false
110
- - compiler : ghc-7.2.2
111
- compilerKind : ghc
112
- compilerVersion : 7.2.2
113
- setup-method : hvr-ppa
114
- allow-failure : false
115
- - compiler : ghc-7.0.4
116
- compilerKind : ghc
117
- compilerVersion : 7.0.4
118
- setup-method : hvr-ppa
73
+ setup-method : ghcup
119
74
allow-failure : false
120
75
fail-fast : false
121
76
steps :
122
77
- name : apt
123
78
run : |
124
79
apt-get update
125
80
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
126
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
127
- mkdir -p "$HOME/.ghcup/bin"
128
- curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
129
- chmod a+x "$HOME/.ghcup/bin/ghcup"
130
- "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
131
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
132
- else
133
- apt-add-repository -y 'ppa:hvr/ghc'
134
- apt-get update
135
- apt-get install -y "$HCNAME"
136
- mkdir -p "$HOME/.ghcup/bin"
137
- curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
138
- chmod a+x "$HOME/.ghcup/bin/ghcup"
139
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
140
- fi
81
+ mkdir -p "$HOME/.ghcup/bin"
82
+ curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
83
+ chmod a+x "$HOME/.ghcup/bin/ghcup"
84
+ "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
85
+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
86
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
141
87
env :
142
88
HCKIND : ${{ matrix.compilerKind }}
143
89
HCNAME : ${{ matrix.compiler }}
@@ -149,22 +95,13 @@ jobs:
149
95
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
150
96
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
151
97
HCDIR=/opt/$HCKIND/$HCVER
152
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
153
- HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
154
- HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
155
- HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
156
- echo "HC=$HC" >> "$GITHUB_ENV"
157
- echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
158
- echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
159
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
160
- else
161
- HC=$HCDIR/bin/$HCKIND
162
- echo "HC=$HC" >> "$GITHUB_ENV"
163
- echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
164
- echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
165
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
166
- fi
167
-
98
+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
99
+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
100
+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
101
+ echo "HC=$HC" >> "$GITHUB_ENV"
102
+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
103
+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
104
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
168
105
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
169
106
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
170
107
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -221,15 +158,15 @@ jobs:
221
158
chmod a+x $HOME/.cabal/bin/cabal-plan
222
159
cabal-plan --version
223
160
- name : checkout
224
- uses : actions/checkout@v3
161
+ uses : actions/checkout@v4
225
162
with :
226
163
path : source
227
164
- name : initial cabal.project for sdist
228
165
run : |
229
166
touch cabal.project
230
167
echo "packages: $GITHUB_WORKSPACE/source/indexed-traversable" >> cabal.project
231
- if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/indexed-traversable-instances" >> cabal.project ; fi
232
- if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/indexed-traversable-benchmarks" >> cabal.project ; fi
168
+ echo "packages: $GITHUB_WORKSPACE/source/indexed-traversable-instances" >> cabal.project
169
+ echo "packages: $GITHUB_WORKSPACE/source/indexed-traversable-benchmarks" >> cabal.project
233
170
cat cabal.project
234
171
- name : sdist
235
172
run : |
@@ -251,14 +188,14 @@ jobs:
251
188
touch cabal.project
252
189
touch cabal.project.local
253
190
echo "packages: ${PKGDIR_indexed_traversable}" >> cabal.project
254
- if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "packages: ${PKGDIR_indexed_traversable_instances}" >> cabal.project ; fi
255
- if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "packages: ${PKGDIR_indexed_traversable_benchmarks}" >> cabal.project ; fi
256
- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package indexed-traversable" >> cabal.project ; fi
257
- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
258
- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package indexed-traversable-instances" >> cabal.project ; fi
259
- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
260
- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package indexed-traversable-benchmarks" >> cabal.project ; fi
261
- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
191
+ echo "packages: ${PKGDIR_indexed_traversable_instances}" >> cabal.project
192
+ echo "packages: ${PKGDIR_indexed_traversable_benchmarks}" >> cabal.project
193
+ echo "package indexed-traversable" >> cabal.project
194
+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
195
+ echo "package indexed-traversable-instances" >> cabal.project
196
+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
197
+ echo "package indexed-traversable-benchmarks" >> cabal.project
198
+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
262
199
cat >> cabal.project <<EOF
263
200
EOF
264
201
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(indexed-traversable|indexed-traversable-benchmarks|indexed-traversable-instances)$/; }' >> cabal.project.local
@@ -269,7 +206,7 @@ jobs:
269
206
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
270
207
cabal-plan
271
208
- name : restore cache
272
- uses : actions/cache/restore@v3
209
+ uses : actions/cache/restore@v4
273
210
with :
274
211
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
275
212
path : ~/.cabal/store
@@ -282,15 +219,15 @@ jobs:
282
219
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
283
220
- name : tests
284
221
run : |
285
- if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then $ CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct ; fi
222
+ $ CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
286
223
- name : cabal check
287
224
run : |
288
225
cd ${PKGDIR_indexed_traversable} || false
289
226
${CABAL} -vnormal check
290
- if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then cd ${PKGDIR_indexed_traversable_instances} || false ; fi
291
- if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then $ {CABAL} -vnormal check ; fi
292
- if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then cd ${PKGDIR_indexed_traversable_benchmarks} || false ; fi
293
- if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then $ {CABAL} -vnormal check ; fi
227
+ cd ${PKGDIR_indexed_traversable_instances} || false
228
+ $ {CABAL} -vnormal check
229
+ cd ${PKGDIR_indexed_traversable_benchmarks} || false
230
+ $ {CABAL} -vnormal check
294
231
- name : haddock
295
232
run : |
296
233
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
@@ -299,7 +236,7 @@ jobs:
299
236
rm -f cabal.project.local
300
237
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
301
238
- name : save cache
302
- uses : actions/cache/save@v3
239
+ uses : actions/cache/save@v4
303
240
if : always()
304
241
with :
305
242
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
0 commit comments