Skip to content

Commit

Permalink
gitlab-ci: introduce stages and dependencies
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
pks-t authored and gitster committed Oct 9, 2024
1 parent b7a08e9 commit 05a928a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
default:
timeout: 2h

stages:
- test
- analyze

workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
Expand All @@ -9,6 +13,8 @@ workflow:

test:linux:
image: $image
stage: test
needs: [ ]
tags:
- saas-linux-medium-amd64
variables:
Expand Down Expand Up @@ -67,6 +73,8 @@ test:linux:

test:osx:
image: $image
stage: test
needs: [ ]
tags:
- saas-macos-medium-m1
variables:
Expand Down Expand Up @@ -102,6 +110,8 @@ test:osx:

test:fuzz-smoke-tests:
image: ubuntu:latest
stage: test
needs: [ ]
variables:
CC: clang
before_script:
Expand All @@ -111,6 +121,8 @@ test:fuzz-smoke-tests:

static-analysis:
image: ubuntu:22.04
stage: analyze
needs: [ ]
variables:
jobname: StaticAnalysis
before_script:
Expand All @@ -121,6 +133,8 @@ static-analysis:

check-whitespace:
image: ubuntu:latest
stage: analyze
needs: [ ]
before_script:
- ./ci/install-dependencies.sh
# Since $CI_MERGE_REQUEST_TARGET_BRANCH_SHA is only defined for merged
Expand All @@ -135,6 +149,8 @@ check-whitespace:

check-style:
image: ubuntu:latest
stage: analyze
needs: [ ]
allow_failure: true
variables:
CC: clang
Expand All @@ -153,6 +169,8 @@ check-style:

documentation:
image: ubuntu:latest
stage: analyze
needs: [ ]
variables:
jobname: Documentation
before_script:
Expand Down

0 comments on commit 05a928a

Please sign in to comment.