
From: Simon Glass <sjg@chromium.org> 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> --- .gitlab-ci.yml | 22 ++++++++++++++++------ doc/develop/ci_testing.rst | 26 +++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 48926f29576..6d3420484cc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/doc/develop/ci_testing.rst b/doc/develop/ci_testing.rst index 7382005d944..79aec7e6f5b 100644 --- a/doc/develop/ci_testing.rst +++ b/doc/develop/ci_testing.rst @@ -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> -- 2.43.0 base-commit: 25cf278d2c0862e502396a35d5a382540d517d85