ci: tighten BSP build failure detection#11439
Conversation
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
8ef2bf2 to
951a332
Compare
📌 Code Review Assignment🏷️ Tag: bsp_rt-sparkChanged Files (Click to expand)
🏷️ Tag: bsp_stm32Reviewers: @Liang1795 @hamburger-os @wdfk-prog Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2026-06-03 17:57 CST)
📝 Review Instructions
|
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
当前 BSP CI 编译看护存在失败未被正确传递的问题:部分前置命令、后置命令或构建结果检查只打印错误日志,但不会影响最终退出码;同时当 SCons 报告缺少
SConstruct/SConscript等构建入口文件时,脚本也可能没有稳定地把该问题转成 CI 失败。本 PR 用于完善 CI 编译失败捕获,解决 issue #11399。
Fixes #11399
你的解决方案是什么 (what is your solution)
SConstruct和SConscript,缺失时直接输出::error::并标记失败。run_cmd()中扫描 SCons fatal 日志,例如缺少SConstruct/SConscript、scons: ***等,即使命令返回码没有被正确传播,也会按失败处理。scons --pyconfig-silent、pkgs --update-force、pkgs --list、pre_build、post_build、build_check_result的失败都纳入本次 BSP 构建结果。compile_bsp_with_drivers.py中scons -C失败不向 CI 传递退出码的问题,改为累计失败数量并通过sys.exit(failed)返回。GITHUB_STEP_SUMMARY时产生无关文件。请提供验证的bsp和config (provide the config and bsp)
BSP:
bsp/stm32/stm32f407-rt-spark.config: 不涉及
.config修改,本次修改为 CI 脚本逻辑调整。action: 本地验证。人为注入缺失构建入口的测试条件,确认
tools/ci/bsp_buildings.py能输出::error::missing ...并以非零退出码结束;随后撤销测试 commit,仅保留正式修复提交。另执行python -m py_compile tools\ci\bsp_buildings.py tools\ci\compile_bsp_with_drivers.py验证脚本语法通过。]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up