From e65fc5ee09d5a397236fdea0c2ad2b697f2bbcec Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Wed, 15 Oct 2025 09:10:14 +0200 Subject: [PATCH] ci(cmakev2): run the buildv2 tests only if the buildv2 label is set Currently, the buildv2 tests are initiated using the same patterns as the tests for the current build system. This means that any change in the current build system will also trigger the buildv2 tests. Initially, it might be wise not to block the CI for changes in the current build system in case there is an issue with buildv2. Therefore, let's explicitly start the buildv2 tests only when the buildv2 label is set. Signed-off-by: Frantisek Hrbata --- .gitlab/ci/build.yml | 4 +++- .gitlab/ci/dependencies/dependencies.yml | 4 ++++ .gitlab/ci/rules.yml | 9 +++++++++ .gitlab/ci/test-win.yml | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/build.yml b/.gitlab/ci/build.yml index f11ee9bc97..ed491abb37 100644 --- a/.gitlab/ci/build.yml +++ b/.gitlab/ci/build.yml @@ -256,7 +256,9 @@ pytest_build_system: parallel: 3 pytest_buildv2_system: - extends: .test_build_system_template + extends: + - .test_build_system_template + - .rules:labels:buildv2 parallel: 3 script: - ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh diff --git a/.gitlab/ci/dependencies/dependencies.yml b/.gitlab/ci/dependencies/dependencies.yml index 06dfb4bfce..db447461b2 100644 --- a/.gitlab/ci/dependencies/dependencies.yml +++ b/.gitlab/ci/dependencies/dependencies.yml @@ -76,3 +76,7 @@ - if-schedule-test-build-system-windows patterns: - build_system_win + +"labels:buildv2": + labels: + - buildv2 diff --git a/.gitlab/ci/rules.yml b/.gitlab/ci/rules.yml index df41ec4199..ce89384f0f 100644 --- a/.gitlab/ci/rules.yml +++ b/.gitlab/ci/rules.yml @@ -276,6 +276,9 @@ .if-label-build: &if-label-build if: '$BOT_LABEL_BUILD || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*build(?:,[^,\n\r]+)*$/i' +.if-label-buildv2: &if-label-buildv2 + if: '$BOT_LABEL_BUILDV2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*buildv2(?:,[^,\n\r]+)*$/i' + .if-label-docker: &if-label-docker if: '$BOT_LABEL_DOCKER || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*docker(?:,[^,\n\r]+)*$/i' @@ -364,6 +367,12 @@ - <<: *if-dev-push changes: *patterns-downloadable-tools +.rules:labels:buildv2: + rules: + - <<: *if-revert-branch + when: never + - <<: *if-label-buildv2 + .rules:labels:nvs_coverage: rules: - <<: *if-revert-branch diff --git a/.gitlab/ci/test-win.yml b/.gitlab/ci/test-win.yml index 6928726e10..8bf2f62fa6 100644 --- a/.gitlab/ci/test-win.yml +++ b/.gitlab/ci/test-win.yml @@ -140,7 +140,7 @@ pytest_build_system_win_minimal_cmake: pytest_buildv2_system_win: extends: - .test_build_system_template_win - - .rules:labels:windows_pytest_build_system + - .rules:labels:buildv2 parallel: 2 needs: [] tags: [windows-build, brew]