CI: Allow more control over which jobs run

Provide some additional variables which can be used to deselect whole
stages, or select a particular test.py build.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-08-02 23:02:06 +12:00
parent 575bfca9f1
commit d62dfb382c
2 changed files with 41 additions and 7 deletions

View File

@@ -6,6 +6,9 @@ include:
variables:
DEFAULT_TAG: ""
MIRROR_DOCKER: docker.io
TEST_SUITES: "1"
TEST_PY: "1"
WORLD_BUILD: "1"
LAB_ONLY: ""
SJG_LAB: ""
PLATFORM: linux/amd64,linux/arm64
@@ -34,10 +37,15 @@ stages:
stage: test.py
retry: 2 # QEMU may be too slow, etc.
rules:
- if: $LAB_ONLY != "1"
when: always
- if: $LAB_ONLY == "1"
when: never
- if: $TEST_PY == "1"
when: always
- if: $TEST_PY == $CI_JOB_NAME
when: always
- if: $TEST_PY == $TEST_PY_BD
when: always
- when: never
before_script:
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
# qemu_arm64_lwip_defconfig is the same as qemu_arm64 but with NET_LWIP enabled.
@@ -126,10 +134,11 @@ stages:
.world_build:
stage: world_build
rules:
- if: $LAB_ONLY != "1"
when: always
- if: $LAB_ONLY == "1"
when: never
- if: $WORLD_BUILD == "1"
when: always
- when: never
build all 32bit ARM platforms:
extends: .world_build
@@ -209,10 +218,11 @@ build all other platforms:
.test_suites:
stage: test_suites
rules:
- if: $LAB_ONLY != "1"
when: always
- if: $LAB_ONLY == "1"
when: never
- if: $TEST_SUITES == "1"
when: always
- when: never
check for new CONFIG symbols outside Kconfig:
extends: .test_suites

View File

@@ -95,6 +95,28 @@ testing cycle to edit these pipelines in separate local commits to pair them
down to just the jobs you're interested in. These changes must be removed
prior to submission.
Available variables are:
TEST_SUITES
Set to 0 to disable the test_suites stage::
git push ci -o ci.variable=TEST_SUITES=0
TEST_PY
Set to 0 to disable the test.py stage, or set to the job name to run just
that job, or set to the board name to run all tests for that board:
For example::
git push ci -o ci.variable=TEST_PY=0
git push ci -o ci.variable=TEST_PY=sandbox
git push ci -o ci.variable=TEST_PY='sandbox with clang test.py'
WORLD_BUILD
Set to 0 to disable the world_build stage::
git push ci -o ci.variable=WORLD_BUILD=0
Using the lab
-------------
@@ -113,7 +135,9 @@ To request that the lab runs::
git push ci -o ci.variable=SJG_LAB=1 <branch>
To request that *only* the lab runs::
To request that *only* the lab runs, you can set TEST_PY=0 and TEST_SUITES=0
and WORD_BUILD=0 as above. But as a shortcut you can use the LAB_ONLY
variables::
git push ci -o ci.variable=SJG_LAB=1 ci.variable=LAB_ONLY=1 <branch>