6
6
#
7
7
# haskell-ci regenerate
8
8
#
9
- # For more information, see https://github.com/haskell-CI /haskell-ci
9
+ # For more information, see https://github.com/andreasabel /haskell-ci
10
10
#
11
- # version: 0.15.20220525
11
+ # version: 0.17.20231012
12
12
#
13
- # REGENDATA ("0.15.20220525 ",["github","hsc2hs.cabal"])
13
+ # REGENDATA ("0.17.20231012 ",["github","hsc2hs.cabal"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
17
- - push
18
- - pull_request
17
+ push :
18
+ branches :
19
+ - master
20
+ pull_request :
21
+ branches :
22
+ - master
19
23
jobs :
20
24
linux :
21
25
name : Haskell-CI - Linux - ${{ matrix.compiler }}
22
26
runs-on : ubuntu-20.04
23
27
timeout-minutes :
24
28
60
25
29
container :
26
- image : buildpack-deps:bionic
30
+ image : buildpack-deps:focal
27
31
continue-on-error : ${{ matrix.allow-failure }}
28
32
strategy :
29
33
matrix :
30
34
include :
31
- - compiler : ghc-9.4.0.20220501
35
+ - compiler : ghc-9.8.1
32
36
compilerKind : ghc
33
- compilerVersion : 9.4.0.20220501
37
+ compilerVersion : 9.8.1
34
38
setup-method : ghcup
35
- allow-failure : true
36
- - compiler : ghc-9.2.2
39
+ allow-failure : false
40
+ - compiler : ghc-9.6.3
41
+ compilerKind : ghc
42
+ compilerVersion : 9.6.3
43
+ setup-method : ghcup
44
+ allow-failure : false
45
+ - compiler : ghc-9.4.7
37
46
compilerKind : ghc
38
- compilerVersion : 9.2.2
47
+ compilerVersion : 9.4.7
48
+ setup-method : ghcup
49
+ allow-failure : false
50
+ - compiler : ghc-9.2.8
51
+ compilerKind : ghc
52
+ compilerVersion : 9.2.8
39
53
setup-method : ghcup
40
54
allow-failure : false
41
55
- compiler : ghc-9.0.2
@@ -51,80 +65,40 @@ jobs:
51
65
- compiler : ghc-8.8.4
52
66
compilerKind : ghc
53
67
compilerVersion : 8.8.4
54
- setup-method : hvr-ppa
68
+ setup-method : ghcup
55
69
allow-failure : false
56
70
- compiler : ghc-8.6.5
57
71
compilerKind : ghc
58
72
compilerVersion : 8.6.5
59
- setup-method : hvr-ppa
73
+ setup-method : ghcup
60
74
allow-failure : false
61
75
- compiler : ghc-8.4.4
62
76
compilerKind : ghc
63
77
compilerVersion : 8.4.4
64
- setup-method : hvr-ppa
78
+ setup-method : ghcup
65
79
allow-failure : false
66
80
- compiler : ghc-8.2.2
67
81
compilerKind : ghc
68
82
compilerVersion : 8.2.2
69
- setup-method : hvr-ppa
83
+ setup-method : ghcup
70
84
allow-failure : false
71
85
- compiler : ghc-8.0.2
72
86
compilerKind : ghc
73
87
compilerVersion : 8.0.2
74
- setup-method : hvr-ppa
75
- allow-failure : false
76
- - compiler : ghc-7.10.3
77
- compilerKind : ghc
78
- compilerVersion : 7.10.3
79
- setup-method : hvr-ppa
80
- allow-failure : false
81
- - compiler : ghc-7.8.4
82
- compilerKind : ghc
83
- compilerVersion : 7.8.4
84
- setup-method : hvr-ppa
85
- allow-failure : false
86
- - compiler : ghc-7.6.3
87
- compilerKind : ghc
88
- compilerVersion : 7.6.3
89
- setup-method : hvr-ppa
90
- allow-failure : false
91
- - compiler : ghc-7.4.2
92
- compilerKind : ghc
93
- compilerVersion : 7.4.2
94
- setup-method : hvr-ppa
95
- allow-failure : false
96
- - compiler : ghc-7.2.2
97
- compilerKind : ghc
98
- compilerVersion : 7.2.2
99
- setup-method : hvr-ppa
100
- allow-failure : false
101
- - compiler : ghc-7.0.4
102
- compilerKind : ghc
103
- compilerVersion : 7.0.4
104
- setup-method : hvr-ppa
88
+ setup-method : ghcup
105
89
allow-failure : false
106
90
fail-fast : false
107
91
steps :
108
92
- name : apt
109
93
run : |
110
94
apt-get update
111
- apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
112
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
113
- mkdir -p "$HOME/.ghcup/bin"
114
- curl -sL https://downloads.haskell.org/ghcup/0.1.17.8/x86_64-linux-ghcup-0.1.17.8 > "$HOME/.ghcup/bin/ghcup"
115
- chmod a+x "$HOME/.ghcup/bin/ghcup"
116
- if $HEADHACKAGE; then "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; fi
117
- "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
118
- "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
119
- else
120
- apt-add-repository -y 'ppa:hvr/ghc'
121
- apt-get update
122
- apt-get install -y "$HCNAME"
123
- mkdir -p "$HOME/.ghcup/bin"
124
- curl -sL https://downloads.haskell.org/ghcup/0.1.17.8/x86_64-linux-ghcup-0.1.17.8 > "$HOME/.ghcup/bin/ghcup"
125
- chmod a+x "$HOME/.ghcup/bin/ghcup"
126
- "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
127
- fi
95
+ apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
96
+ mkdir -p "$HOME/.ghcup/bin"
97
+ curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
98
+ chmod a+x "$HOME/.ghcup/bin/ghcup"
99
+ "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
100
+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
101
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
128
102
env :
129
103
HCKIND : ${{ matrix.compilerKind }}
130
104
HCNAME : ${{ matrix.compiler }}
@@ -136,25 +110,18 @@ jobs:
136
110
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
137
111
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
138
112
HCDIR=/opt/$HCKIND/$HCVER
139
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
140
- HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
141
- echo "HC=$HC" >> "$GITHUB_ENV"
142
- echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
143
- echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
144
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
145
- else
146
- HC=$HCDIR/bin/$HCKIND
147
- echo "HC=$HC" >> "$GITHUB_ENV"
148
- echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
149
- echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
150
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
151
- fi
152
-
113
+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
114
+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
115
+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
116
+ echo "HC=$HC" >> "$GITHUB_ENV"
117
+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
118
+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
119
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
153
120
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
154
121
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
155
122
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
156
- if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" ; else echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV" ; fi
157
- if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE= false" >> "$GITHUB_ENV" ; fi
123
+ echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
124
+ echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
158
125
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
159
126
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
160
127
env :
@@ -183,17 +150,6 @@ jobs:
183
150
repository hackage.haskell.org
184
151
url: http://hackage.haskell.org/
185
152
EOF
186
- if $HEADHACKAGE; then
187
- cat >> $CABAL_CONFIG <<EOF
188
- repository head.hackage.ghc.haskell.org
189
- url: https://ghc.gitlab.haskell.org/head.hackage/
190
- secure: True
191
- root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
192
- 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
193
- f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
194
- key-threshold: 3
195
- EOF
196
- fi
197
153
cat >> $CABAL_CONFIG <<EOF
198
154
program-default-options
199
155
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -210,14 +166,14 @@ jobs:
210
166
- name : install cabal-plan
211
167
run : |
212
168
mkdir -p $HOME/.cabal/bin
213
- curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2 .0/cabal-plan-0.6.2 .0-x86_64-linux.xz > cabal-plan.xz
214
- echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
169
+ curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3 .0/cabal-plan-0.7.3 .0-x86_64-linux.xz > cabal-plan.xz
170
+ echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
215
171
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
216
172
rm -f cabal-plan.xz
217
173
chmod a+x $HOME/.cabal/bin/cabal-plan
218
174
cabal-plan --version
219
175
- name : checkout
220
- uses : actions/checkout@v2
176
+ uses : actions/checkout@v4
221
177
with :
222
178
path : source
223
179
- name : initial cabal.project for sdist
@@ -244,19 +200,17 @@ jobs:
244
200
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package hsc2hs" >> cabal.project ; fi
245
201
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
246
202
cat >> cabal.project <<EOF
203
+ allow-newer: containers
247
204
EOF
248
- if $HEADHACKAGE; then
249
- echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
250
- fi
251
- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(hsc2hs|process)$/; }' >> cabal.project.local
205
+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(hsc2hs)$/; }' >> cabal.project.local
252
206
cat cabal.project
253
207
cat cabal.project.local
254
208
- name : dump install plan
255
209
run : |
256
210
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
257
211
cabal-plan
258
- - name : cache
259
- uses : actions/cache@v2
212
+ - name : restore cache
213
+ uses : actions/cache/restore@v3
260
214
with :
261
215
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
262
216
path : ~/.cabal/store
@@ -280,8 +234,24 @@ jobs:
280
234
${CABAL} -vnormal check
281
235
- name : haddock
282
236
run : |
283
- $CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
237
+ $CABAL v2-haddock --disable-documentation -- haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
284
238
- name : unconstrained build
285
239
run : |
286
240
rm -f cabal.project.local
287
241
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
242
+ - name : prepare for constraint sets
243
+ run : |
244
+ rm -f cabal.project.local
245
+ - name : constraint set containers-0.7
246
+ run : |
247
+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' all --dry-run ; fi
248
+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
249
+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' --dependencies-only -j2 all ; fi
250
+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' all ; fi
251
+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' all ; fi
252
+ - name : save cache
253
+ uses : actions/cache/save@v3
254
+ if : always()
255
+ with :
256
+ key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
257
+ path : ~/.cabal/store
0 commit comments