Skip to content

Commit 05a928a

Browse files
pks-tgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b7a08e9 commit 05a928a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.gitlab-ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
default:
22
timeout: 2h
33

4+
stages:
5+
- test
6+
- analyze
7+
48
workflow:
59
rules:
610
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
@@ -9,6 +13,8 @@ workflow:
913

1014
test:linux:
1115
image: $image
16+
stage: test
17+
needs: [ ]
1218
tags:
1319
- saas-linux-medium-amd64
1420
variables:
@@ -67,6 +73,8 @@ test:linux:
6773

6874
test:osx:
6975
image: $image
76+
stage: test
77+
needs: [ ]
7078
tags:
7179
- saas-macos-medium-m1
7280
variables:
@@ -102,6 +110,8 @@ test:osx:
102110

103111
test:fuzz-smoke-tests:
104112
image: ubuntu:latest
113+
stage: test
114+
needs: [ ]
105115
variables:
106116
CC: clang
107117
before_script:
@@ -111,6 +121,8 @@ test:fuzz-smoke-tests:
111121

112122
static-analysis:
113123
image: ubuntu:22.04
124+
stage: analyze
125+
needs: [ ]
114126
variables:
115127
jobname: StaticAnalysis
116128
before_script:
@@ -121,6 +133,8 @@ static-analysis:
121133

122134
check-whitespace:
123135
image: ubuntu:latest
136+
stage: analyze
137+
needs: [ ]
124138
before_script:
125139
- ./ci/install-dependencies.sh
126140
# Since $CI_MERGE_REQUEST_TARGET_BRANCH_SHA is only defined for merged
@@ -135,6 +149,8 @@ check-whitespace:
135149

136150
check-style:
137151
image: ubuntu:latest
152+
stage: analyze
153+
needs: [ ]
138154
allow_failure: true
139155
variables:
140156
CC: clang
@@ -153,6 +169,8 @@ check-style:
153169

154170
documentation:
155171
image: ubuntu:latest
172+
stage: analyze
173+
needs: [ ]
156174
variables:
157175
jobname: Documentation
158176
before_script:

0 commit comments

Comments
 (0)