gitlab-ci: introduce stages and dependencies
We're about to add a couple of jobs for Windows. As the Windows runners are quite slow, we will split those up across two stages: one stage to build the artifacts, and one stage that runs test slices in parallel. Introduce stages and "needs" dependencies for the preexisting jobs as a preparatory step. The stages will lead to a more natural representation of jobs in the UI, whereas the "needs" dependency ensures that jobs do not have to wait for all jobs in the preceding stage to finish. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
b7a08e947e
commit
05a928a93e
@ -1,6 +1,10 @@
|
|||||||
default:
|
default:
|
||||||
timeout: 2h
|
timeout: 2h
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- test
|
||||||
|
- analyze
|
||||||
|
|
||||||
workflow:
|
workflow:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
@ -9,6 +13,8 @@ workflow:
|
|||||||
|
|
||||||
test:linux:
|
test:linux:
|
||||||
image: $image
|
image: $image
|
||||||
|
stage: test
|
||||||
|
needs: [ ]
|
||||||
tags:
|
tags:
|
||||||
- saas-linux-medium-amd64
|
- saas-linux-medium-amd64
|
||||||
variables:
|
variables:
|
||||||
@ -67,6 +73,8 @@ test:linux:
|
|||||||
|
|
||||||
test:osx:
|
test:osx:
|
||||||
image: $image
|
image: $image
|
||||||
|
stage: test
|
||||||
|
needs: [ ]
|
||||||
tags:
|
tags:
|
||||||
- saas-macos-medium-m1
|
- saas-macos-medium-m1
|
||||||
variables:
|
variables:
|
||||||
@ -102,6 +110,8 @@ test:osx:
|
|||||||
|
|
||||||
test:fuzz-smoke-tests:
|
test:fuzz-smoke-tests:
|
||||||
image: ubuntu:latest
|
image: ubuntu:latest
|
||||||
|
stage: test
|
||||||
|
needs: [ ]
|
||||||
variables:
|
variables:
|
||||||
CC: clang
|
CC: clang
|
||||||
before_script:
|
before_script:
|
||||||
@ -111,6 +121,8 @@ test:fuzz-smoke-tests:
|
|||||||
|
|
||||||
static-analysis:
|
static-analysis:
|
||||||
image: ubuntu:22.04
|
image: ubuntu:22.04
|
||||||
|
stage: analyze
|
||||||
|
needs: [ ]
|
||||||
variables:
|
variables:
|
||||||
jobname: StaticAnalysis
|
jobname: StaticAnalysis
|
||||||
before_script:
|
before_script:
|
||||||
@ -121,6 +133,8 @@ static-analysis:
|
|||||||
|
|
||||||
check-whitespace:
|
check-whitespace:
|
||||||
image: ubuntu:latest
|
image: ubuntu:latest
|
||||||
|
stage: analyze
|
||||||
|
needs: [ ]
|
||||||
before_script:
|
before_script:
|
||||||
- ./ci/install-dependencies.sh
|
- ./ci/install-dependencies.sh
|
||||||
# Since $CI_MERGE_REQUEST_TARGET_BRANCH_SHA is only defined for merged
|
# Since $CI_MERGE_REQUEST_TARGET_BRANCH_SHA is only defined for merged
|
||||||
@ -135,6 +149,8 @@ check-whitespace:
|
|||||||
|
|
||||||
check-style:
|
check-style:
|
||||||
image: ubuntu:latest
|
image: ubuntu:latest
|
||||||
|
stage: analyze
|
||||||
|
needs: [ ]
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
variables:
|
variables:
|
||||||
CC: clang
|
CC: clang
|
||||||
@ -153,6 +169,8 @@ check-style:
|
|||||||
|
|
||||||
documentation:
|
documentation:
|
||||||
image: ubuntu:latest
|
image: ubuntu:latest
|
||||||
|
stage: analyze
|
||||||
|
needs: [ ]
|
||||||
variables:
|
variables:
|
||||||
jobname: Documentation
|
jobname: Documentation
|
||||||
before_script:
|
before_script:
|
||||||
|
Reference in New Issue
Block a user