ci: unify container and build jobs rules
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25294>
This commit is contained in:

committed by
Marge Bot

parent
15fcfbe046
commit
9618fefd18
@@ -153,61 +153,28 @@ include:
|
||||
when: on_success
|
||||
|
||||
|
||||
# When to automatically run the CI for build jobs
|
||||
.build-rules:
|
||||
rules:
|
||||
# Run when re-enabling a disabled farm, but not when disabling it
|
||||
- !reference [.disable-farm-mr-rules, rules]
|
||||
# If any files affecting the pipeline are changed, build/test jobs run
|
||||
# automatically once all dependency jobs have passed
|
||||
- changes: &all_paths
|
||||
- VERSION
|
||||
- bin/git_sha1_gen.py
|
||||
- bin/install_megadrivers.py
|
||||
- bin/symbols-check.py
|
||||
# GitLab CI
|
||||
- .gitlab-ci.yml
|
||||
- .gitlab-ci/**/*
|
||||
# Meson
|
||||
- meson*
|
||||
- build-support/**/*
|
||||
- subprojects/**/*
|
||||
# Source code
|
||||
- include/**/*
|
||||
- src/**/*
|
||||
when: on_success
|
||||
# Just skip everything for MRs which don't actually change anything in the
|
||||
# build
|
||||
- if: *is-pre-merge-for-marge
|
||||
when: never
|
||||
- if: *is-post-merge
|
||||
when: never
|
||||
# Always allow user branches etc to trigger jobs manually
|
||||
- when: manual
|
||||
|
||||
|
||||
.ci-deqp-artifacts:
|
||||
artifacts:
|
||||
name: "mesa_${CI_JOB_NAME}"
|
||||
when: always
|
||||
untracked: false
|
||||
paths:
|
||||
# Watch out! Artifacts are relative to the build dir.
|
||||
# https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
|
||||
- artifacts
|
||||
- _build/meson-logs/*.txt
|
||||
- _build/meson-logs/strace
|
||||
|
||||
.container-rules:
|
||||
.container+build-rules:
|
||||
rules:
|
||||
# Run when re-enabling a disabled farm, but not when disabling it
|
||||
- !reference [.disable-farm-mr-rules, rules]
|
||||
# Run pipeline by default in the main project if any CI pipeline
|
||||
# configuration files were changed, to ensure docker images are up to date
|
||||
- if: *is-post-merge
|
||||
changes:
|
||||
- .gitlab-ci.yml
|
||||
- .gitlab-ci/**/*
|
||||
changes: &all_paths
|
||||
- VERSION
|
||||
- bin/git_sha1_gen.py
|
||||
- bin/install_megadrivers.py
|
||||
- bin/symbols-check.py
|
||||
# GitLab CI
|
||||
- .gitlab-ci.yml
|
||||
- .gitlab-ci/**/*
|
||||
# Meson
|
||||
- meson*
|
||||
- build-support/**/*
|
||||
- subprojects/**/*
|
||||
# Source code
|
||||
- include/**/*
|
||||
- src/**/*
|
||||
when: on_success
|
||||
# Run pipeline by default if it was triggered by Marge Bot, is for a
|
||||
# merge request, and any files affecting the pipeline were changed
|
||||
@@ -230,6 +197,19 @@ include:
|
||||
# Always allow user branches etc to trigger jobs manually
|
||||
- when: manual
|
||||
|
||||
|
||||
.ci-deqp-artifacts:
|
||||
artifacts:
|
||||
name: "mesa_${CI_JOB_NAME}"
|
||||
when: always
|
||||
untracked: false
|
||||
paths:
|
||||
# Watch out! Artifacts are relative to the build dir.
|
||||
# https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
|
||||
- artifacts
|
||||
- _build/meson-logs/*.txt
|
||||
- _build/meson-logs/strace
|
||||
|
||||
# Git archive
|
||||
|
||||
make git archive:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Shared between windows and Linux
|
||||
.build-common:
|
||||
extends: .build-rules
|
||||
extends: .container+build-rules
|
||||
# Cancel job if a newer commit is pushed to the same branch
|
||||
interruptible: true
|
||||
# Build jobs don't take more than 1-3 minutes. 5-8 min max on a fresh runner
|
||||
|
@@ -47,7 +47,7 @@
|
||||
.container:
|
||||
stage: container
|
||||
extends:
|
||||
- .container-rules
|
||||
- .container+build-rules
|
||||
- .incorporate-templates-commit
|
||||
- .use-wine
|
||||
variables:
|
||||
@@ -324,7 +324,7 @@ fedora/x86_64_build:
|
||||
|
||||
.kernel+rootfs:
|
||||
extends:
|
||||
- .build-rules
|
||||
- .container+build-rules
|
||||
stage: container
|
||||
variables:
|
||||
GIT_STRATEGY: fetch
|
||||
@@ -374,7 +374,7 @@ kernel+rootfs_arm32:
|
||||
- .fdo.container-build@debian
|
||||
- .container
|
||||
# Don't want the .container rules
|
||||
- .build-rules
|
||||
- .container+build-rules
|
||||
variables:
|
||||
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
|
||||
ARTIFACTS_PREFIX: "https://${S3_HOST}/mesa-lava"
|
||||
@@ -450,7 +450,7 @@ debian/arm64_test:
|
||||
- .windows-shell-tags
|
||||
rules:
|
||||
- !reference [.microsoft-farm-container-rules, rules]
|
||||
- !reference [.container-rules, rules]
|
||||
- !reference [.container+build-rules, rules]
|
||||
variables:
|
||||
GIT_STRATEGY: fetch # we do actually need the full repository though
|
||||
MESA_BASE_IMAGE: None
|
||||
@@ -475,7 +475,7 @@ windows_build_vs2019:
|
||||
- .windows_container_build
|
||||
rules:
|
||||
- !reference [.microsoft-farm-rules, rules]
|
||||
- !reference [.build-rules, rules]
|
||||
- !reference [.container+build-rules, rules]
|
||||
variables:
|
||||
MESA_IMAGE_PATH: &windows_build_image_path ${WINDOWS_X64_BUILD_PATH}
|
||||
MESA_IMAGE_TAG: &windows_build_image_tag ${MESA_BASE_IMAGE_TAG}--${WINDOWS_X64_BUILD_TAG}
|
||||
@@ -494,7 +494,7 @@ windows_test_vs2019:
|
||||
- .windows_container_build
|
||||
rules:
|
||||
- !reference [.microsoft-farm-rules, rules]
|
||||
- !reference [.build-rules, rules]
|
||||
- !reference [.container+build-rules, rules]
|
||||
variables:
|
||||
MESA_IMAGE_PATH: &windows_test_image_path ${WINDOWS_X64_TEST_PATH}
|
||||
MESA_IMAGE_TAG: &windows_test_image_tag ${MESA_BASE_IMAGE_TAG}--${WINDOWS_X64_TEST_TAG}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
BUILDER: html
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
- .build-rules
|
||||
- .container+build-rules
|
||||
artifacts:
|
||||
expose_as: 'Documentation preview'
|
||||
paths:
|
||||
|
Reference in New Issue
Block a user