ci: Explicitly specify job dependencies

We can speed up CI a bit by allowing build jobs to run in parallel
with review jobs, and don't have test jobs wait for the flatpak build.

See https://gitlab.gnome.org/help/ci/yaml/README.md#needs for details.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1391
This commit is contained in:
Florian Müllner 2020-08-03 23:41:08 +02:00 committed by Georges Basile Stavracas Neto
parent 3541a57570
commit a96c8d91b5

View File

@ -67,6 +67,7 @@ no_template_check:
build: build:
image: registry.gitlab.gnome.org/gnome/mutter/master:v4 image: registry.gitlab.gnome.org/gnome/mutter/master:v4
stage: build stage: build
needs: []
before_script: before_script:
- .gitlab-ci/checkout-mutter.sh - .gitlab-ci/checkout-mutter.sh
- meson mutter mutter/build --prefix=/usr -Dtests=false - meson mutter mutter/build --prefix=/usr -Dtests=false
@ -85,6 +86,7 @@ build:
test: test:
image: registry.gitlab.gnome.org/gnome/mutter/master:v4 image: registry.gitlab.gnome.org/gnome/mutter/master:v4
stage: test stage: test
needs: ["build"]
variables: variables:
XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir" XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir"
NO_AT_BRIDGE: "1" NO_AT_BRIDGE: "1"
@ -102,6 +104,7 @@ test:
test-pot: test-pot:
image: registry.gitlab.gnome.org/gnome/mutter/master:v4 image: registry.gitlab.gnome.org/gnome/mutter/master:v4
stage: test stage: test
needs: ["build"]
before_script: before_script:
- ninja -C mutter/build install - ninja -C mutter/build install
script: script:
@ -117,6 +120,7 @@ test-pot:
flatpak: flatpak:
stage: build stage: build
needs: []
variables: variables:
SUBPROJECT: "subprojects/extensions-app" SUBPROJECT: "subprojects/extensions-app"
# Your manifest path # Your manifest path