ci: split farm rules out of test-source-dep.yml

That file has become a bit of the new `.gitlab-ci.yml` with just about
everything in there, but a lot of its content doesn't need to be in the
same file anymore now that `!reference` exists.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24090>
This commit is contained in:
Eric Engestrom 2023-07-11 16:18:21 +01:00 committed by Marge Bot
parent f9c1948a21
commit 80c10b2a4b
3 changed files with 178 additions and 171 deletions

View File

@ -87,6 +87,7 @@ include:
- local: '.gitlab-ci/container/gitlab-ci.yml'
- local: '.gitlab-ci/build/gitlab-ci.yml'
- local: '.gitlab-ci/test/gitlab-ci.yml'
- local: '.gitlab-ci/farm-rules.yml'
- local: '.gitlab-ci/test-source-dep.yml'
- local: 'docs/gitlab-ci.yml'
- local: 'src/amd/ci/gitlab-ci.yml'

177
.gitlab-ci/farm-rules.yml Normal file
View File

@ -0,0 +1,177 @@
.microsoft-farm-rules:
rules:
- exists: [ .ci-farms-disabled/microsoft ] # 1. Is disabled, never run
when: never
- changes: [ .ci-farms-disabled/microsoft ] # 2. Removed from disabled, run
when: on_success
- changes: [ .ci-farms-disabled/* ] # 3. We touched other farms in MR, do not run
when: never
# 4. Fall-through (other rules or on_success)
.microsoft-farm-manual-rules:
rules:
# Allow triggering jobs manually in other cases if any files affecting the
# pipeline were changed
- exists: [ .ci-farms-disabled/microsoft ]
when: never
- changes: [ .ci-farms-disabled/microsoft ]
when: never
- !reference [.microsoft-farm-rules, rules]
.microsoft-farm-container-rules:
rules:
# Allow triggering jobs manually in other cases if any files affecting the
# pipeline were changed
- exists: [ .ci-farms-disabled/microsoft ]
when: never
- changes: [ .ci-farms-disabled/microsoft ]
when: manual
- !reference [.microsoft-farm-rules, rules]
.collabora-farm-rules:
rules:
- if: '$RUNNER_TAG =~ /^mesa-ci-x86-64-lava-/'
exists: [ .ci-farms-disabled/collabora ]
when: never
- if: '$RUNNER_TAG =~ /^mesa-ci-x86-64-lava-/'
changes: [ .ci-farms-disabled/collabora ]
when: on_success
- if: '$RUNNER_TAG =~ /^mesa-ci-x86-64-lava-/'
changes: [ .ci-farms-disabled/* ]
when: never
.collabora-farm-manual-rules:
rules:
- if: '$RUNNER_TAG =~ /^mesa-ci-x86-64-lava-/'
exists: [ .ci-farms-disabled/collabora ]
when: never
- if: '$RUNNER_TAG =~ /^mesa-ci-x86-64-lava-/'
changes: [ .ci-farms-disabled/collabora ]
when: never
- !reference [.collabora-farm-rules, rules]
.igalia-farm-rules:
rules:
- exists: [ .ci-farms-disabled/igalia ]
when: never
- changes: [ .ci-farms-disabled/igalia ]
when: on_success
- changes: [ .ci-farms-disabled/* ]
when: never
.igalia-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/igalia ]
when: never
- changes: [ .ci-farms-disabled/igalia ]
when: never
- !reference [.igalia-farm-rules, rules]
.lima-farm-rules:
rules:
- exists: [ .ci-farms-disabled/lima ]
when: never
- changes: [ .ci-farms-disabled/lima ]
when: on_success
- changes: [ .ci-farms-disabled/* ]
when: never
.lima-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/lima ]
when: never
- changes: [ .ci-farms-disabled/lima ]
when: never
- !reference [.lima-farm-rules, rules]
.anholt-farm-rules:
rules:
- exists: [ .ci-farms-disabled/anholt ]
when: never
- changes: [ .ci-farms-disabled/anholt ]
when: on_success
- changes: [ .ci-farms-disabled/* ]
when: never
.anholt-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/anholt ]
when: never
- changes: [ .ci-farms-disabled/anholt ]
when: never
- !reference [.anholt-farm-rules, rules]
.valve-farm-rules:
rules:
- exists: [ .ci-farms-disabled/valve-mupuf ]
if: '$RUNNER_FARM_LOCATION == "mupuf"'
when: never
- exists: [ .ci-farms-disabled/valve-kws ]
if: '$RUNNER_FARM_LOCATION == "keywords"'
when: never
- changes: [ .ci-farms-disabled/valve-mupuf ]
if: '$RUNNER_FARM_LOCATION == "mupuf"'
when: on_success
- changes: [ .ci-farms-disabled/valve-kws ]
if: '$RUNNER_FARM_LOCATION == "keywords"'
when: on_success
- changes: [ .ci-farms-disabled/* ]
when: never
.valve-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/valve-mupuf ]
if: '$RUNNER_FARM_LOCATION == "mupuf"'
when: never
- exists: [ .ci-farms-disabled/valve-kws ]
if: '$RUNNER_FARM_LOCATION == "keywords"'
when: never
- changes: [ .ci-farms-disabled/valve-mupuf ]
if: '$RUNNER_FARM_LOCATION == "mupuf"'
when: never
- changes: [ .ci-farms-disabled/valve-kws ]
if: '$RUNNER_FARM_LOCATION == "keywords"'
when: never
- !reference [.valve-farm-rules, rules]
.austriancoder-farm-rules:
rules:
- exists: [ .ci-farms-disabled/austriancoder ]
when: never
- changes: [ .ci-farms-disabled/austriancoder ]
when: on_success
- changes: [ .ci-farms-disabled/* ]
when: never
.austriancoder-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/austriancoder ]
when: never
- changes: [ .ci-farms-disabled/austriancoder ]
when: never
- !reference [.austriancoder-farm-rules, rules]
.freedreno-farm-rules:
rules:
- exists: [ .ci-farms-disabled/freedreno ]
when: never
- changes: [ .ci-farms-disabled/freedreno ]
when: on_success
- changes: [ .ci-farms-disabled/* ]
when: never
.freedreno-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/freedreno ]
when: never
- changes: [ .ci-farms-disabled/freedreno ]
when: never
- !reference [.freedreno-farm-rules, rules]

View File

@ -268,177 +268,6 @@
- src/gallium/frontends/rusticl/**/*
when: on_success
# Farm rules
.microsoft-farm-rules:
rules:
- exists: [ .ci-farms-disabled/microsoft ] # 1. Is disabled, never run
when: never
- changes: [ .ci-farms-disabled/microsoft ] # 2. Removed from disabled, run
when: on_success
- changes: [ .ci-farms-disabled/* ] # 3. We touched other farms in MR, do not run
when: never
# 4. Fall-through (other rules or on_success)
.microsoft-farm-manual-rules:
rules:
# Allow triggering jobs manually in other cases if any files affecting the
# pipeline were changed
- exists: [ .ci-farms-disabled/microsoft ]
when: never
- changes: [ .ci-farms-disabled/microsoft ]
when: never
- !reference [.microsoft-farm-rules, rules]
.microsoft-farm-container-rules:
rules:
# Allow triggering jobs manually in other cases if any files affecting the
# pipeline were changed
- exists: [ .ci-farms-disabled/microsoft ]
when: never
- changes: [ .ci-farms-disabled/microsoft ]
when: manual
- !reference [.microsoft-farm-rules, rules]
.collabora-farm-rules:
rules:
- if: '$RUNNER_TAG =~ /^mesa-ci-x86-64-lava-/'
exists: [ .ci-farms-disabled/collabora ]
when: never
- if: '$RUNNER_TAG =~ /^mesa-ci-x86-64-lava-/'
changes: [ .ci-farms-disabled/collabora ]
when: on_success
- if: '$RUNNER_TAG =~ /^mesa-ci-x86-64-lava-/'
changes: [ .ci-farms-disabled/* ]
when: never
.collabora-farm-manual-rules:
rules:
- if: '$RUNNER_TAG =~ /^mesa-ci-x86-64-lava-/'
exists: [ .ci-farms-disabled/collabora ]
when: never
- if: '$RUNNER_TAG =~ /^mesa-ci-x86-64-lava-/'
changes: [ .ci-farms-disabled/collabora ]
when: never
- !reference [.collabora-farm-rules, rules]
.igalia-farm-rules:
rules:
- exists: [ .ci-farms-disabled/igalia ]
when: never
- changes: [ .ci-farms-disabled/igalia ]
when: on_success
- changes: [ .ci-farms-disabled/* ]
when: never
.igalia-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/igalia ]
when: never
- changes: [ .ci-farms-disabled/igalia ]
when: never
- !reference [.igalia-farm-rules, rules]
.lima-farm-rules:
rules:
- exists: [ .ci-farms-disabled/lima ]
when: never
- changes: [ .ci-farms-disabled/lima ]
when: on_success
- changes: [ .ci-farms-disabled/* ]
when: never
.lima-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/lima ]
when: never
- changes: [ .ci-farms-disabled/lima ]
when: never
- !reference [.lima-farm-rules, rules]
.anholt-farm-rules:
rules:
- exists: [ .ci-farms-disabled/anholt ]
when: never
- changes: [ .ci-farms-disabled/anholt ]
when: on_success
- changes: [ .ci-farms-disabled/* ]
when: never
.anholt-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/anholt ]
when: never
- changes: [ .ci-farms-disabled/anholt ]
when: never
- !reference [.anholt-farm-rules, rules]
.valve-farm-rules:
rules:
- exists: [ .ci-farms-disabled/valve-mupuf ]
if: '$RUNNER_FARM_LOCATION == "mupuf"'
when: never
- exists: [ .ci-farms-disabled/valve-kws ]
if: '$RUNNER_FARM_LOCATION == "keywords"'
when: never
- changes: [ .ci-farms-disabled/valve-mupuf ]
if: '$RUNNER_FARM_LOCATION == "mupuf"'
when: on_success
- changes: [ .ci-farms-disabled/valve-kws ]
if: '$RUNNER_FARM_LOCATION == "keywords"'
when: on_success
- changes: [ .ci-farms-disabled/* ]
when: never
.valve-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/valve-mupuf ]
if: '$RUNNER_FARM_LOCATION == "mupuf"'
when: never
- exists: [ .ci-farms-disabled/valve-kws ]
if: '$RUNNER_FARM_LOCATION == "keywords"'
when: never
- changes: [ .ci-farms-disabled/valve-mupuf ]
if: '$RUNNER_FARM_LOCATION == "mupuf"'
when: never
- changes: [ .ci-farms-disabled/valve-kws ]
if: '$RUNNER_FARM_LOCATION == "keywords"'
when: never
- !reference [.valve-farm-rules, rules]
.austriancoder-farm-rules:
rules:
- exists: [ .ci-farms-disabled/austriancoder ]
when: never
- changes: [ .ci-farms-disabled/austriancoder ]
when: on_success
- changes: [ .ci-farms-disabled/* ]
when: never
.austriancoder-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/austriancoder ]
when: never
- changes: [ .ci-farms-disabled/austriancoder ]
when: never
- !reference [.austriancoder-farm-rules, rules]
.freedreno-farm-rules:
rules:
- exists: [ .ci-farms-disabled/freedreno ]
when: never
- changes: [ .ci-farms-disabled/freedreno ]
when: on_success
- changes: [ .ci-farms-disabled/* ]
when: never
.freedreno-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/freedreno ]
when: never
- changes: [ .ci-farms-disabled/freedreno ]
when: never
- !reference [.freedreno-farm-rules, rules]
# Rules for changes that impact either freedreno or turnip.
.freedreno-common-rules:
rules: