From d8aa6f8b2e4e927b471044a136a437116c12a10e Mon Sep 17 00:00:00 2001 From: CYFS <2805686936@qq.com> Date: Mon, 22 Jun 2026 10:16:28 +0800 Subject: [PATCH 1/2] [feat][ci]: reduce duplicate HC32 attachconfig builds --- .github/ALL_BSP_COMPILE.json | 7 +++++++ .github/workflows/bsp_buildings.yml | 1 + tools/ci/bsp_buildings.py | 13 +++++++++++++ 3 files changed, 21 insertions(+) diff --git a/.github/ALL_BSP_COMPILE.json b/.github/ALL_BSP_COMPILE.json index 9d97520f6c5..2bf3ebcbbca 100644 --- a/.github/ALL_BSP_COMPILE.json +++ b/.github/ALL_BSP_COMPILE.json @@ -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", diff --git a/.github/workflows/bsp_buildings.yml b/.github/workflows/bsp_buildings.yml index 312ee717451..40159f5f95d 100644 --- a/.github/workflows/bsp_buildings.yml +++ b/.github/workflows/bsp_buildings.yml @@ -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 diff --git a/tools/ci/bsp_buildings.py b/tools/ci/bsp_buildings.py index 7a4c8fc4763..a07340d4397 100644 --- a/tools/ci/bsp_buildings.py +++ b/tools/ci/bsp_buildings.py @@ -382,6 +382,14 @@ def check_output(output, check_string): 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 @@ def check_output(output, check_string): 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): From dc543f4a1be7786084285b659f0ad2edef6dbe6f Mon Sep 17 00:00:00 2001 From: CYFS <2805686936@qq.com> Date: Mon, 22 Jun 2026 10:17:01 +0800 Subject: [PATCH 2/2] [feat][ci]: trigger BSP build on matrix updates --- .github/workflows/bsp_buildings.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bsp_buildings.yml b/.github/workflows/bsp_buildings.yml index 40159f5f95d..707777a250c 100644 --- a/.github/workflows/bsp_buildings.yml +++ b/.github/workflows/bsp_buildings.yml @@ -17,7 +17,16 @@ on: branches: - master paths-ignore: - - .github/** + - .github/ISSUE_TEMPLATE/** + - .github/PULL_REQUEST_TEMPLATE.md + - .github/CODEOWNERS + - .github/CODE_OF_CONDUCT.md + - .github/CONTRIBUTING.md + - .github/SECURITY.md + - .github/copilot-instructions.md + - .github/labeler.yml + - .github/figures/** + - .github/utest/** - .gitee/** - .hook/** - documentation/** @@ -30,7 +39,16 @@ on: branches: - master paths-ignore: - - .github/** + - .github/ISSUE_TEMPLATE/** + - .github/PULL_REQUEST_TEMPLATE.md + - .github/CODEOWNERS + - .github/CODE_OF_CONDUCT.md + - .github/CONTRIBUTING.md + - .github/SECURITY.md + - .github/copilot-instructions.md + - .github/labeler.yml + - .github/figures/** + - .github/utest/** - .gitee/** - .hook/** - documentation/**