From 81e7fa86cd9ef0793fc3b4d0e578b1f5191ec0a6 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Wed, 30 Mar 2022 11:47:50 +0800 Subject: [PATCH] ci: run component_ut_esp32_lan8720 only on master/release or with label this is a temporary workaround of lack of runners. --- .gitlab/ci/dependencies/dependencies.yml | 10 ++++++++++ .gitlab/ci/dependencies/generate_rules.py | 5 ++--- .gitlab/ci/rules.yml | 15 +++++++++++++++ .gitlab/ci/target-test.yml | 2 +- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.gitlab/ci/dependencies/dependencies.yml b/.gitlab/ci/dependencies/dependencies.yml index 8a9fca3662..2dce3397b3 100644 --- a/.gitlab/ci/dependencies/dependencies.yml +++ b/.gitlab/ci/dependencies/dependencies.yml @@ -165,3 +165,13 @@ build:integration_test: labels: - fuzzer_test - weekend_test + +"labels-protected:lan8720": # UT # FIXME: IDFCI-1176 temporary run this on master/release or with label + labels: + - lan8720 + included_in: + - build:unit_test + - build:unit_test-esp32 + - build:target_test + - build:component_ut + - build:component_ut-esp32 diff --git a/.gitlab/ci/dependencies/generate_rules.py b/.gitlab/ci/dependencies/generate_rules.py index 48f937bf4c..a6c3f9248d 100755 --- a/.gitlab/ci/dependencies/generate_rules.py +++ b/.gitlab/ci/dependencies/generate_rules.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 import argparse @@ -208,8 +208,7 @@ class RulesWriter: else: if not (name.endswith('-preview') or name.startswith('labels:')): _rules.append(self.RULE_PROTECTED) - # Special case for esp32c3 example_test, for now it only run with label - if name.startswith('test:') or name == 'labels:example_test-esp32c3': + if name.startswith('test:'): _rules.append(self.RULE_BUILD_ONLY) for label in cfg['labels']: _rules.append(self.RULE_LABEL_TEMPLATE.format(label)) diff --git a/.gitlab/ci/rules.yml b/.gitlab/ci/rules.yml index 33eef683be..138807a888 100644 --- a/.gitlab/ci/rules.yml +++ b/.gitlab/ci/rules.yml @@ -366,6 +366,9 @@ .if-label-iperf_stress_test: &if-label-iperf_stress_test if: '$BOT_LABEL_IPERF_STRESS_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*iperf_stress_test(?:,[^,\n\r]+)*$/i' +.if-label-lan8720: &if-label-lan8720 + if: '$BOT_LABEL_LAN8720 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*lan8720(?:,[^,\n\r]+)*$/i' + .if-label-macos: &if-label-macos if: '$BOT_LABEL_MACOS || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*macos(?:,[^,\n\r]+)*$/i' @@ -432,6 +435,7 @@ - <<: *if-label-component_ut_esp32h2 - <<: *if-label-component_ut_esp32s2 - <<: *if-label-component_ut_esp32s3 + - <<: *if-label-lan8720 - <<: *if-label-target_test - <<: *if-label-unit_test - <<: *if-label-unit_test_esp32 @@ -457,6 +461,7 @@ - <<: *if-label-build - <<: *if-label-component_ut - <<: *if-label-component_ut_esp32 + - <<: *if-label-lan8720 - <<: *if-label-target_test - <<: *if-label-unit_test - <<: *if-label-unit_test_esp32 @@ -914,6 +919,7 @@ - <<: *if-label-example_test_esp32s3 - <<: *if-label-integration_test - <<: *if-label-iperf_stress_test + - <<: *if-label-lan8720 - <<: *if-label-target_test - <<: *if-label-unit_test - <<: *if-label-unit_test_esp32 @@ -948,6 +954,7 @@ when: never - <<: *if-protected - <<: *if-label-build + - <<: *if-label-lan8720 - <<: *if-label-target_test - <<: *if-label-unit_test - <<: *if-label-unit_test_esp32 @@ -971,6 +978,7 @@ when: never - <<: *if-protected - <<: *if-label-build + - <<: *if-label-lan8720 - <<: *if-label-target_test - <<: *if-label-unit_test - <<: *if-label-unit_test_esp32 @@ -1085,6 +1093,13 @@ - <<: *if-dev-push changes: *patterns-windows +.rules:labels-protected:lan8720: + rules: + - <<: *if-revert-branch + when: never + - <<: *if-protected + - <<: *if-label-lan8720 + .rules:labels:fuzzer_test-weekend_test: rules: - <<: *if-revert-branch diff --git a/.gitlab/ci/target-test.yml b/.gitlab/ci/target-test.yml index 27f5326794..0b6c3e79da 100644 --- a/.gitlab/ci/target-test.yml +++ b/.gitlab/ci/target-test.yml @@ -109,7 +109,7 @@ component_ut_pytest_esp32_ip101: component_ut_pytest_esp32_lan8720: extends: - .pytest_components_dir_template - - .rules:test:component_ut-esp32 + - .rules:labels-protected:lan8720 # FIXME: IDFCI-1176 needs: - build_pytest_components_esp32 variables: