From 2d55efba848456ba416759af06ce7377bba4b32b Mon Sep 17 00:00:00 2001 From: guotong ma Date: Thu, 28 Dec 2023 20:53:00 +0800 Subject: [ci][attachconfig]support subfolders --- .../.ci/attachconfig/aht21.attach | 1 - .../.ci/attachconfig/ap3216c.attach | 1 - .../.ci/attachconfig/ethernet_28j60.attach | 1 - .../.ci/attachconfig/fal_easyflash.attach | 1 - .../.ci/attachconfig/filesystem.attach | 2 -- .../.ci/attachconfig/icm20608.attach | 1 - .../.ci/attachconfig/lcd_st7787.attach | 1 - .../.ci/attachconfig/led_matrix.attach | 1 - .../.ci/attachconfig/lvgl.attach | 1 - .../.ci/attachconfig/peripheral/aht21.attach | 1 + .../.ci/attachconfig/peripheral/ap3216c.attach | 1 + .../attachconfig/peripheral/ethernet_28j60.attach | 1 + .../attachconfig/peripheral/fal_easyflash.attach | 1 + .../.ci/attachconfig/peripheral/filesystem.attach | 2 ++ .../.ci/attachconfig/peripheral/icm20608.attach | 1 + .../.ci/attachconfig/peripheral/lcd_st7787.attach | 1 + .../.ci/attachconfig/peripheral/led_matrix.attach | 1 + .../.ci/attachconfig/peripheral/lvgl.attach | 1 + .../.ci/attachconfig/peripheral/rs485.attach | 1 + .../.ci/attachconfig/peripheral/rw007.attach | 1 + .../peripheral/spi_flash_w25q64.attach | 1 + .../.ci/attachconfig/peripheral/sram.attach | 1 + .../.ci/attachconfig/peripheral/usb_mouse.attach | 1 + .../.ci/attachconfig/rs485.attach | 1 - .../.ci/attachconfig/rw007.attach | 1 - .../.ci/attachconfig/spi_flash_w25q64.attach | 1 - .../.ci/attachconfig/sram.attach | 1 - .../.ci/attachconfig/usb_mouse.attach | 1 - tools/ci/bsp_buildings.py | 26 +++++++++++++--------- 29 files changed, 31 insertions(+), 25 deletions(-) delete mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/aht21.attach delete mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/ap3216c.attach delete mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/ethernet_28j60.attach delete mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/fal_easyflash.attach delete mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/filesystem.attach delete mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/icm20608.attach delete mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/lcd_st7787.attach delete mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/led_matrix.attach delete mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/lvgl.attach create mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/aht21.attach create mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/ap3216c.attach create mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/ethernet_28j60.attach create mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/fal_easyflash.attach create mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/filesystem.attach create mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/icm20608.attach create mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/lcd_st7787.attach create mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/led_matrix.attach create mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/lvgl.attach create mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/rs485.attach create mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/rw007.attach create mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/spi_flash_w25q64.attach create mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/sram.attach create mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/usb_mouse.attach delete mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/rs485.attach delete mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/rw007.attach delete mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/spi_flash_w25q64.attach delete mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/sram.attach delete mode 100644 bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/usb_mouse.attach diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/aht21.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/aht21.attach deleted file mode 100644 index e9269471b5..0000000000 --- a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/aht21.attach +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BSP_USING_AHT21=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/ap3216c.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/ap3216c.attach deleted file mode 100644 index b8da5bcfb3..0000000000 --- a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/ap3216c.attach +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BSP_USING_AP3216C=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/ethernet_28j60.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/ethernet_28j60.attach deleted file mode 100644 index 085b183d92..0000000000 --- a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/ethernet_28j60.attach +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BSP_USING_ENC28j60=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/fal_easyflash.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/fal_easyflash.attach deleted file mode 100644 index 70aac6f974..0000000000 --- a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/fal_easyflash.attach +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BSP_USING_EASYFLASH=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/filesystem.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/filesystem.attach deleted file mode 100644 index 72c479e8d0..0000000000 --- a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/filesystem.attach +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_BSP_USING_FS=y -CONFIG_BSP_USING_FLASH_FATFS=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/icm20608.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/icm20608.attach deleted file mode 100644 index 922671ca35..0000000000 --- a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/icm20608.attach +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BSP_USING_ICM20608=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/lcd_st7787.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/lcd_st7787.attach deleted file mode 100644 index c4044805ae..0000000000 --- a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/lcd_st7787.attach +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BSP_USING_ONBOARD_LCD=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/led_matrix.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/led_matrix.attach deleted file mode 100644 index 7c18402022..0000000000 --- a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/led_matrix.attach +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BSP_USING_ONBOARD_LED_MATRIX=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/lvgl.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/lvgl.attach deleted file mode 100644 index 1ce3e528aa..0000000000 --- a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/lvgl.attach +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BSP_USING_LVGL=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/aht21.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/aht21.attach new file mode 100644 index 0000000000..e9269471b5 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/aht21.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_AHT21=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/ap3216c.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/ap3216c.attach new file mode 100644 index 0000000000..b8da5bcfb3 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/ap3216c.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_AP3216C=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/ethernet_28j60.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/ethernet_28j60.attach new file mode 100644 index 0000000000..085b183d92 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/ethernet_28j60.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ENC28j60=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/fal_easyflash.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/fal_easyflash.attach new file mode 100644 index 0000000000..70aac6f974 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/fal_easyflash.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_EASYFLASH=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/filesystem.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/filesystem.attach new file mode 100644 index 0000000000..72c479e8d0 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/filesystem.attach @@ -0,0 +1,2 @@ +CONFIG_BSP_USING_FS=y +CONFIG_BSP_USING_FLASH_FATFS=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/icm20608.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/icm20608.attach new file mode 100644 index 0000000000..922671ca35 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/icm20608.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ICM20608=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/lcd_st7787.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/lcd_st7787.attach new file mode 100644 index 0000000000..c4044805ae --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/lcd_st7787.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ONBOARD_LCD=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/led_matrix.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/led_matrix.attach new file mode 100644 index 0000000000..7c18402022 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/led_matrix.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_ONBOARD_LED_MATRIX=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/lvgl.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/lvgl.attach new file mode 100644 index 0000000000..1ce3e528aa --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/lvgl.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_LVGL=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/rs485.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/rs485.attach new file mode 100644 index 0000000000..144fb35d85 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/rs485.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_RS485=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/rw007.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/rw007.attach new file mode 100644 index 0000000000..be96228ae1 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/rw007.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_RW007_WLAN=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/spi_flash_w25q64.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/spi_flash_w25q64.attach new file mode 100644 index 0000000000..a2a4b41993 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/spi_flash_w25q64.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_SPI_FLASH=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/sram.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/sram.attach new file mode 100644 index 0000000000..516182d2b5 --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/sram.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_SRAM=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/usb_mouse.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/usb_mouse.attach new file mode 100644 index 0000000000..ad9c397d8b --- /dev/null +++ b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/peripheral/usb_mouse.attach @@ -0,0 +1 @@ +CONFIG_BSP_USING_USB_MOUSE=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/rs485.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/rs485.attach deleted file mode 100644 index 144fb35d85..0000000000 --- a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/rs485.attach +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BSP_USING_RS485=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/rw007.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/rw007.attach deleted file mode 100644 index be96228ae1..0000000000 --- a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/rw007.attach +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BSP_USING_RW007_WLAN=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/spi_flash_w25q64.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/spi_flash_w25q64.attach deleted file mode 100644 index a2a4b41993..0000000000 --- a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/spi_flash_w25q64.attach +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BSP_USING_SPI_FLASH=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/sram.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/sram.attach deleted file mode 100644 index 516182d2b5..0000000000 --- a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/sram.attach +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BSP_USING_SRAM=y diff --git a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/usb_mouse.attach b/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/usb_mouse.attach deleted file mode 100644 index ad9c397d8b..0000000000 --- a/bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/usb_mouse.attach +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BSP_USING_USB_MOUSE=y diff --git a/tools/ci/bsp_buildings.py b/tools/ci/bsp_buildings.py index d14d2ef89d..8ffd2d9849 100644 --- a/tools/ci/bsp_buildings.py +++ b/tools/ci/bsp_buildings.py @@ -1,6 +1,4 @@ import os -import re -import glob import shutil import multiprocessing @@ -108,7 +106,10 @@ def build_bsp_attachconfig(bsp, attach_file): config_bacakup = config_file+'.origin' shutil.copyfile(config_file, config_bacakup) - append_file(attach_file, config_file) + attachconfig_dir = os.path.join(rtt_root, 'bsp', bsp, '.ci/attachconfig') + attach_path = os.path.join(attachconfig_dir, attach_file) + + append_file(attach_path, config_file) res = build_bsp(bsp) @@ -145,18 +146,23 @@ if __name__ == "__main__": print("::endgroup::") attach_dir = os.path.join(rtt_root, 'bsp', bsp, '.ci/attachconfig') - attach_files = glob.glob(os.path.join(attach_dir, '*.attach')) - for attach_file in attach_files: + attach_list = [] + for root, dirs, files in os.walk(attach_dir): + for file in files: + file_path = os.path.join(root, file) + relative_path = os.path.relpath(file_path, attach_dir) + attach_list.append(relative_path) + + for attach_file in attach_list: count += 1 - attach = os.path.basename(attach_file) - print(f"::group::\tCompiling BSP: =={count}=== {bsp} {attach}===") + print(f"::group::\tCompiling BSP: =={count}=== {bsp} {attach_file}===") res = build_bsp_attachconfig(bsp, attach_file) if not res: - print(f"::error::build {bsp} {attach} failed.") - add_summary(f'\t- ❌ build {attach} failed.') + print(f"::error::build {bsp} {attach_file} failed.") + add_summary(f'\t- ❌ build {attach_file} failed.') failed += 1 else: - add_summary(f'\t- ✅ build {attach} success.') + add_summary(f'\t- ✅ build {attach_file} success.') print("::endgroup::") exit(failed) -- cgit v1.3.1