Pull Request已成功合入, 合并人@CANN-robot
(感谢 yajie_caroline 的贡献)变更摘要
本 PR 主要围绕编译包名报错问题,对编译与冒烟流程的脚本及工作流进行调整:重构 .gitcode/scripts/compile.sh 中的任务分支匹配逻辑,使其按 task_name 与 TARGET_BRANCH 分场景执行;调整 .gitcode/scripts/pre_smoke.sh 的工作目录获取方式;优化 .gitcode/workflows/compile_action.yml 的包重命名逻辑;并改造 .gitcode/workflows/ops-nn_action.yml 中冒烟任务的执行方式、环境变量与运行环境配置。
主要改动
-
重构
compile.sh的编译任务分支处理:将原先按task_name|TARGET_BRANCH组合匹配master的多个case块,改为在单一case "${task_name}"内对Compile_Ascend_X86_mobile_station、Compile_Ascend_X86_mobile_station_ubuntu24、Compile_Ascend_X86_mobile_station_9030_ubuntu24分别判断TARGET_BRANCH,非master时不再编译,而是创建build_out并生成占位.run文件后退出。 -
简化
pre_smoke.sh的工作目录初始化:删除cd /home/taskspace与WORKSPACE=/home/taskspace两行,工作目录改为由冒烟执行环境通过WORKSPACE变量外部注入。 -
调整
compile_action.yml的包重命名逻辑:rename_package步骤先创建build_out目录,再按inputs.task_name是否为compile_single分支处理,compile_single场景下将../single.tar.gz改名为目标包名,其余场景继续对*.run文件进行改名。 -
改造
ops-nn_action.yml的冒烟任务执行方式:环境变量org_name、repo_name与obs_path改为从变量和事件动态获取;冒烟阶段移除manifest-management-plugin的部署/清理及打包上传smoke_data.tar.gz流程,改为直接run执行pre_smoke.sh,并新增上传slog.tar.gz到obs_smoke_path/plog/。 -
更新冒烟任务运行条件与运行环境:冒烟阶段的执行条件由
env.TARGET_BRANCH == 'master'改为${{ default() }},运行节点由['self-hosted','arch=arm','smoke=204']改为['self-hosted','npu=1','smoke=204'],并显式指定冒烟容器镜像swr.cn-south-1.myhuaweicloud.com/pre_smoke/...。


代码审查
审查总结
共发现 5 个问题,按优先级分布:
- P2:3 个
.gitcode/workflows/ops-nn_action.yml:377— object-prefix 使用字面量${obs_smoke_path}而非模板表达式。.gitcode/workflows/ops-nn_action.yml:368— smoke executor 缺少cd,pre_smoke.sh 相对路径命令与 slog 上传路径可能出错。.gitcode/workflows/compile_action.yml:71—== compile_single精确匹配漏掉compile_single_ubuntu24,该包不产出。
- P3:2 个
4..gitcode/scripts/compile.sh:160— 9030 分支 echo/touch 仍为 kirinx90。
5..gitcode/scripts/compile.sh:137— 非 master 分支exit 0跳过 api-check 输出(低置信度,可能为有意行为)。
各变更文件审查确认:
.gitcode/scripts/compile.sh— 已审查,发现 2 个问题(P3×2)。.gitcode/scripts/pre_smoke.sh— 已审查,删除cd /home/taskspace/WORKSPACE本身无独立问题,但需与 smoke executor 的 cd 配合(已在 ops-nn_action.yml 中合并报告)。.gitcode/workflows/compile_action.yml— 已审查,发现 1 个问题(P2)。.gitcode/workflows/ops-nn_action.yml— 已审查,发现 2 个问题(P2×2)。
整体风险判断:本次改动主要集中在编译包名重命名与冒烟流程重构。存在 3 个 P2 级别问题——其中 object-prefix 字面量属于确定性错误,重命名漏掉 compile_single_ubuntu24 会直接导致该任务不产出包,smoke executor 缺少 cd 则依赖运行环境 cwd 约定、存在冒烟测试失败风险。建议在合入前修复 object-prefix 与 rename 条件两个确定性问题,并补充 smoke executor 的 cd。
| 类型 | 数量 |
|---|---|
| 🔴 阻塞 | 0 |
| 🟡 建议 | 1 |
💬 仅评论


compile


Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
For more, you also can visit HICANN
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| .gitcode/** | ✅ 宋常霞, tanghaoran7 (2/2) | ✅ 宋常霞 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
yajie_caroline, thanks for your pull request. All authors of the commits have signed the CLA. 👍


流水线任务触发成功
任务链接 [aae6a357ac8a49a995c9627e254aec94][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Pre | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_950_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_950_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910b | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_classify | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_mobile_station_9030_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| UT_Test_ophost | ✅ SUCCESS | ||
| UT_Test_opapi | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| UT_Test_opgraph | ✅ SUCCESS | ||
| PreSmoke_A900 | ✅ SUCCESS | >>>>> | |
| API_Check | ✅ SUCCESS | >>>>> | |
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> | |
| UT_Test_report_lcov | ⚠️ WARNING | >>>>> |
[2026-08-14 11:11:42] CI执行结束


流水线任务触发成功
任务链接 [ee032712b5a847e69e0ea0d42a2f0165][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_checkpr | ✅ SUCCESS | ||
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_precommit | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> |
[2026-08-14 10:56:16] CI执行结束


🟡 Medium Priority
变更行 377 object-prefix: ${obs_smoke_path}/plog/。在 action 的 with: 输入中,变量插值必须使用 ${{ }} 模板表达式;${...} 是 shell 语法,在 YAML with 块中不会被求值,会作为字面字符串传给 obs-upload。对比同文件第 376 行 artifact-path: "${{ steps.process_checkout.outputs.path }}/slog.tar.gz" 以及被删除的旧代码 object-prefix: ${{ env.obs_smoke_path }}/,此处明显写错。失败模式:obs-upload 收到的 object-prefix 是字面量 ${obs_smoke_path}/plog/,slog 会被上传到错误/无效的前缀,下游无法在预期路径(${obs_path}/presmoke/2/plog/)找到 plog 日志。
建议:将 object-prefix 改为使用模板表达式 ${{ env.obs_smoke_path }}/plog/。
| 377
| - object-prefix: ${obs_smoke_path}/plog/ |
|
377 | + object-prefix: ${{ env.obs_smoke_path }}/plog/ |


/lgtm
/approve


compile


流水线任务触发成功
任务链接 [a26e68e78fcb4ae2a4784d91cf3c5851][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Pre | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_950_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_950_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910b | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_classify | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_mobile_station_9030_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| UT_Test_ophost | ✅ SUCCESS | ||
| UT_Test_opapi | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| UT_Test_opgraph | ✅ SUCCESS | ||
| PreSmoke_A900 | ✅ SUCCESS | >>>>> | |
| API_Check | ✅ SUCCESS | >>>>> | |
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> | |
| UT_Test_report_lcov | ⚠️ WARNING | >>>>> |
[2026-08-14 16:00:54] CI执行结束


流水线任务触发成功
任务链接 [4124657ac1434a5cb5db120fa5d87d5e][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_checkpr | ✅ SUCCESS | ||
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_precommit | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> |
[2026-08-14 15:47:42] CI执行结束


/lgtm
/approve


/lgtm


Pull Request 已合并或已关闭。
If you want to solve this problem, you can click here to do it in the FAQs.


修改编译包名报错并更新冒烟脚本