已合并
Optimize Actions pipeline configuration,优化actions流水线配置 #151
Larry创建于 13 天前
Optimize Actions pipeline configuration,优化actions流水线配置 #151
已合并
Larry创建于 13 天前
Larry成员
13 天前

描述

优化actions流水线配置

关联的Issue

测试

文档更新

类型标签

  • Bug修复
  • 新特性
  • 性能优化
  • 文档更新
  • 其他,请描述:优化actions流水线配置
likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 Larry 的贡献)
LLarry成员
13 天前 创建了 pull request,commit 2c9c8baa
atomgit-bot
atomgit-bot
13 天前 评论:

变更摘要

本 PR 主要优化 Actions 流水线配置(.gitcode/workflows/PR-pipeline_pyasc.ymlcodecheck_action.ymlstaticcheck_action.yml):引入 online 环境变量(取自 vars.APPLY_LABEL)以按需控制在线检查类步骤的执行,新增 JOB_pre 预处理任务,将多个静态检查任务合并为单个 md_check 任务,并为代码扫描脚本新增 --online 参数及 blockorg_name 等配置项。

主要改动

  • 新增 JOB_pre 预处理任务与 online 环境变量: 在 PR-pipeline_pyasc.ymlenv 中新增 online: ${{ vars.APPLY_LABEL }},并新增 JOB_preTest_pre_pipeline)任务,调用 cann/.gitcode/actions/pre-pipeline@master(传入 owner、repo、pr_number、token、apply_label),随后执行 associate-pr-comment(仅当 env.online == 'true' 时运行)。
  • 合并静态检查任务: 将原 JOB_staticcheck_markdownJOB_staticcheck_codespell_checkJOB_staticcheck_tag_closed_checkJOB_staticcheck_resource_existence_checkJOB_staticcheck_link_validity_check 五个任务合并为单个 JOB_staticcheck_md_check 任务,check_type 统一为 md_check
  • 代码扫描任务按 online 条件执行并新增 --online 参数: codecheck_action.ymlcodescan_gitcode.pyanti_virus_gitcode.pycodecheck_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.ymlruns-on[dedicate-hosted, x64, small] 调整为 [dedicate-hosted, x64, medium]PR-pipeline_pyasc.ymlstaticcheck_action.yml 的产物上传/下载列表中新增 gitdiff.txt 文件。
likedislike
atomgit-bot
atomgit-bot
13 天前 评论:

代码审查

✅ 未发现问题

likedislike
CANN-robotCANN-robot成员
13 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
13 天前 评论:

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 /approve or /lgtm
  • Commenting /approve implies 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. 👍

likedislike
CANN-robot
CANN-robot成员
13 天前 评论:

CLA Signature Pass

Larry_liuyi, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robot成员
13 天前 将mywaaagh_admin,songchangxia,tanghaoran7,li_zeran,suqwe,gehaoxuan,shentukangjun,qin437231,kong0808,dengjing_aoe,YeZZzzz1,bluesky901,wuzhenqing,xun_zhuge,ai_xin,ascendhjh,DragonBornHD84,hyyisasleep,sutonghua设为评审人
此处折叠了6条事件消息 查看更多
CANN-robotCANN-robot成员
13 天前 添加了label:cann-cla/yes
Larry成员
13 天前 评论:

compile

likedislike
LLarry成员
13 天前 update merge request[project id: 8546480, iid: 151, commit_id: e150bda15ef379ea31cb2736fb5b764f15beb7fe] virtual merging success
CANN-robotCANN-robot成员
13 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
13 天前 评论:

流水线任务触发成功
任务链接 [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 >>>>>
likedislike
CANN-robot
CANN-robot成员
13 天前 评论:

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

任务名称状态日志下载链接
UT_Test ✅ SUCCESS >>>>>
UT_Test_Python ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>

[2026-07-31 17:11:15]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
13 天前 评论:

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

likedislike
Larry成员
13 天前 评论:

compile

likedislike
CANN-robot
CANN-robot成员
13 天前 评论:

流水线任务触发成功
任务链接 [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执行结束

likedislike
CANN-robot
CANN-robot成员
13 天前 评论:

流水线任务触发成功
任务链接 [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执行结束

likedislike
CANN-robot
CANN-robot成员
13 天前 评论:

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

任务名称状态日志下载链接
UT_Test ✅ SUCCESS >>>>>
UT_Test_Python ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>

[2026-07-31 17:22:15]    CI执行结束

likedislike
CANN-robotCANN-robot成员
13 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
13 天前 添加了label:ci-pipeline-failed
CANN-robotCANN-robot成员
13 天前 删除了label:ci-pipeline-failed
CANN-robotCANN-robot成员
13 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
13 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
13 天前 添加了label:ci-pipeline-passed
songchangxia成员
13 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
13 天前 添加了label:approved
tanghaoran
tanghaoran成员
13 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
13 天前 添加了label:lgtm
CANN-robotCANN-robot成员
13 天前 合入了pull request