1############
2# Patterns #
3############
4.patterns-c-files: &patterns-c-files
5  - ".gitlab/ci/static-code-analysis.yml"
6
7  - "tools/ci/static-analysis-rules.yml"
8  - "tools/ci/clang_tidy_dirs.txt"
9
10  - "**/*.{c,C}"
11  - "**/*.{h,H}"
12  - "components/**/Kconfig"
13  - "components/**/CMakeList.txt"
14
15.patterns-python-files: &patterns-python-files
16  - ".gitlab/ci/static-code-analysis.yml"
17  - "**/*.py"
18
19.patterns-sonarqube-files: &patterns-sonarqube-files
20  - "tools/ci/sonar_exclude_list.txt"
21
22.patterns-example_test: &patterns-example_test
23  - "tools/ci/python_packages/gitlab_api.py"
24  - "tools/ci/python_packages/idf_http_server_test/**/*"
25  - "tools/ci/python_packages/idf_iperf_test_util/**/*"
26  - "tools/ci/python_packages/tiny_test_fw/**/*"
27  - "tools/ci/python_packages/ttfw_idf/**/*"
28
29  - "tools/ci/find_apps_build_apps.sh"
30  - "tools/build_apps.py"
31  - "tools/find_apps.py"
32  - "tools/find_build_apps/**/*"
33
34  - "tools/esp_prov/**/*"
35  - "examples/**/*"
36
37.patterns-build-example_test: &patterns-build-example_test
38  - "tools/ci/build_example_dirs.txt"
39  - "tools/ci/get_supported_examples.sh"
40
41.patterns-build_components: &patterns-build_components
42  - "components/**/*"
43  - "examples/cxx/experimental/experimental_cpp_component/*"
44
45.patterns-build_system: &patterns-build_system
46  - "tools/cmake/**/*"
47  - "tools/kconfig_new/**/*"
48  - "tools/tools.json"
49  - "tools/ci/test_build_system*.sh"
50
51.patterns-custom_test: &patterns-custom_test
52  - "components/espcoredump/**/*"
53
54  - "tools/ci/python_packages/gitlab_api.py"
55  - "tools/ci/python_packages/tiny_test_fw/**/*"
56  - "tools/ci/python_packages/ttfw_idf/**/*"
57
58  - "tools/ci/find_apps_build_apps.sh"
59  - "tools/build_apps.py"
60  - "tools/find_apps.py"
61  - "tools/find_build_apps/**/*"
62
63  - "tools/test_apps/**/*"
64  - "tools/ldgen/**/*"
65
66.patterns-unit_test: &patterns-unit_test
67  - "tools/ci/python_packages/gitlab_api.py"
68  - "tools/ci/python_packages/tiny_test_fw/**/*"
69  - "tools/ci/python_packages/ttfw_idf/**/*"
70
71  - "tools/ci/find_apps_build_apps.sh"
72  - "tools/build_apps.py"
73  - "tools/find_apps.py"
74  - "tools/find_build_apps/**/*"
75
76  - "tools/unit-test-app/**/*"
77
78.patterns-component_ut: &patterns-component_ut
79  - "tools/ci/python_packages/gitlab_api.py"
80  - "tools/ci/python_packages/tiny_test_fw/**/*"
81  - "tools/ci/python_packages/ttfw_idf/**/*"
82
83  - "tools/ci/find_apps_build_apps.sh"
84  - "tools/build_apps.py"
85  - "tools/find_apps.py"
86  - "tools/find_build_apps/**/*"
87
88  - "components/**/test_apps/**/*"
89
90.patterns-integration_test: &patterns-integration_test
91  - "tools/ci/python_packages/tiny_test_fw/**/*"
92  - "tools/ci/integration_test/**/*"
93
94.patterns-host_test: &patterns-host_test
95  - ".gitlab/ci/host-test.yml"
96
97  - "components/**/*"
98
99  - "tools/ci/test_autocomplete.py"
100  - "tools/ci/test_build_system.sh"
101  - "tools/ci/test_build_system_cmake.sh"
102  - "tools/ci/test_check_kconfigs.py"
103  - "tools/ci/test_configure_ci_environment.sh"
104
105  - "tools/mass_mfg/**/*"
106
107  - "tools/esp_app_trace/**/*"
108  - "tools/ldgen/**/*"
109
110  - "tools/idf_monitor_base/*"
111  - "tools/idf_monitor.py"
112  - "tools/test_idf_monitor/**/*"
113
114  - "tools/idf.py"
115  - "tools/idf_py_actions/**/*"
116  - "tools/test_idf_py/**/*"
117
118  - "tools/idf_size.py"
119  - "tools/idf_size_yaml/*"
120  - "tools/test_idf_size/**/*"
121
122  - "tools/tools.json"
123  - "tools/tools_schema.json"
124  - "tools/idf_tools.py"
125  - "tools/test_idf_tools/**/*"
126
127  - "tools/mkdfu.py"
128  - "tools/test_mkdfu/**/*"
129
130  - "tools/kconfig_new/**/*"
131
132  - "tools/detect_python.sh"
133  - "tools/detect_python.fish"
134
135.patterns-windows: &patterns-windows
136  - "tools/windows/**/*"
137
138.patterns-docker: &patterns-docker
139  - "tools/docker/**/*"
140
141.patterns-submodule: &patterns-submodule
142  - "components/asio/asio"
143  - "components/bootloader/subproject/components/micro-ecc/micro-ecc"
144  - "components/bt/controller/lib_esp32"
145  - "components/bt/controller/lib_esp32c3_family"
146  - "components/bt/host/nimble/nimble"
147  - "components/cbor/tinycbor"
148  - "components/cmock/CMock"
149  - "components/cmock/CMock/vendor/c_exception"
150  - "components/cmock/CMock/vendor/unity"
151  - "components/coap/libcoap"
152  - "components/coap/libcoap/ext/tinydtls"
153  - "components/esp_phy/lib"
154  - "components/esp_wifi/lib"
155  - "components/esptool_py/esptool"
156  - "components/expat/expat"
157  - "components/json/cJSON"
158  - "components/libsodium/libsodium"
159  - "components/lwip/lwip"
160  - "components/mbedtls/mbedtls"
161  - "components/mqtt/esp-mqtt"
162  - "components/nghttp/nghttp2"
163  - "components/nghttp/nghttp2/third-party/mruby"
164  - "components/nghttp/nghttp2/third-party/neverbleed"
165  - "components/openthread/lib"
166  - "components/protobuf-c/protobuf-c"
167  - "components/spiffs/spiffs"
168  - "components/tinyusb/tinyusb"
169  - "components/unity/unity"
170  - "examples/build_system/cmake/import_lib/main/lib/tinyxml2"
171  - "examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthlib"
172
173##############
174# if anchors #
175##############
176.if-ref-master: &if-ref-master
177  if: '$CI_COMMIT_REF_NAME == "master"'
178
179.if-tag-release: &if-tag-release
180  if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/'
181
182.if-protected: &if-protected
183  if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/)'
184
185.if-protected-no_label: &if-protected-no_label
186  if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/) && $BOT_TRIGGER_WITH_LABEL == null'
187
188.if-dev-push: &if-dev-push
189  if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event")'
190
191.if-schedule: &if-schedule
192  if: '$CI_PIPELINE_SOURCE == "schedule"'
193
194.if-trigger: &if-trigger
195  if: '$CI_PIPELINE_SOURCE == "trigger"'
196
197.if-label-build-only: &if-label-build-only
198  if: '$CI_JOB_STAGE == "target_test" && $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*For Maintainers: Only Build Tests(?:,[^,\n\r]+)*$/i'
199
200#########
201# Rules #
202#########
203.rules:protected:
204  rules:
205    - <<: *if-protected
206
207.rules:protected-no_label:
208  rules:
209    - <<: *if-protected-no_label
210
211.rules:dev:
212  rules:
213    - <<: *if-trigger
214    - <<: *if-dev-push
215
216.rules:tag:release:
217  rules:
218    - <<: *if-tag-release
219
220.rules:ref:master-schedule:
221  rules:
222    - <<: *if-ref-master
223    - <<: *if-schedule
224
225.rules:ref:master-schedule-always:
226  rules:
227    - <<: *if-ref-master
228      when: always
229    - <<: *if-schedule
230      when: always
231
232.rules:patterns:clang_tidy:
233  rules:
234    - <<: *if-protected
235    - <<: *if-dev-push
236      changes: *patterns-c-files
237
238.rules:patterns:python-files:
239  rules:
240    - <<: *if-protected
241    - <<: *if-dev-push
242      changes: *patterns-python-files
243
244.rules:patterns:static-code-analysis-preview:
245  rules:
246    - <<: *if-dev-push
247      changes: *patterns-c-files
248    - <<: *if-dev-push
249      changes: *patterns-python-files
250    - <<: *if-dev-push
251      changes: *patterns-sonarqube-files
252
253# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
254# DO NOT place comments or maintain any code from this line
255#
256# Use dependencies.yml and generate_rules.py under .gitlab/ci/dependencies dir
257# to generate labels and rules
258# Could also use pre-commit hook to finish this if detected changes on
259# these two files
260# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
261
262##################
263# Auto Generated #
264##################
265.if-label-build: &if-label-build
266  if: '$BOT_LABEL_BUILD || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*build(?:,[^,\n\r]+)*$/i'
267
268.if-label-component_ut: &if-label-component_ut
269  if: '$BOT_LABEL_COMPONENT_UT || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut(?:,[^,\n\r]+)*$/i'
270
271.if-label-component_ut_esp32: &if-label-component_ut_esp32
272  if: '$BOT_LABEL_COMPONENT_UT_ESP32 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32(?:,[^,\n\r]+)*$/i'
273
274.if-label-component_ut_esp32c3: &if-label-component_ut_esp32c3
275  if: '$BOT_LABEL_COMPONENT_UT_ESP32C3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32c3(?:,[^,\n\r]+)*$/i'
276
277.if-label-component_ut_esp32s2: &if-label-component_ut_esp32s2
278  if: '$BOT_LABEL_COMPONENT_UT_ESP32S2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32s2(?:,[^,\n\r]+)*$/i'
279
280.if-label-component_ut_esp32s3: &if-label-component_ut_esp32s3
281  if: '$BOT_LABEL_COMPONENT_UT_ESP32S3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32s3(?:,[^,\n\r]+)*$/i'
282
283.if-label-custom_test: &if-label-custom_test
284  if: '$BOT_LABEL_CUSTOM_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test(?:,[^,\n\r]+)*$/i'
285
286.if-label-custom_test_esp32: &if-label-custom_test_esp32
287  if: '$BOT_LABEL_CUSTOM_TEST_ESP32 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32(?:,[^,\n\r]+)*$/i'
288
289.if-label-custom_test_esp32c3: &if-label-custom_test_esp32c3
290  if: '$BOT_LABEL_CUSTOM_TEST_ESP32C3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32c3(?:,[^,\n\r]+)*$/i'
291
292.if-label-custom_test_esp32s2: &if-label-custom_test_esp32s2
293  if: '$BOT_LABEL_CUSTOM_TEST_ESP32S2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32s2(?:,[^,\n\r]+)*$/i'
294
295.if-label-custom_test_esp32s3: &if-label-custom_test_esp32s3
296  if: '$BOT_LABEL_CUSTOM_TEST_ESP32S3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32s3(?:,[^,\n\r]+)*$/i'
297
298.if-label-docker: &if-label-docker
299  if: '$BOT_LABEL_DOCKER || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*docker(?:,[^,\n\r]+)*$/i'
300
301.if-label-example_test: &if-label-example_test
302  if: '$BOT_LABEL_EXAMPLE_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test(?:,[^,\n\r]+)*$/i'
303
304.if-label-example_test_esp32: &if-label-example_test_esp32
305  if: '$BOT_LABEL_EXAMPLE_TEST_ESP32 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32(?:,[^,\n\r]+)*$/i'
306
307.if-label-example_test_esp32c3: &if-label-example_test_esp32c3
308  if: '$BOT_LABEL_EXAMPLE_TEST_ESP32C3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32c3(?:,[^,\n\r]+)*$/i'
309
310.if-label-example_test_esp32s2: &if-label-example_test_esp32s2
311  if: '$BOT_LABEL_EXAMPLE_TEST_ESP32S2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32s2(?:,[^,\n\r]+)*$/i'
312
313.if-label-example_test_esp32s3: &if-label-example_test_esp32s3
314  if: '$BOT_LABEL_EXAMPLE_TEST_ESP32S3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32s3(?:,[^,\n\r]+)*$/i'
315
316.if-label-fuzzer_test: &if-label-fuzzer_test
317  if: '$BOT_LABEL_FUZZER_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*fuzzer_test(?:,[^,\n\r]+)*$/i'
318
319.if-label-host_test: &if-label-host_test
320  if: '$BOT_LABEL_HOST_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*host_test(?:,[^,\n\r]+)*$/i'
321
322.if-label-integration_test: &if-label-integration_test
323  if: '$BOT_LABEL_INTEGRATION_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*integration_test(?:,[^,\n\r]+)*$/i'
324
325.if-label-iperf_stress_test: &if-label-iperf_stress_test
326  if: '$BOT_LABEL_IPERF_STRESS_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*iperf_stress_test(?:,[^,\n\r]+)*$/i'
327
328.if-label-macos: &if-label-macos
329  if: '$BOT_LABEL_MACOS || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*macos(?:,[^,\n\r]+)*$/i'
330
331.if-label-macos_test: &if-label-macos_test
332  if: '$BOT_LABEL_MACOS_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*macos_test(?:,[^,\n\r]+)*$/i'
333
334.if-label-nvs_coverage: &if-label-nvs_coverage
335  if: '$BOT_LABEL_NVS_COVERAGE || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*nvs_coverage(?:,[^,\n\r]+)*$/i'
336
337.if-label-submodule: &if-label-submodule
338  if: '$BOT_LABEL_SUBMODULE || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*submodule(?:,[^,\n\r]+)*$/i'
339
340.if-label-target_test: &if-label-target_test
341  if: '$BOT_LABEL_TARGET_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*target_test(?:,[^,\n\r]+)*$/i'
342
343.if-label-unit_test: &if-label-unit_test
344  if: '$BOT_LABEL_UNIT_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test(?:,[^,\n\r]+)*$/i'
345
346.if-label-unit_test_esp32: &if-label-unit_test_esp32
347  if: '$BOT_LABEL_UNIT_TEST_ESP32 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32(?:,[^,\n\r]+)*$/i'
348
349.if-label-unit_test_esp32c3: &if-label-unit_test_esp32c3
350  if: '$BOT_LABEL_UNIT_TEST_ESP32C3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32c3(?:,[^,\n\r]+)*$/i'
351
352.if-label-unit_test_esp32s2: &if-label-unit_test_esp32s2
353  if: '$BOT_LABEL_UNIT_TEST_ESP32S2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32s2(?:,[^,\n\r]+)*$/i'
354
355.if-label-unit_test_esp32s3: &if-label-unit_test_esp32s3
356  if: '$BOT_LABEL_UNIT_TEST_ESP32S3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32s3(?:,[^,\n\r]+)*$/i'
357
358.if-label-weekend_test: &if-label-weekend_test
359  if: '$BOT_LABEL_WEEKEND_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*weekend_test(?:,[^,\n\r]+)*$/i'
360
361.if-label-windows: &if-label-windows
362  if: '$BOT_LABEL_WINDOWS || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*windows(?:,[^,\n\r]+)*$/i'
363
364.rules:build:
365  rules:
366    - <<: *if-protected
367    - <<: *if-label-build
368    - <<: *if-dev-push
369      changes: *patterns-build_components
370    - <<: *if-dev-push
371      changes: *patterns-build_system
372
373.rules:build:component_ut:
374  rules:
375    - <<: *if-protected
376    - <<: *if-label-build
377    - <<: *if-label-component_ut
378    - <<: *if-label-component_ut_esp32
379    - <<: *if-label-component_ut_esp32c3
380    - <<: *if-label-component_ut_esp32s2
381    - <<: *if-label-component_ut_esp32s3
382    - <<: *if-label-target_test
383    - <<: *if-label-unit_test
384    - <<: *if-label-unit_test_esp32
385    - <<: *if-label-unit_test_esp32c3
386    - <<: *if-label-unit_test_esp32s2
387    - <<: *if-label-unit_test_esp32s3
388    - <<: *if-dev-push
389      changes: *patterns-build_components
390    - <<: *if-dev-push
391      changes: *patterns-build_system
392    - <<: *if-dev-push
393      changes: *patterns-component_ut
394
395.rules:build:component_ut-esp32:
396  rules:
397    - <<: *if-protected
398    - <<: *if-label-build
399    - <<: *if-label-component_ut
400    - <<: *if-label-component_ut_esp32
401    - <<: *if-label-target_test
402    - <<: *if-label-unit_test
403    - <<: *if-label-unit_test_esp32
404    - <<: *if-dev-push
405      changes: *patterns-build_components
406    - <<: *if-dev-push
407      changes: *patterns-build_system
408    - <<: *if-dev-push
409      changes: *patterns-component_ut
410
411.rules:build:component_ut-esp32c3:
412  rules:
413    - <<: *if-protected
414    - <<: *if-label-build
415    - <<: *if-label-component_ut
416    - <<: *if-label-component_ut_esp32c3
417    - <<: *if-label-target_test
418    - <<: *if-label-unit_test
419    - <<: *if-label-unit_test_esp32c3
420    - <<: *if-dev-push
421      changes: *patterns-build_components
422    - <<: *if-dev-push
423      changes: *patterns-build_system
424    - <<: *if-dev-push
425      changes: *patterns-component_ut
426
427.rules:build:component_ut-esp32s2:
428  rules:
429    - <<: *if-protected
430    - <<: *if-label-build
431    - <<: *if-label-component_ut
432    - <<: *if-label-component_ut_esp32s2
433    - <<: *if-label-target_test
434    - <<: *if-label-unit_test
435    - <<: *if-label-unit_test_esp32s2
436    - <<: *if-dev-push
437      changes: *patterns-build_components
438    - <<: *if-dev-push
439      changes: *patterns-build_system
440    - <<: *if-dev-push
441      changes: *patterns-component_ut
442
443.rules:build:component_ut-esp32s3:
444  rules:
445    - <<: *if-protected
446    - <<: *if-label-build
447    - <<: *if-label-component_ut
448    - <<: *if-label-component_ut_esp32s3
449    - <<: *if-label-target_test
450    - <<: *if-label-unit_test
451    - <<: *if-label-unit_test_esp32s3
452    - <<: *if-dev-push
453      changes: *patterns-build_components
454    - <<: *if-dev-push
455      changes: *patterns-build_system
456    - <<: *if-dev-push
457      changes: *patterns-component_ut
458
459.rules:build:custom_test:
460  rules:
461    - <<: *if-protected
462    - <<: *if-label-build
463    - <<: *if-label-custom_test
464    - <<: *if-label-custom_test_esp32
465    - <<: *if-label-custom_test_esp32c3
466    - <<: *if-label-custom_test_esp32s2
467    - <<: *if-label-custom_test_esp32s3
468    - <<: *if-label-target_test
469    - <<: *if-label-weekend_test
470    - <<: *if-dev-push
471      changes: *patterns-build_components
472    - <<: *if-dev-push
473      changes: *patterns-build_system
474    - <<: *if-dev-push
475      changes: *patterns-custom_test
476
477.rules:build:custom_test-esp32:
478  rules:
479    - <<: *if-protected
480    - <<: *if-label-build
481    - <<: *if-label-custom_test
482    - <<: *if-label-custom_test_esp32
483    - <<: *if-label-target_test
484    - <<: *if-label-weekend_test
485    - <<: *if-dev-push
486      changes: *patterns-build_components
487    - <<: *if-dev-push
488      changes: *patterns-build_system
489    - <<: *if-dev-push
490      changes: *patterns-custom_test
491
492.rules:build:custom_test-esp32c3:
493  rules:
494    - <<: *if-protected
495    - <<: *if-label-build
496    - <<: *if-label-custom_test
497    - <<: *if-label-custom_test_esp32c3
498    - <<: *if-label-target_test
499    - <<: *if-dev-push
500      changes: *patterns-build_components
501    - <<: *if-dev-push
502      changes: *patterns-build_system
503    - <<: *if-dev-push
504      changes: *patterns-custom_test
505
506.rules:build:custom_test-esp32s2:
507  rules:
508    - <<: *if-protected
509    - <<: *if-label-build
510    - <<: *if-label-custom_test
511    - <<: *if-label-custom_test_esp32s2
512    - <<: *if-label-target_test
513    - <<: *if-dev-push
514      changes: *patterns-build_components
515    - <<: *if-dev-push
516      changes: *patterns-build_system
517    - <<: *if-dev-push
518      changes: *patterns-custom_test
519
520.rules:build:custom_test-esp32s3:
521  rules:
522    - <<: *if-protected
523    - <<: *if-label-build
524    - <<: *if-label-custom_test
525    - <<: *if-label-custom_test_esp32s3
526    - <<: *if-label-target_test
527    - <<: *if-dev-push
528      changes: *patterns-build_components
529    - <<: *if-dev-push
530      changes: *patterns-build_system
531    - <<: *if-dev-push
532      changes: *patterns-custom_test
533
534.rules:build:docker:
535  rules:
536    - <<: *if-protected
537    - <<: *if-label-build
538    - <<: *if-label-docker
539    - <<: *if-dev-push
540      changes: *patterns-docker
541
542.rules:build:example_test:
543  rules:
544    - <<: *if-protected
545    - <<: *if-label-build
546    - <<: *if-label-example_test
547    - <<: *if-label-example_test_esp32
548    - <<: *if-label-example_test_esp32c3
549    - <<: *if-label-example_test_esp32s2
550    - <<: *if-label-example_test_esp32s3
551    - <<: *if-label-iperf_stress_test
552    - <<: *if-label-target_test
553    - <<: *if-dev-push
554      changes: *patterns-build-example_test
555    - <<: *if-dev-push
556      changes: *patterns-build_components
557    - <<: *if-dev-push
558      changes: *patterns-build_system
559    - <<: *if-dev-push
560      changes: *patterns-example_test
561
562.rules:build:example_test-esp32:
563  rules:
564    - <<: *if-protected
565    - <<: *if-label-build
566    - <<: *if-label-example_test
567    - <<: *if-label-example_test_esp32
568    - <<: *if-label-iperf_stress_test
569    - <<: *if-label-target_test
570    - <<: *if-dev-push
571      changes: *patterns-build-example_test
572    - <<: *if-dev-push
573      changes: *patterns-build_components
574    - <<: *if-dev-push
575      changes: *patterns-build_system
576    - <<: *if-dev-push
577      changes: *patterns-example_test
578
579.rules:build:example_test-esp32c3:
580  rules:
581    - <<: *if-protected
582    - <<: *if-label-build
583    - <<: *if-label-example_test
584    - <<: *if-label-example_test_esp32c3
585    - <<: *if-label-target_test
586    - <<: *if-dev-push
587      changes: *patterns-build-example_test
588    - <<: *if-dev-push
589      changes: *patterns-build_components
590    - <<: *if-dev-push
591      changes: *patterns-build_system
592    - <<: *if-dev-push
593      changes: *patterns-example_test
594
595.rules:build:example_test-esp32s2:
596  rules:
597    - <<: *if-protected
598    - <<: *if-label-build
599    - <<: *if-label-example_test
600    - <<: *if-label-example_test_esp32s2
601    - <<: *if-label-target_test
602    - <<: *if-dev-push
603      changes: *patterns-build-example_test
604    - <<: *if-dev-push
605      changes: *patterns-build_components
606    - <<: *if-dev-push
607      changes: *patterns-build_system
608    - <<: *if-dev-push
609      changes: *patterns-example_test
610
611.rules:build:example_test-esp32s3:
612  rules:
613    - <<: *if-protected
614    - <<: *if-label-build
615    - <<: *if-label-example_test
616    - <<: *if-label-example_test_esp32s3
617    - <<: *if-label-target_test
618    - <<: *if-dev-push
619      changes: *patterns-build-example_test
620    - <<: *if-dev-push
621      changes: *patterns-build_components
622    - <<: *if-dev-push
623      changes: *patterns-build_system
624    - <<: *if-dev-push
625      changes: *patterns-example_test
626
627.rules:build:integration_test:
628  rules:
629    - <<: *if-protected
630    - <<: *if-label-build
631    - <<: *if-label-integration_test
632    - <<: *if-label-target_test
633    - <<: *if-dev-push
634      changes: *patterns-build_components
635    - <<: *if-dev-push
636      changes: *patterns-build_system
637    - <<: *if-dev-push
638      changes: *patterns-integration_test
639
640.rules:build:macos:
641  rules:
642    - <<: *if-protected
643    - <<: *if-label-build
644    - <<: *if-label-macos
645    - <<: *if-label-macos_test
646    - <<: *if-dev-push
647      changes: *patterns-build_system
648
649.rules:build:target_test:
650  rules:
651    - <<: *if-protected
652    - <<: *if-label-build
653    - <<: *if-label-component_ut
654    - <<: *if-label-component_ut_esp32
655    - <<: *if-label-component_ut_esp32c3
656    - <<: *if-label-component_ut_esp32s2
657    - <<: *if-label-component_ut_esp32s3
658    - <<: *if-label-custom_test
659    - <<: *if-label-custom_test_esp32
660    - <<: *if-label-custom_test_esp32c3
661    - <<: *if-label-custom_test_esp32s2
662    - <<: *if-label-custom_test_esp32s3
663    - <<: *if-label-example_test
664    - <<: *if-label-example_test_esp32
665    - <<: *if-label-example_test_esp32c3
666    - <<: *if-label-example_test_esp32s2
667    - <<: *if-label-example_test_esp32s3
668    - <<: *if-label-integration_test
669    - <<: *if-label-iperf_stress_test
670    - <<: *if-label-target_test
671    - <<: *if-label-unit_test
672    - <<: *if-label-unit_test_esp32
673    - <<: *if-label-unit_test_esp32c3
674    - <<: *if-label-unit_test_esp32s2
675    - <<: *if-label-unit_test_esp32s3
676    - <<: *if-label-weekend_test
677    - <<: *if-dev-push
678      changes: *patterns-build-example_test
679    - <<: *if-dev-push
680      changes: *patterns-build_components
681    - <<: *if-dev-push
682      changes: *patterns-build_system
683    - <<: *if-dev-push
684      changes: *patterns-component_ut
685    - <<: *if-dev-push
686      changes: *patterns-custom_test
687    - <<: *if-dev-push
688      changes: *patterns-example_test
689    - <<: *if-dev-push
690      changes: *patterns-integration_test
691    - <<: *if-dev-push
692      changes: *patterns-unit_test
693
694.rules:build:unit_test:
695  rules:
696    - <<: *if-protected
697    - <<: *if-label-build
698    - <<: *if-label-target_test
699    - <<: *if-label-unit_test
700    - <<: *if-label-unit_test_esp32
701    - <<: *if-label-unit_test_esp32c3
702    - <<: *if-label-unit_test_esp32s2
703    - <<: *if-label-unit_test_esp32s3
704    - <<: *if-dev-push
705      changes: *patterns-build_components
706    - <<: *if-dev-push
707      changes: *patterns-build_system
708    - <<: *if-dev-push
709      changes: *patterns-unit_test
710
711.rules:build:unit_test-esp32:
712  rules:
713    - <<: *if-protected
714    - <<: *if-label-build
715    - <<: *if-label-target_test
716    - <<: *if-label-unit_test
717    - <<: *if-label-unit_test_esp32
718    - <<: *if-dev-push
719      changes: *patterns-build_components
720    - <<: *if-dev-push
721      changes: *patterns-build_system
722    - <<: *if-dev-push
723      changes: *patterns-unit_test
724
725.rules:build:unit_test-esp32c3:
726  rules:
727    - <<: *if-protected
728    - <<: *if-label-build
729    - <<: *if-label-target_test
730    - <<: *if-label-unit_test
731    - <<: *if-label-unit_test_esp32c3
732    - <<: *if-dev-push
733      changes: *patterns-build_components
734    - <<: *if-dev-push
735      changes: *patterns-build_system
736    - <<: *if-dev-push
737      changes: *patterns-unit_test
738
739.rules:build:unit_test-esp32s2:
740  rules:
741    - <<: *if-protected
742    - <<: *if-label-build
743    - <<: *if-label-target_test
744    - <<: *if-label-unit_test
745    - <<: *if-label-unit_test_esp32s2
746    - <<: *if-dev-push
747      changes: *patterns-build_components
748    - <<: *if-dev-push
749      changes: *patterns-build_system
750    - <<: *if-dev-push
751      changes: *patterns-unit_test
752
753.rules:build:unit_test-esp32s3:
754  rules:
755    - <<: *if-protected
756    - <<: *if-label-build
757    - <<: *if-label-target_test
758    - <<: *if-label-unit_test
759    - <<: *if-label-unit_test_esp32s3
760    - <<: *if-dev-push
761      changes: *patterns-build_components
762    - <<: *if-dev-push
763      changes: *patterns-build_system
764    - <<: *if-dev-push
765      changes: *patterns-unit_test
766
767.rules:build:windows:
768  rules:
769    - <<: *if-protected
770    - <<: *if-label-build
771    - <<: *if-label-windows
772    - <<: *if-dev-push
773      changes: *patterns-build_system
774    - <<: *if-dev-push
775      changes: *patterns-windows
776
777.rules:labels:fuzzer_test-weekend_test:
778  rules:
779    - <<: *if-label-fuzzer_test
780    - <<: *if-label-weekend_test
781
782.rules:labels:iperf_stress_test:
783  rules:
784    - <<: *if-label-iperf_stress_test
785
786.rules:labels:nvs_coverage:
787  rules:
788    - <<: *if-label-nvs_coverage
789
790.rules:labels:weekend_test:
791  rules:
792    - <<: *if-label-weekend_test
793
794.rules:test:component_ut-esp32:
795  rules:
796    - <<: *if-protected
797    - <<: *if-label-build-only
798      when: never
799    - <<: *if-label-component_ut
800    - <<: *if-label-component_ut_esp32
801    - <<: *if-label-target_test
802    - <<: *if-label-unit_test
803    - <<: *if-label-unit_test_esp32
804    - <<: *if-dev-push
805      changes: *patterns-component_ut
806
807.rules:test:component_ut-esp32c3:
808  rules:
809    - <<: *if-protected
810    - <<: *if-label-build-only
811      when: never
812    - <<: *if-label-component_ut
813    - <<: *if-label-component_ut_esp32c3
814    - <<: *if-label-target_test
815    - <<: *if-label-unit_test
816    - <<: *if-label-unit_test_esp32c3
817    - <<: *if-dev-push
818      changes: *patterns-component_ut
819
820.rules:test:component_ut-esp32s2:
821  rules:
822    - <<: *if-protected
823    - <<: *if-label-build-only
824      when: never
825    - <<: *if-label-component_ut
826    - <<: *if-label-component_ut_esp32s2
827    - <<: *if-label-target_test
828    - <<: *if-label-unit_test
829    - <<: *if-label-unit_test_esp32s2
830    - <<: *if-dev-push
831      changes: *patterns-component_ut
832
833.rules:test:component_ut-esp32s3:
834  rules:
835    - <<: *if-protected
836    - <<: *if-label-build-only
837      when: never
838    - <<: *if-label-component_ut
839    - <<: *if-label-component_ut_esp32s3
840    - <<: *if-label-target_test
841    - <<: *if-label-unit_test
842    - <<: *if-label-unit_test_esp32s3
843    - <<: *if-dev-push
844      changes: *patterns-component_ut
845
846.rules:test:custom_test-esp32:
847  rules:
848    - <<: *if-protected
849    - <<: *if-label-build-only
850      when: never
851    - <<: *if-label-custom_test
852    - <<: *if-label-custom_test_esp32
853    - <<: *if-label-target_test
854    - <<: *if-dev-push
855      changes: *patterns-custom_test
856
857.rules:test:custom_test-esp32c3:
858  rules:
859    - <<: *if-protected
860    - <<: *if-label-build-only
861      when: never
862    - <<: *if-label-custom_test
863    - <<: *if-label-custom_test_esp32c3
864    - <<: *if-label-target_test
865    - <<: *if-dev-push
866      changes: *patterns-custom_test
867
868.rules:test:custom_test-esp32s2:
869  rules:
870    - <<: *if-protected
871    - <<: *if-label-build-only
872      when: never
873    - <<: *if-label-custom_test
874    - <<: *if-label-custom_test_esp32s2
875    - <<: *if-label-target_test
876    - <<: *if-dev-push
877      changes: *patterns-custom_test
878
879.rules:test:custom_test-esp32s3:
880  rules:
881    - <<: *if-protected
882    - <<: *if-label-build-only
883      when: never
884    - <<: *if-label-custom_test
885    - <<: *if-label-custom_test_esp32s3
886    - <<: *if-label-target_test
887    - <<: *if-dev-push
888      changes: *patterns-custom_test
889
890.rules:test:example_test-esp32:
891  rules:
892    - <<: *if-protected
893    - <<: *if-label-build-only
894      when: never
895    - <<: *if-label-example_test
896    - <<: *if-label-example_test_esp32
897    - <<: *if-label-target_test
898    - <<: *if-dev-push
899      changes: *patterns-build-example_test
900    - <<: *if-dev-push
901      changes: *patterns-example_test
902
903.rules:test:example_test-esp32c3:
904  rules:
905    - <<: *if-protected
906    - <<: *if-label-build-only
907      when: never
908    - <<: *if-label-example_test
909    - <<: *if-label-example_test_esp32c3
910    - <<: *if-label-target_test
911    - <<: *if-dev-push
912      changes: *patterns-build-example_test
913    - <<: *if-dev-push
914      changes: *patterns-example_test
915
916.rules:test:example_test-esp32s2:
917  rules:
918    - <<: *if-protected
919    - <<: *if-label-build-only
920      when: never
921    - <<: *if-label-example_test
922    - <<: *if-label-example_test_esp32s2
923    - <<: *if-label-target_test
924    - <<: *if-dev-push
925      changes: *patterns-build-example_test
926    - <<: *if-dev-push
927      changes: *patterns-example_test
928
929.rules:test:example_test-esp32s3:
930  rules:
931    - <<: *if-protected
932    - <<: *if-label-build-only
933      when: never
934    - <<: *if-label-example_test
935    - <<: *if-label-example_test_esp32s3
936    - <<: *if-label-target_test
937    - <<: *if-dev-push
938      changes: *patterns-build-example_test
939    - <<: *if-dev-push
940      changes: *patterns-example_test
941
942.rules:test:host_test:
943  rules:
944    - <<: *if-protected
945    - <<: *if-label-build-only
946      when: never
947    - <<: *if-label-host_test
948    - <<: *if-dev-push
949      changes: *patterns-host_test
950
951.rules:test:integration_test:
952  rules:
953    - <<: *if-protected
954    - <<: *if-label-build-only
955      when: never
956    - <<: *if-label-integration_test
957    - <<: *if-label-target_test
958    - <<: *if-dev-push
959      changes: *patterns-integration_test
960
961.rules:test:submodule:
962  rules:
963    - <<: *if-protected
964    - <<: *if-label-build-only
965      when: never
966    - <<: *if-label-submodule
967    - <<: *if-dev-push
968      changes: *patterns-submodule
969
970.rules:test:unit_test-esp32:
971  rules:
972    - <<: *if-protected
973    - <<: *if-label-build-only
974      when: never
975    - <<: *if-label-target_test
976    - <<: *if-label-unit_test
977    - <<: *if-label-unit_test_esp32
978    - <<: *if-dev-push
979      changes: *patterns-unit_test
980
981.rules:test:unit_test-esp32c3:
982  rules:
983    - <<: *if-protected
984    - <<: *if-label-build-only
985      when: never
986    - <<: *if-label-target_test
987    - <<: *if-label-unit_test
988    - <<: *if-label-unit_test_esp32c3
989    - <<: *if-dev-push
990      changes: *patterns-unit_test
991
992.rules:test:unit_test-esp32s2:
993  rules:
994    - <<: *if-protected
995    - <<: *if-label-build-only
996      when: never
997    - <<: *if-label-target_test
998    - <<: *if-label-unit_test
999    - <<: *if-label-unit_test_esp32s2
1000    - <<: *if-dev-push
1001      changes: *patterns-unit_test
1002
1003.rules:test:unit_test-esp32s3:
1004  rules:
1005    - <<: *if-protected
1006    - <<: *if-label-build-only
1007      when: never
1008    - <<: *if-label-target_test
1009    - <<: *if-label-unit_test
1010    - <<: *if-label-unit_test_esp32s3
1011    - <<: *if-dev-push
1012      changes: *patterns-unit_test
1013