Pull Request已成功合入, 合并人@CANN-robot
(感谢 Larry 的贡献)变更摘要
本 PR 主要优化 Actions 流水线配置(.gitcode/workflows/PR-pipeline_pyasc.yml、codecheck_action.yml、staticcheck_action.yml):引入 online 环境变量(取自 vars.APPLY_LABEL)以按需控制在线检查类步骤的执行,新增 JOB_pre 预处理任务,将多个静态检查任务合并为单个 md_check 任务,并为代码扫描脚本新增 --online 参数及 block、org_name 等配置项。
主要改动
- 新增
JOB_pre预处理任务与online环境变量: 在PR-pipeline_pyasc.yml的env中新增online: ${{ vars.APPLY_LABEL }},并新增JOB_pre(Test_pre_pipeline)任务,调用cann/.gitcode/actions/pre-pipeline@master(传入 owner、repo、pr_number、token、apply_label),随后执行associate-pr-comment(仅当env.online == 'true'时运行)。 - 合并静态检查任务: 将原
JOB_staticcheck_markdown、JOB_staticcheck_codespell_check、JOB_staticcheck_tag_closed_check、JOB_staticcheck_resource_existence_check、JOB_staticcheck_link_validity_check五个任务合并为单个JOB_staticcheck_md_check任务,check_type统一为md_check。 - 代码扫描任务按
online条件执行并新增--online参数:codecheck_action.yml中codescan_gitcode.py、anti_virus_gitcode.py、codecheck_gitcode.py三个脚本的命令均追加--online ${{ vars.APPLY_LABEL }}参数,其执行条件由default()改为env.online == 'true'。 - 新增配置项与上传兜底:
codecheck_action.yml为 precommit 步骤新增block: ${{ vars.PRECOMMIT_BLOCK }}输入,staticcheck_action.yml为静态检查步骤新增org_name: ${{ env.org_name }}输入;两处obs-upload步骤均增加if: ${{ always() }}以保证上传始终执行。 - 资源与产物调整:
staticcheck_action.yml的runs-on由[dedicate-hosted, x64, small]调整为[dedicate-hosted, x64, medium];PR-pipeline_pyasc.yml与staticcheck_action.yml的产物上传/下载列表中新增gitdiff.txt文件。


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
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
Larry_liuyi, thanks for your pull request. All authors of the commits have signed the CLA. 👍


流水线任务触发成功
任务链接 [5e01f92e95764f939346a25294926f9c][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ❌ FAILED | None | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_Pr | ✅ SUCCESS | ||
| pre_comment | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_codestyle | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ✅ SUCCESS | >>>>> |


流水线任务触发成功
任务链接 [4906fab0082c4c4ab44dc84d1fc047f0][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| UT_Test | ✅ SUCCESS | >>>>> | |
| UT_Test_Python | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> |
[2026-07-31 17:11:15] CI执行结束


流水线任务触发成功
任务链接 [bb0ece1ef7a341f2886acce1008012fd][流水线指导]


流水线任务触发成功
任务链接 [eb4d30d226ba4f35959b63a9012215f3][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_Pr | ✅ SUCCESS | ||
| pre_comment | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_codestyle | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ✅ SUCCESS | >>>>> |
[2026-07-31 17:22:41] CI执行结束


流水线任务触发成功
任务链接 [26c2294281984220b60dc2ce6db62624][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| PreSmoke_A900 | ✅ SUCCESS | >>>>> |
[2026-07-31 17:34:57] CI执行结束


流水线任务触发成功
任务链接 [f8c99ea73c7a4fa997499e0314581d0f][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| UT_Test | ✅ SUCCESS | >>>>> | |
| UT_Test_Python | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> |
[2026-07-31 17:22:15] CI执行结束


/lgtm
/approve


/lgtm


描述
优化actions流水线配置
关联的Issue
测试
文档更新
类型标签