From 29b3ad668347aa5bd3981dd6db775a86c255eb4a Mon Sep 17 00:00:00 2001 From: Tomas Rezucha Date: Fri, 10 Jan 2025 09:38:47 +0100 Subject: [PATCH] feat(ci): Split .build-test_rules.yml to smaller files --- .build-test-rules.yml | 119 ------------------- .idf_build_apps.toml | 2 +- components/.build-test-rules.yml | 28 +++++ components/io_expander/.build-test-rules.yml | 23 ++++ components/lcd/.build-test-rules.yml | 32 +++++ examples/.build-test-rules.yml | 16 +++ test_apps/.build-test-rules.yml | 16 +++ 7 files changed, 116 insertions(+), 120 deletions(-) delete mode 100644 .build-test-rules.yml create mode 100644 components/.build-test-rules.yml create mode 100644 components/io_expander/.build-test-rules.yml create mode 100644 components/lcd/.build-test-rules.yml create mode 100644 examples/.build-test-rules.yml create mode 100644 test_apps/.build-test-rules.yml diff --git a/.build-test-rules.yml b/.build-test-rules.yml deleted file mode 100644 index f241485a..00000000 --- a/.build-test-rules.yml +++ /dev/null @@ -1,119 +0,0 @@ -# Examples: Always build all -examples: - disable: - - if: CONFIG_NAME in ["esp-box", "esp-box-lite"] - reason: Do not build examples for deprecated BSPs - - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 2) and CONFIG_NAME in ["esp_bsp_generic", "esp_bsp_devkit", "m5stack_core"] - reason: Example depends on BSP, which is supported only for IDF >= 5.2 - - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 3) and CONFIG_NAME in ["esp32_p4_function_ev_board", "esp-box-3", "esp32_s3_lcd_ev_board"] - reason: Example depends on BSP, which is supported only for IDF >= 5.3 - - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 4) and CONFIG_NAME in ["m5stack_core_s3", "esp32_s2_kaluga_kit", "esp32_s3_korvo_2", "esp32_s3_eye"] - reason: Example depends on BSP, which is supported only for IDF >= 5.4 - -examples/generic_button_led: - disable: - - if: IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 2 - reason: Requires I2C Driver-NG which was introduced in v5.2 - -# Noglib test_app: Build only in CI, where ENV_BUILD_NOGLIB is set -test_apps/noglib: - disable: - - if: ENV_BUILD_NOGLIB == 0 - -# Common components test_app: Build for changes in components which do not have their own test_app or example -test_apps/components: - depends_filepatterns: - - "components/bh1750/**" - - "components/fbm320/**" - - "components/hts221/**" - - "components/lcd/esp_lcd_ra8875/**" - - "components/lcd/esp_lcd_sh1107/**" - - "components/lcd_touch/**" - - "components/mag3110/**" - - "components/mpu6050/**" - -# esp_lvgl_port: Build only on related changes and components used in examples -components/esp_lvgl_port: - depends_filepatterns: - - "components/esp_lvgl_port/**" - - "components/lcd_touch/esp_lcd_touch_tt21100/**" - - "components/lcd_touch/esp_lcd_touch_gt1151/**" - - "components/lcd/sh1107/**" - -# LCD components: Build only on related changes -components/lcd/esp_lcd_gc9a01: - depends_filepatterns: - - "components/lcd/esp_lcd_gc9a01/**" - -components/lcd/esp_lcd_gc9503: - depends_filepatterns: - - "components/lcd/esp_lcd_gc9503/**" - disable: - - if: (IDF_VERSION_MAJOR < 5 or ((IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR == 0) and ESP_IDF_VERSION_PATCH < 5)) or ((IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR == 1) and ESP_IDF_VERSION_PATCH == 1) - reason: Supported from version 5.0.5 and not supported in version 5.1.1 - -components/lcd/esp_lcd_ili9341: - depends_filepatterns: - - "components/lcd/esp_lcd_ili9341/**" - -components/lcd/esp_lcd_ili9881c: - depends_filepatterns: - - "components/lcd/esp_lcd_ili9881c/**" - disable: - - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 3) or IDF_VERSION_MAJOR < 5 - reason: Component is supported only for IDF >= 5.3 - - if: IDF_TARGET not in ["esp32p4"] - reason: Component is supported only for esp32p4 target - -components/lcd/esp_lcd_ssd1681: - depends_filepatterns: - - "components/lcd/esp_lcd_ssd1681/**" - -components/lcd/esp_lcd_st7796: - depends_filepatterns: - - "components/lcd/esp_lcd_st7796/**" - -components/ds18b20: - depends_filepatterns: - - "components/ds18b20/**" - disable: - - if: SOC_RMT_SUPPORTED != 1 - reason: Onewire component depends on RMT peripheral - -components/icm42670: - depends_filepatterns: - - "components/icm42670/**" - disable: - - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 2) or IDF_VERSION_MAJOR < 5 - reason: Requires I2C Driver-NG which was introduced in v5.2 - -components/qma6100p: - depends_filepatterns: - - "components/qma6100p/**" - disable: - - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 2) or IDF_VERSION_MAJOR < 5 - reason: Requires I2C Driver-NG which was introduced in v5.2 - -components/io_expander/esp_io_expander_ht8574: - depends_filepatterns: - - "components/io_expander/esp_io_expander/**" - - "components/io_expander/esp_io_expander_ht8574/**" - disable: - - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 2) or IDF_VERSION_MAJOR < 5 - reason: Requires I2C Driver-NG which was introduced in v5.2 - -components/io_expander/esp_io_expander_tca95xx_16bit: - depends_filepatterns: - - "components/io_expander/esp_io_expander/**" - - "components/io_expander/esp_io_expander_tca95xx_16bit/**" - disable: - - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 2) or IDF_VERSION_MAJOR < 5 - reason: Requires I2C Driver-NG which was introduced in v5.2 - -components/io_expander/esp_io_expander_tca9554: - depends_filepatterns: - - "components/io_expander/esp_io_expander/**" - - "components/io_expander/esp_io_expander_tca9554/**" - disable: - - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 2) or IDF_VERSION_MAJOR < 5 - reason: Requires I2C Driver-NG which was introduced in v5.2 diff --git a/.idf_build_apps.toml b/.idf_build_apps.toml index b9b71aa9..0c9db22d 100644 --- a/.idf_build_apps.toml +++ b/.idf_build_apps.toml @@ -2,7 +2,7 @@ recursive = true exclude = [ "SquareLine", ] -manifest_file = ".build-test-rules.yml" +manifest_file = ["components/.build-test-rules.yml", "components/io_expander/.build-test-rules.yml", "components/lcd/.build-test-rules.yml", "test_apps/.build-test-rules.yml", "examples/.build-test-rules.yml"] check_warnings = true ignore_warning_file = ".ignore_build_warnings.txt" config = "sdkconfig.bsp.*" diff --git a/components/.build-test-rules.yml b/components/.build-test-rules.yml new file mode 100644 index 00000000..d440a783 --- /dev/null +++ b/components/.build-test-rules.yml @@ -0,0 +1,28 @@ +# esp_lvgl_port: Build only on related changes and components used in examples +components/esp_lvgl_port: + depends_filepatterns: + - "components/esp_lvgl_port/**" + - "components/lcd_touch/esp_lcd_touch_tt21100/**" + - "components/lcd_touch/esp_lcd_touch_gt1151/**" + - "components/lcd/sh1107/**" + +components/ds18b20: + depends_filepatterns: + - "components/ds18b20/**" + disable: + - if: SOC_RMT_SUPPORTED != 1 + reason: Onewire component depends on RMT peripheral + +components/icm42670: + depends_filepatterns: + - "components/icm42670/**" + disable: + - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 2) or IDF_VERSION_MAJOR < 5 + reason: Requires I2C Driver-NG which was introduced in v5.2 + +components/qma6100p: + depends_filepatterns: + - "components/qma6100p/**" + disable: + - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 2) or IDF_VERSION_MAJOR < 5 + reason: Requires I2C Driver-NG which was introduced in v5.2 diff --git a/components/io_expander/.build-test-rules.yml b/components/io_expander/.build-test-rules.yml new file mode 100644 index 00000000..985c260f --- /dev/null +++ b/components/io_expander/.build-test-rules.yml @@ -0,0 +1,23 @@ +components/io_expander/esp_io_expander_ht8574: + depends_filepatterns: + - "components/io_expander/esp_io_expander/**" + - "components/io_expander/esp_io_expander_ht8574/**" + disable: + - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 2) or IDF_VERSION_MAJOR < 5 + reason: Requires I2C Driver-NG which was introduced in v5.2 + +components/io_expander/esp_io_expander_tca95xx_16bit: + depends_filepatterns: + - "components/io_expander/esp_io_expander/**" + - "components/io_expander/esp_io_expander_tca95xx_16bit/**" + disable: + - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 2) or IDF_VERSION_MAJOR < 5 + reason: Requires I2C Driver-NG which was introduced in v5.2 + +components/io_expander/esp_io_expander_tca9554: + depends_filepatterns: + - "components/io_expander/esp_io_expander/**" + - "components/io_expander/esp_io_expander_tca9554/**" + disable: + - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 2) or IDF_VERSION_MAJOR < 5 + reason: Requires I2C Driver-NG which was introduced in v5.2 diff --git a/components/lcd/.build-test-rules.yml b/components/lcd/.build-test-rules.yml new file mode 100644 index 00000000..d687ecd3 --- /dev/null +++ b/components/lcd/.build-test-rules.yml @@ -0,0 +1,32 @@ +# LCD components: Build only on related changes +components/lcd/esp_lcd_gc9a01: + depends_filepatterns: + - "components/lcd/esp_lcd_gc9a01/**" + +components/lcd/esp_lcd_gc9503: + depends_filepatterns: + - "components/lcd/esp_lcd_gc9503/**" + disable: + - if: (IDF_VERSION_MAJOR < 5 or ((IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR == 0) and ESP_IDF_VERSION_PATCH < 5)) or ((IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR == 1) and ESP_IDF_VERSION_PATCH == 1) + reason: Supported from version 5.0.5 and not supported in version 5.1.1 + +components/lcd/esp_lcd_ili9341: + depends_filepatterns: + - "components/lcd/esp_lcd_ili9341/**" + +components/lcd/esp_lcd_ili9881c: + depends_filepatterns: + - "components/lcd/esp_lcd_ili9881c/**" + disable: + - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 3) or IDF_VERSION_MAJOR < 5 + reason: Component is supported only for IDF >= 5.3 + - if: IDF_TARGET not in ["esp32p4"] + reason: Component is supported only for esp32p4 target + +components/lcd/esp_lcd_ssd1681: + depends_filepatterns: + - "components/lcd/esp_lcd_ssd1681/**" + +components/lcd/esp_lcd_st7796: + depends_filepatterns: + - "components/lcd/esp_lcd_st7796/**" diff --git a/examples/.build-test-rules.yml b/examples/.build-test-rules.yml new file mode 100644 index 00000000..3785dc25 --- /dev/null +++ b/examples/.build-test-rules.yml @@ -0,0 +1,16 @@ +# Examples: Always build all +examples: + disable: + - if: CONFIG_NAME in ["esp-box", "esp-box-lite"] + reason: Do not build examples for deprecated BSPs + - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 2) and CONFIG_NAME in ["esp_bsp_generic", "esp_bsp_devkit", "m5stack_core"] + reason: Example depends on BSP, which is supported only for IDF >= 5.2 + - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 3) and CONFIG_NAME in ["esp32_p4_function_ev_board", "esp-box-3", "esp32_s3_lcd_ev_board"] + reason: Example depends on BSP, which is supported only for IDF >= 5.3 + - if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 4) and CONFIG_NAME in ["m5stack_core_s3", "esp32_s2_kaluga_kit", "esp32_s3_korvo_2", "esp32_s3_eye"] + reason: Example depends on BSP, which is supported only for IDF >= 5.4 + +examples/generic_button_led: + disable: + - if: IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 2 + reason: Requires I2C Driver-NG which was introduced in v5.2 diff --git a/test_apps/.build-test-rules.yml b/test_apps/.build-test-rules.yml new file mode 100644 index 00000000..791386db --- /dev/null +++ b/test_apps/.build-test-rules.yml @@ -0,0 +1,16 @@ +# Noglib test_app: Build only in CI, where ENV_BUILD_NOGLIB is set +test_apps/noglib: + disable: + - if: ENV_BUILD_NOGLIB == 0 + +# Common components test_app: Build for changes in components which do not have their own test_app or example +test_apps/components: + depends_filepatterns: + - "components/bh1750/**" + - "components/fbm320/**" + - "components/hts221/**" + - "components/lcd/esp_lcd_ra8875/**" + - "components/lcd/esp_lcd_sh1107/**" + - "components/lcd_touch/**" + - "components/mag3110/**" + - "components/mpu6050/**"