1# This file list source dependencies to avoid creating/running jobs 2# those outcome cannot be changed by the modifications from a branch. 3 4# Rule to filter for only scheduled pipelines. 5.scheduled_pipeline-rules: 6 rules: 7 - if: &is-scheduled-pipeline '$CI_PIPELINE_SOURCE == "schedule"' 8 when: on_success 9 10# Override of the `default: retry:` settings, which automatically retries jobs 11# if one of the tests result didn't match its expectation; this override 12# disables that, but keeps the auto-retry for infrastructure failures. 13.no-auto-retry: 14 retry: 15 max: 1 16 # Don't retry on script_failure, job_execution_timeout, runner_unsupported, 17 # stale_schedule, archived_failure, or unmet_prerequisites 18 when: 19 - api_failure 20 - runner_system_failure 21 - scheduler_failure 22 - data_integrity_failure 23 - unknown_failure 24 25 26# Generic rule to not run the job during scheduled pipelines. Jobs that aren't 27# something like a nightly run should include this rule. 28.no_scheduled_pipelines-rules: 29 rules: 30 - if: *is-scheduled-pipeline 31 when: never 32 33# Rule for restricted traces jobs to only run for users with access to those 34# traces (both https://gitlab.freedesktop.org/gfx-ci/tracie/traces-db-private 35# for trace access, and minio bucket access for viewing result images from CI). 36# 37# This is a compromise, allowing some marked developers to have their MRs 38# blocked on regressions to non-redistributable traces, while not blocking 39# merges for other devs who would be unable to debug changes to them. 40.restricted-rules: 41 rules: 42 # If the triggerer has access to the restricted traces and if it is pre-merge 43 - if: '($GITLAB_USER_LOGIN !~ "/^(robclark|anholt|flto|cwabbott0|Danil|tomeu|okias|gallo|kwg|llanderwelin|zmike|vigneshraman|Valentine)$/") && 44 ($GITLAB_USER_LOGIN != "marge-bot" || $CI_COMMIT_BRANCH)' 45 when: never 46 47# Mesa core source file dependencies that may impact any test job 48# --------------------------------------------------------------- 49.core-rules: 50 rules: 51 - !reference [.common-rules, rules] 52 - !reference [.no_scheduled_pipelines-rules, rules] 53 - changes: &core_file_list 54 - .gitlab-ci.yml 55 - .gitlab-ci/**/* 56 - include/**/* 57 - meson.build 58 - meson_options.txt 59 - build-support/**/* 60 - subprojects/**/* 61 - .gitattributes 62 - src/* 63 - src/compiler/**/* 64 - src/drm-shim/**/* 65 - src/gtest/**/* 66 # Some src/util and src/compiler files use headers from mesa/ (e.g. 67 # mtypes.h). We should clean that up. 68 - src/mesa/**/*.h 69 - src/tool/**/* 70 - src/util/**/* 71 when: on_success 72 73# Same core dependencies for doing manual runs. 74.core-manual-rules: 75 extends: .no-auto-retry 76 rules: 77 - !reference [.common-rules, rules] 78 # We only want manual jobs to show up when it's not marge's pre-merge CI 79 # run, otherwise she'll wait until her timeout. The exception is 80 # performance jobs, see below. 81 - if: '($GITLAB_USER_LOGIN == "marge-bot" && 82 $CI_PIPELINE_SOURCE == "merge_request_event" && 83 $CI_JOB_NAME !~ "/performance$/")' 84 when: never 85 - !reference [.scheduled_pipeline-rules, rules] 86 - changes: 87 *core_file_list 88 when: manual 89 90# Rules for performance jobs tracking. We want perf jobs to run as code is 91# merged to main, but we don't want them to block marge. So, they need to have 92# only when: never or when: manual, and a separate script maintained by 93# Collabora triggers the manual job after merge to main. These "never" filters 94# need to come before any paths with "manual". 95.performance-rules: 96 stage: performance 97 rules: 98 - !reference [.no_scheduled_pipelines-rules, rules] 99 # Run only on pre-merge pipelines from Marge 100 - if: $MESA_CI_PERFORMANCE_ENABLED == null 101 when: never 102 # Allow the merge to complete even before the job completes (since it won't 103 # even start until the separate script triggers on it). 104 allow_failure: true 105 106.piglit-performance-base: 107 extends: 108 - .performance-rules 109 variables: 110 JOB_PRIORITY: 40 111 PIGLIT_REPLAY_SUBCOMMAND: "profile" 112 PIGLIT_REPLAY_EXTRA_ARGS: "--db-path ${CI_PROJECT_DIR}/replayer-db/" 113 # More than this can hit OOM due to BOs leaked during the replay of the last frame 114 PIGLIT_REPLAY_LOOP_TIMES: 150 115 # We don't want for more than one workload to be submitted to the GPU at a time 116 FDO_CI_CONCURRENT: 1 117 # Piglit is very sparse in its status output and downloads of big traces can take a while 118 DEVICE_HANGING_TIMEOUT_SEC: 600 119 GIT_STRATEGY: none 120 HWCI_FREQ_MAX: "true" 121 # Always use the same device 122 LAVA_TAGS: "cbg-0" 123 # Ensure that we are using the release build artifact 124 LAVA_S3_ARTIFACT_NAME: mesa-${ARCH}-default-release 125 S3_ARTIFACT_NAME: mesa-python-ci-artifacts 126 # Reset dependencies in performance jobs to enforce the release build artifact 127 dependencies: null 128 # Don't run in parallel. It is okay to performance jobs to take a little 129 # longer to finish, as they don't block marge from merging an MR. 130 parallel: null 131 132.piglit-performance:arm64: 133 extends: 134 - .piglit-performance-base 135 needs: 136 - debian/baremetal_arm64_test 137 - debian-arm64-release 138 139.piglit-performance:x86_64: 140 extends: 141 - .piglit-performance-base 142 needs: 143 - kernel+rootfs_x86_64 144 - debian-release 145 146# Mesa source file dependencies that may impact any GL driver test job. 147.gallium-core-rules: 148 rules: 149 - !reference [.core-rules, rules] 150 - changes: &gallium_core_file_list 151 - src/gallium/* 152 - src/gallium/auxiliary/**/* 153 - src/gallium/drivers/* 154 - src/gallium/include/**/* 155 - src/gallium/frontends/dri/* 156 - src/gallium/frontends/glx/**/* 157 - src/gallium/targets/**/* 158 - src/gallium/tests/**/* 159 - src/gallium/winsys/* 160 when: on_success 161 162.gl-rules: 163 rules: 164 - !reference [.core-rules, rules] 165 - changes: &mesa_core_file_list 166 - src/egl/**/* 167 - src/gbm/**/* 168 - src/glx/**/* 169 - src/loader/**/* 170 - src/mapi/**/* 171 - src/mesa/* 172 - src/mesa/main/**/* 173 - src/mesa/math/**/* 174 - src/mesa/program/**/* 175 - src/mesa/sparc/**/* 176 - src/mesa/state_tracker/**/* 177 - src/mesa/swrast/**/* 178 - src/mesa/swrast_setup/**/* 179 - src/mesa/vbo/**/* 180 - src/mesa/x86/**/* 181 - src/mesa/x86-64/**/* 182 when: on_success 183 - !reference [.gallium-core-rules, rules] 184 185.gl-manual-rules: 186 extends: .no-auto-retry 187 rules: 188 - !reference [.core-manual-rules, rules] 189 - changes: 190 *mesa_core_file_list 191 when: manual 192 - changes: 193 *gallium_core_file_list 194 when: manual 195 196# Source file dependencies that may impact any Vulkan driver build or test 197.vulkan-rules: 198 rules: 199 - !reference [.core-rules, rules] 200 - changes: &vulkan_file_list 201 - src/vulkan/**/* 202 when: on_success 203 204.vulkan-manual-rules: 205 extends: .no-auto-retry 206 rules: 207 - !reference [.core-manual-rules, rules] 208 - changes: 209 *vulkan_file_list 210 when: manual 211 212# Rules for linters 213.lint-rustfmt-rules: 214 rules: 215 - !reference [.never-post-merge-rules, rules] 216 - !reference [.no_scheduled_pipelines-rules, rules] 217 - changes: 218 - .gitlab-ci.yml 219 - .gitlab-ci/**/* 220 # in merge pipeline, formatting checks are not allowed to fail 221 - if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event" 222 changes: &rust_file_list 223 - src/**/*.rs 224 when: on_success 225 allow_failure: false 226 # in other pipelines, formatting checks are allowed to fail 227 - changes: *rust_file_list 228 when: on_success 229 allow_failure: true 230 231# Rules for .mr-label-maker.yml 232.mr-label-maker-rules: 233 rules: 234 - !reference [.never-post-merge-rules, rules] 235 - !reference [.no_scheduled_pipelines-rules, rules] 236 - if: $CI_PIPELINE_SOURCE == "merge_request_event" 237 changes: 238 - .mr-label-maker.yml 239 when: on_success 240