ci: Add "check mr" job to needs: of build jobs

So that if the former fails, build & test jobs won't run, wasting less
time & CI resources.

This requires slight tweaks to the rules: of the former job, to make
sure it always exists when the build jobs do.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7278>
This commit is contained in:
Michel Dänzer 2020-10-22 17:58:35 +02:00 committed by Marge Bot
parent 27ce5d921e
commit b92eadb29c

View File

@ -269,6 +269,7 @@ x86_build:
image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
needs:
- x86_build
- check mr
# Debian 10 based i386 cross-build image
i386_build:
@ -283,6 +284,7 @@ i386_build:
image: "$CI_REGISTRY_IMAGE/debian/i386_build:$TAG"
needs:
- i386_build
- check mr
# Debian 10 based ppc64el cross-build image
ppc64el_build:
@ -297,6 +299,7 @@ ppc64el_build:
image: "$CI_REGISTRY_IMAGE/debian/ppc64el_build:$TAG"
needs:
- ppc64el_build
- check mr
# Debian 10 based s390x cross-build image
s390x_build:
@ -311,6 +314,7 @@ s390x_build:
image: "$CI_REGISTRY_IMAGE/debian/s390x_build:$TAG"
needs:
- s390x_build
- check mr
# Android NDK cross-build image
android_build:
@ -325,6 +329,7 @@ android_build:
image: "$CI_REGISTRY_IMAGE/debian/android_build:$TAG"
needs:
- android_build
- check mr
# Debian 10 based x86 test image base
x86_test-base:
@ -368,6 +373,7 @@ x86_build_old:
image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
needs:
- x86_build_old
- check mr
# Debian 10 based ARM build image
arm_build:
@ -456,6 +462,7 @@ arm64_test:
image: "$WINDOWS_IMAGE"
needs:
- windows_build_vs2019
- check mr
git_archive:
extends: .fdo.container-build@alpine
@ -517,12 +524,17 @@ make git archive:
check mr:
extends: .sanity-check
rules:
- *ignore_scheduled_pipelines
- if: *is-pre-merge
when: on_success
- changes: *all_paths
when: on_success
# Other cases default to never
variables:
GIT_STRATEGY: none
script:
# Only run checks in pre-merge pipelines for MRs
- if test "x$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME" != "x$CI_COMMIT_REF_NAME"; then exit 0; fi
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
.check commits:
@ -777,6 +789,9 @@ meson-android:
extends:
- .meson-cross
- .use-arm_build
needs:
- arm_build
- check mr
variables:
VULKAN_DRIVERS: freedreno,broadcom
GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"