Files
mesa/.gitlab-ci/test-source-dep.yml
Eric Engestrom f4166ab1e1 ci: fix rustfmt job rules (one more case)
f065c2f0ac actually always triggers the rule it adds because
that commit itself changes one of these files, so the case where none of
these files are changed was not actually tested.

The two options are to drop the `changes:` line from that commit, to
make every staging pipeline run that job, or to add the missing
"no changes" corresponding rule, which this commit does, which aligns
with the "run when files changed, don't run otherwise" behaviour of the
other rules above.

Fixes: f065c2f0ac ("ci: fix rustfmt job rules")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36306>
2025-07-23 11:20:19 +00:00

248 lines
8.1 KiB
YAML

# This file list source dependencies to avoid creating/running jobs
# those outcome cannot be changed by the modifications from a branch.
# Rule to filter for only scheduled pipelines.
.scheduled_pipeline-rules:
rules:
- if: &is-scheduled-pipeline '$CI_PIPELINE_SOURCE == "schedule"'
when: on_success
# Override of the `default: retry:` settings, which automatically retries jobs
# if one of the tests result didn't match its expectation; this override
# disables that, but keeps the auto-retry for infrastructure failures.
.no-auto-retry:
retry:
max: 1
# Don't retry on script_failure, job_execution_timeout, runner_unsupported,
# stale_schedule, archived_failure, or unmet_prerequisites
when:
- api_failure
- runner_system_failure
- scheduler_failure
- data_integrity_failure
- unknown_failure
# Generic rule to not run the job during scheduled pipelines. Jobs that aren't
# something like a nightly run should include this rule.
.no_scheduled_pipelines-rules:
rules:
- if: *is-scheduled-pipeline
when: never
# Rule for restricted traces jobs to only run for users with access to those
# traces (both https://gitlab.freedesktop.org/gfx-ci/tracie/traces-db-private
# for trace access, and minio bucket access for viewing result images from CI).
#
# This is a compromise, allowing some marked developers to have their MRs
# blocked on regressions to non-redistributable traces, while not blocking
# merges for other devs who would be unable to debug changes to them.
.restricted-rules:
rules:
# If the triggerer has access to the restricted traces and if it is pre-merge
- if: '($GITLAB_USER_LOGIN !~ "/^(robclark|anholt|flto|cwabbott0|Danil|tomeu|okias|gallo|kwg|llanderwelin|zmike|vigneshraman|Valentine|daniels)$/") &&
($GITLAB_USER_LOGIN != "marge-bot" || $CI_COMMIT_BRANCH)'
when: never
# Mesa core source file dependencies that may impact any test job
# ---------------------------------------------------------------
.core-rules:
rules:
- !reference [.common-rules, rules]
- !reference [.no_scheduled_pipelines-rules, rules]
- changes: &core_file_list
- .gitlab-ci.yml
- .gitlab-ci/**/*
- include/**/*
- meson.build
- meson.options
- build-support/**/*
- subprojects/**/*
- .gitattributes
- src/*
- src/compiler/**/*
- src/drm-shim/**/*
- src/gtest/**/*
# Some src/util and src/compiler files use headers from mesa/ (e.g.
# mtypes.h). We should clean that up.
- src/mesa/**/*.h
- src/tool/**/*
- src/util/**/*
when: on_success
# Same core dependencies for doing manual runs.
.core-manual-rules:
extends: .no-auto-retry
rules:
- !reference [.common-rules, rules]
# We only want manual jobs to show up when it's not marge's pre-merge CI
# run, otherwise she'll wait until her timeout. The exception is
# performance jobs, see below.
- if: '($GITLAB_USER_LOGIN == "marge-bot" &&
$CI_PIPELINE_SOURCE == "merge_request_event" &&
$CI_JOB_NAME !~ "/performance$/")'
when: never
- !reference [.scheduled_pipeline-rules, rules]
- changes:
*core_file_list
when: manual
# Rules for performance jobs tracking. We want perf jobs to run as code is
# merged to main, but we don't want them to block marge. So, they need to have
# only when: never or when: manual, and a separate script maintained by
# Collabora triggers the manual job after merge to main. These "never" filters
# need to come before any paths with "manual".
.performance-rules:
stage: performance
rules:
- !reference [.no_scheduled_pipelines-rules, rules]
# Run only on pre-merge pipelines from Marge
- if: $MESA_CI_PERFORMANCE_ENABLED == null
when: never
# Allow the merge to complete even before the job completes (since it won't
# even start until the separate script triggers on it).
allow_failure: true
.piglit-performance-base:
extends:
- .performance-rules
variables:
JOB_PRIORITY: 40
PIGLIT_REPLAY_SUBCOMMAND: "profile"
PIGLIT_REPLAY_EXTRA_ARGS: "--db-path ${CI_PROJECT_DIR}/replayer-db/"
# More than this can hit OOM due to BOs leaked during the replay of the last frame
PIGLIT_REPLAY_LOOP_TIMES: 150
# We don't want for more than one workload to be submitted to the GPU at a time
FDO_CI_CONCURRENT: 1
# Piglit is very sparse in its status output and downloads of big traces can take a while
DEVICE_HANGING_TIMEOUT_SEC: 600
# So we aren't capped by VSync by the X server
EGL_PLATFORM: surfaceless
GIT_STRATEGY: none
HWCI_FREQ_MAX: "true"
# Always use the same device
LAVA_TAGS: "cbg-0"
# Ensure that we are using the release build artifact
S3_ARTIFACT_NAME: mesa-${ARCH}-default-release
# Reset dependencies in performance jobs to enforce the release build artifact
dependencies: null
# Don't run in parallel. It is okay to performance jobs to take a little
# longer to finish, as they don't block marge from merging an MR.
parallel: null
artifacts:
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
when: always
paths:
- results/
exclude:
- results/*.shader_cache
reports:
junit:
- results/junit.xml
# Mesa source file dependencies that may impact any GL driver test job.
.gallium-core-rules:
rules:
- !reference [.core-rules, rules]
- changes: &gallium_core_file_list
- src/gallium/*
- src/gallium/auxiliary/**/*
- src/gallium/drivers/*
- src/gallium/include/**/*
- src/gallium/frontends/dri/*
- src/gallium/frontends/glx/**/*
- src/gallium/targets/**/*
- src/gallium/winsys/*
when: on_success
.gl-rules:
rules:
- !reference [.core-rules, rules]
- changes: &mesa_core_file_list
- src/egl/**/*
- src/gbm/**/*
- src/glx/**/*
- src/loader/**/*
- src/mapi/**/*
- src/mesa/*
- src/mesa/main/**/*
- src/mesa/math/**/*
- src/mesa/program/**/*
- src/mesa/sparc/**/*
- src/mesa/state_tracker/**/*
- src/mesa/swrast/**/*
- src/mesa/swrast_setup/**/*
- src/mesa/vbo/**/*
- src/mesa/x86/**/*
- src/mesa/x86-64/**/*
when: on_success
- !reference [.gallium-core-rules, rules]
.gl-manual-rules:
extends: .no-auto-retry
rules:
- !reference [.core-manual-rules, rules]
- changes:
*mesa_core_file_list
when: manual
- changes:
*gallium_core_file_list
when: manual
# Source file dependencies that may impact any Vulkan driver build or test
.vulkan-rules:
rules:
- !reference [.core-rules, rules]
- changes: &vulkan_file_list
- src/vulkan/**/*
when: on_success
.vulkan-manual-rules:
extends: .no-auto-retry
rules:
- !reference [.core-manual-rules, rules]
- changes:
*vulkan_file_list
when: manual
# Rules for linters
.lint-rustfmt-rules:
rules:
- !reference [.never-post-merge-rules, rules]
- !reference [.no_scheduled_pipelines-rules, rules]
# pre-merge: must succeed if changing Rust, skip if not
- if: &is-merge-attempt $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
changes: &rustfmt_files
- .gitlab-ci.yml
- .gitlab-ci/**/*
- src/**/*.rs
when: on_success
allow_failure: false
- if: *is-merge-attempt
when: never
- if: &is-merge-request $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
*rustfmt_files
when: manual
allow_failure: false
- if: *is-merge-request
when: never
# non-pre-merge: run but only advisory
- if: $CI_PROJECT_NAMESPACE == "mesa"
changes: *rustfmt_files
allow_failure: true
- if: $CI_PROJECT_NAMESPACE == "mesa"
when: never
- when: manual
allow_failure: true
# Rules for .mr-label-maker.yml
.mr-label-maker-rules:
rules:
- !reference [.never-post-merge-rules, rules]
- !reference [.no_scheduled_pipelines-rules, rules]
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- .mr-label-maker.yml
when: on_success