[feat][ci]: reduce duplicate HC32 attachconfig builds

This commit is contained in:
CYFS
2026-06-22 18:58:30 +08:00
committed by Rbb666
parent a828a3116d
commit c3c1672263
3 changed files with 21 additions and 0 deletions
+7
View File
@@ -6,6 +6,7 @@
// Date Author Notes
// 2025-03-22 Supperthomas 添加upload 上传编译固件
// 2025-03-31 Hydevcode 将需要编译的bsp列表分离,根据修改的文件对相应的bsp编译
// 2026-06-22 CYFS3 限制重复HC32附加配置构建,缩短CI等待时间
//
{
"legs": [
@@ -27,6 +28,12 @@
{
"RTT_BSP": "at32_hc32_ht32",
"RTT_TOOL_CHAIN": "sourcery-arm",
"ATTACHCONFIG_RTT_BSP": [
"hc32/ev_hc32f4a8_lqfp176",
"hc32/ev_hc32f334_lqfp64",
"hc32/ev_hc32f472_lqfp100",
"ht32/ht32f53252"
],
"SUB_RTT_BSP": [
"at32/at32a403a-start",
"at32/at32a423-start",
+1
View File
@@ -269,6 +269,7 @@ jobs:
RTT_BSP: ${{ matrix.legs.RTT_BSP }}
RTT_TOOL_CHAIN: ${{ matrix.legs.RTT_TOOL_CHAIN }}
SRTT_BSP: ${{ join(matrix.legs.SUB_RTT_BSP, ',') }}
ATTACHCONFIG_RTT_BSP: ${{ join(matrix.legs.ATTACHCONFIG_RTT_BSP || fromJSON('[]'), ',') }}
RTT_CI_BUILD_DIST: "1"
run: |
source ~/.env/env.sh
+13
View File
@@ -382,6 +382,14 @@ if __name__ == "__main__":
rtt_root = os.getcwd()
srtt_bsp = os.getenv('SRTT_BSP').split(',')
attachconfig_rtt_bsp_env = os.getenv('ATTACHCONFIG_RTT_BSP')
attachconfig_rtt_bsp = None
if attachconfig_rtt_bsp_env:
attachconfig_rtt_bsp = {
bsp.strip()
for bsp in attachconfig_rtt_bsp_env.split(',')
if bsp.strip()
}
print(srtt_bsp)
for bsp in srtt_bsp:
count += 1
@@ -395,6 +403,11 @@ if __name__ == "__main__":
add_summary(f'- ✅ build {bsp} success.')
print("::endgroup::")
if attachconfig_rtt_bsp is not None and bsp not in attachconfig_rtt_bsp:
print(f"Skip attachconfig build for {bsp}")
add_summary(f'\t- ⏭️ skip attachconfig build {bsp}.')
continue
yml_files_content = []
directory = os.path.join(rtt_root, 'bsp', bsp, '.ci/attachconfig')
if os.path.exists(directory):