11
11
runs-on : ubuntu-latest
12
12
outputs :
13
13
enabled : ${{ steps.check-ref.outputs.enabled }}${{ steps.skip-if-redundant.outputs.enabled }}
14
+ skip_concurrent : ${{ steps.check-ref.outputs.skip_concurrent }}
14
15
steps :
15
16
- name : try to clone ci-config branch
16
17
run : |
34
35
then
35
36
enabled=no
36
37
fi
38
+
39
+ skip_concurrent=yes
40
+ if test -x config-repo/ci/config/skip-concurrent &&
41
+ ! config-repo/ci/config/skip-concurrent '${{ github.ref }}'
42
+ then
43
+ skip_concurrent=no
44
+ fi
37
45
echo "enabled=$enabled" >>$GITHUB_OUTPUT
46
+ echo "skip_concurrent=$skip_concurrent" >>$GITHUB_OUTPUT
38
47
- name : skip if the commit or tree was already tested
39
48
id : skip-if-redundant
40
49
uses : actions/github-script@v6
82
91
needs : ci-config
83
92
if : needs.ci-config.outputs.enabled == 'yes'
84
93
runs-on : windows-latest
94
+ concurrency :
95
+ group : windows-build-${{ github.ref }}
96
+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
85
97
steps :
86
98
- uses : actions/checkout@v3
87
99
- uses : git-for-windows/setup-git-for-windows-sdk@v1
@@ -101,11 +113,14 @@ jobs:
101
113
windows-test :
102
114
name : win test
103
115
runs-on : windows-latest
104
- needs : [windows-build]
116
+ needs : [ci-config, windows-build]
105
117
strategy :
106
118
fail-fast : false
107
119
matrix :
108
120
nr : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
121
+ concurrency :
122
+ group : windows-test-${{ matrix.nr }}-${{ github.ref }}
123
+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
109
124
steps :
110
125
- name : download tracked files and build artifacts
111
126
uses : actions/download-artifact@v3
@@ -132,14 +147,17 @@ jobs:
132
147
vs-build :
133
148
name : win+VS build
134
149
needs : ci-config
135
- if : needs.ci-config.outputs.enabled == 'yes'
150
+ if : github.event.repository.owner.login == 'git-for-windows' && needs.ci-config.outputs.enabled == 'yes'
136
151
env :
137
152
NO_PERL : 1
138
153
GIT_CONFIG_PARAMETERS : " 'user.name=CI' 'user.email=ci@git'"
139
154
runs-on : windows-latest
140
155
strategy :
141
156
matrix :
142
157
arch : [x64, arm64]
158
+ concurrency :
159
+ group : vs-build-${{ github.ref }}
160
+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
143
161
steps :
144
162
- uses : actions/checkout@v3
145
163
- uses : git-for-windows/setup-git-for-windows-sdk@v1
@@ -183,11 +201,14 @@ jobs:
183
201
vs-test :
184
202
name : win+VS test
185
203
runs-on : windows-latest
186
- needs : vs-build
204
+ needs : [ci-config, vs-build]
187
205
strategy :
188
206
fail-fast : false
189
207
matrix :
190
208
nr : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
209
+ concurrency :
210
+ group : vs-test-${{ matrix.nr }}-${{ github.ref }}
211
+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
191
212
steps :
192
213
- uses : git-for-windows/setup-git-for-windows-sdk@v1
193
214
- name : download tracked files and build artifacts
@@ -217,6 +238,9 @@ jobs:
217
238
name : ${{matrix.vector.jobname}} (${{matrix.vector.pool}})
218
239
needs : ci-config
219
240
if : needs.ci-config.outputs.enabled == 'yes'
241
+ concurrency :
242
+ group : ${{ matrix.vector.jobname }}-${{ matrix.vector.pool }}-${{ github.ref }}
243
+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
220
244
strategy :
221
245
fail-fast : false
222
246
matrix :
@@ -276,6 +300,9 @@ jobs:
276
300
name : ${{matrix.vector.jobname}} (${{matrix.vector.image}})
277
301
needs : ci-config
278
302
if : needs.ci-config.outputs.enabled == 'yes'
303
+ concurrency :
304
+ group : dockerized-${{ matrix.vector.jobname }}-${{ matrix.vector.image }}-${{ github.ref }}
305
+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
279
306
strategy :
280
307
fail-fast : false
281
308
matrix :
@@ -317,6 +344,9 @@ jobs:
317
344
env :
318
345
jobname : StaticAnalysis
319
346
runs-on : ubuntu-22.04
347
+ concurrency :
348
+ group : static-analysis-${{ github.ref }}
349
+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
320
350
steps :
321
351
- uses : actions/checkout@v3
322
352
- run : ci/install-dependencies.sh
@@ -328,6 +358,9 @@ jobs:
328
358
env :
329
359
jobname : sparse
330
360
runs-on : ubuntu-20.04
361
+ concurrency :
362
+ group : sparse-${{ github.ref }}
363
+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
331
364
steps :
332
365
- name : Download a current `sparse` package
333
366
# Ubuntu's `sparse` version is too old for us
@@ -346,6 +379,9 @@ jobs:
346
379
name : documentation
347
380
needs : ci-config
348
381
if : needs.ci-config.outputs.enabled == 'yes'
382
+ concurrency :
383
+ group : documentation-${{ github.ref }}
384
+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
349
385
env :
350
386
jobname : Documentation
351
387
runs-on : ubuntu-latest
0 commit comments