1111 runs-on : ubuntu-latest
1212 outputs :
1313 enabled : ${{ steps.check-ref.outputs.enabled }}${{ steps.skip-if-redundant.outputs.enabled }}
14+ skip_concurrent : ${{ steps.check-ref.outputs.skip_concurrent }}
1415 steps :
1516 - name : try to clone ci-config branch
1617 run : |
3435 then
3536 enabled=no
3637 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
3745 echo "enabled=$enabled" >>$GITHUB_OUTPUT
46+ echo "skip_concurrent=$skip_concurrent" >>$GITHUB_OUTPUT
3847 - name : skip if the commit or tree was already tested
3948 id : skip-if-redundant
4049 uses : actions/github-script@v6
8291 needs : ci-config
8392 if : needs.ci-config.outputs.enabled == 'yes'
8493 runs-on : windows-latest
94+ concurrency :
95+ group : windows-build-${{ github.ref }}
96+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
8597 steps :
8698 - uses : actions/checkout@v3
8799 - uses : git-for-windows/setup-git-for-windows-sdk@v1
@@ -101,11 +113,14 @@ jobs:
101113 windows-test :
102114 name : win test
103115 runs-on : windows-latest
104- needs : [windows-build]
116+ needs : [ci-config, windows-build]
105117 strategy :
106118 fail-fast : false
107119 matrix :
108120 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' }}
109124 steps :
110125 - name : download tracked files and build artifacts
111126 uses : actions/download-artifact@v3
@@ -132,11 +147,14 @@ jobs:
132147 vs-build :
133148 name : win+VS build
134149 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'
136151 env :
137152 NO_PERL : 1
138153 GIT_CONFIG_PARAMETERS : " 'user.name=CI' 'user.email=ci@git'"
139154 runs-on : windows-latest
155+ concurrency :
156+ group : vs-build-${{ github.ref }}
157+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
140158 steps :
141159 - uses : actions/checkout@v3
142160 - uses : git-for-windows/setup-git-for-windows-sdk@v1
@@ -184,11 +202,14 @@ jobs:
184202 vs-test :
185203 name : win+VS test
186204 runs-on : windows-latest
187- needs : vs-build
205+ needs : [ci-config, vs-build]
188206 strategy :
189207 fail-fast : false
190208 matrix :
191209 nr : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
210+ concurrency :
211+ group : vs-test-${{ matrix.nr }}-${{ github.ref }}
212+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
192213 steps :
193214 - uses : git-for-windows/setup-git-for-windows-sdk@v1
194215 - name : download tracked files and build artifacts
@@ -218,13 +239,13 @@ jobs:
218239 name : ${{matrix.vector.jobname}} (${{matrix.vector.pool}})
219240 needs : ci-config
220241 if : needs.ci-config.outputs.enabled == 'yes'
242+ concurrency :
243+ group : ${{ matrix.vector.jobname }}-${{ matrix.vector.pool }}-${{ github.ref }}
244+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
221245 strategy :
222246 fail-fast : false
223247 matrix :
224248 vector :
225- - jobname : linux-clang
226- cc : clang
227- pool : ubuntu-latest
228249 - jobname : linux-sha256
229250 cc : clang
230251 pool : ubuntu-latest
@@ -249,11 +270,8 @@ jobs:
249270 - jobname : linux-leaks
250271 cc : gcc
251272 pool : ubuntu-latest
252- - jobname : linux-asan
253- cc : gcc
254- pool : ubuntu-latest
255- - jobname : linux-ubsan
256- cc : gcc
273+ - jobname : linux-asan-ubsan
274+ cc : clang
257275 pool : ubuntu-latest
258276 env :
259277 CC : ${{matrix.vector.cc}}
@@ -265,8 +283,9 @@ jobs:
265283 - uses : actions/checkout@v3
266284 - run : ci/install-dependencies.sh
267285 - run : ci/run-build-and-tests.sh
268- - run : ci/ print- test- failures.sh
286+ - name : print test failures
269287 if : failure() && env.FAILED_TEST_ARTIFACTS != ''
288+ run : ci/print-test-failures.sh
270289 - name : Upload failed tests' directories
271290 if : failure() && env.FAILED_TEST_ARTIFACTS != ''
272291 uses : actions/upload-artifact@v3
@@ -277,6 +296,9 @@ jobs:
277296 name : ${{matrix.vector.jobname}} (${{matrix.vector.image}})
278297 needs : ci-config
279298 if : needs.ci-config.outputs.enabled == 'yes'
299+ concurrency :
300+ group : dockerized-${{ matrix.vector.jobname }}-${{ matrix.vector.image }}-${{ github.ref }}
301+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
280302 strategy :
281303 fail-fast : false
282304 matrix :
@@ -298,8 +320,9 @@ jobs:
298320 if : matrix.vector.jobname == 'linux32'
299321 - run : ci/install-docker-dependencies.sh
300322 - run : ci/run-build-and-tests.sh
301- - run : ci/ print- test- failures.sh
323+ - name : print test failures
302324 if : failure() && env.FAILED_TEST_ARTIFACTS != ''
325+ run : ci/print-test-failures.sh
303326 - name : Upload failed tests' directories
304327 if : failure() && env.FAILED_TEST_ARTIFACTS != '' && matrix.vector.jobname != 'linux32'
305328 uses : actions/upload-artifact@v3
@@ -318,6 +341,9 @@ jobs:
318341 env :
319342 jobname : StaticAnalysis
320343 runs-on : ubuntu-22.04
344+ concurrency :
345+ group : static-analysis-${{ github.ref }}
346+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
321347 steps :
322348 - uses : actions/checkout@v3
323349 - run : ci/install-dependencies.sh
@@ -329,6 +355,9 @@ jobs:
329355 env :
330356 jobname : sparse
331357 runs-on : ubuntu-20.04
358+ concurrency :
359+ group : sparse-${{ github.ref }}
360+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
332361 steps :
333362 - name : Download a current `sparse` package
334363 # Ubuntu's `sparse` version is too old for us
@@ -347,6 +376,9 @@ jobs:
347376 name : documentation
348377 needs : ci-config
349378 if : needs.ci-config.outputs.enabled == 'yes'
379+ concurrency :
380+ group : documentation-${{ github.ref }}
381+ cancel-in-progress : ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
350382 env :
351383 jobname : Documentation
352384 runs-on : ubuntu-latest
0 commit comments