Skip to content

Commit c3c1672

Browse files
CYFS3Rbb666
authored andcommitted
[feat][ci]: reduce duplicate HC32 attachconfig builds
1 parent a828a31 commit c3c1672

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

.github/ALL_BSP_COMPILE.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Date Author Notes
77
// 2025-03-22 Supperthomas 添加upload 上传编译固件
88
// 2025-03-31 Hydevcode 将需要编译的bsp列表分离,根据修改的文件对相应的bsp编译
9+
// 2026-06-22 CYFS3 限制重复HC32附加配置构建,缩短CI等待时间
910
//
1011
{
1112
"legs": [
@@ -27,6 +28,12 @@
2728
{
2829
"RTT_BSP": "at32_hc32_ht32",
2930
"RTT_TOOL_CHAIN": "sourcery-arm",
31+
"ATTACHCONFIG_RTT_BSP": [
32+
"hc32/ev_hc32f4a8_lqfp176",
33+
"hc32/ev_hc32f334_lqfp64",
34+
"hc32/ev_hc32f472_lqfp100",
35+
"ht32/ht32f53252"
36+
],
3037
"SUB_RTT_BSP": [
3138
"at32/at32a403a-start",
3239
"at32/at32a423-start",

.github/workflows/bsp_buildings.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ jobs:
269269
RTT_BSP: ${{ matrix.legs.RTT_BSP }}
270270
RTT_TOOL_CHAIN: ${{ matrix.legs.RTT_TOOL_CHAIN }}
271271
SRTT_BSP: ${{ join(matrix.legs.SUB_RTT_BSP, ',') }}
272+
ATTACHCONFIG_RTT_BSP: ${{ join(matrix.legs.ATTACHCONFIG_RTT_BSP || fromJSON('[]'), ',') }}
272273
RTT_CI_BUILD_DIST: "1"
273274
run: |
274275
source ~/.env/env.sh

tools/ci/bsp_buildings.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,14 @@ def check_output(output, check_string):
382382

383383
rtt_root = os.getcwd()
384384
srtt_bsp = os.getenv('SRTT_BSP').split(',')
385+
attachconfig_rtt_bsp_env = os.getenv('ATTACHCONFIG_RTT_BSP')
386+
attachconfig_rtt_bsp = None
387+
if attachconfig_rtt_bsp_env:
388+
attachconfig_rtt_bsp = {
389+
bsp.strip()
390+
for bsp in attachconfig_rtt_bsp_env.split(',')
391+
if bsp.strip()
392+
}
385393
print(srtt_bsp)
386394
for bsp in srtt_bsp:
387395
count += 1
@@ -395,6 +403,11 @@ def check_output(output, check_string):
395403
add_summary(f'- ✅ build {bsp} success.')
396404
print("::endgroup::")
397405

406+
if attachconfig_rtt_bsp is not None and bsp not in attachconfig_rtt_bsp:
407+
print(f"Skip attachconfig build for {bsp}")
408+
add_summary(f'\t- ⏭️ skip attachconfig build {bsp}.')
409+
continue
410+
398411
yml_files_content = []
399412
directory = os.path.join(rtt_root, 'bsp', bsp, '.ci/attachconfig')
400413
if os.path.exists(directory):

0 commit comments

Comments
 (0)