已合并
action上线适配 #39
yajie_caroline创建于 13 天前
action上线适配 #39
已合并
yajie_caroline创建于 13 天前
13 天前

描述

关联的Issue

测试

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 yajie_caroline 的贡献)
Yyajie_caroline
13 天前 创建了 pull request,commit e56c461e
atomgit-bot
atomgit-bot
13 天前 评论:

变更摘要

本 PR 主要为 atvc(action)仓库适配 GitCode 的 CI action 流水线上线,新增了整套流水线编排、编译/单测执行脚本与可复用子工作流。核心包括:新增主流水线 PR-pipeline_atvc.yml,按 PreBuildcompileutpost 多阶段编排编译(x86/arm/ubuntu24)、CodeCheck、静态检查与单测任务;新增编译脚本 compile.sh 与单测脚本 ut.sh,分别通过 build.sh --pkgbuild.sh --utest 触发构建并校验退出码;同时新增可复用的 compile_action.ymlut_action.ymlstaticcheck_action.yml 子工作流,统一完成代码检出、从 OBS 下载产物、执行任务及结果上传。

主要改动

  • 新增主流水线编排:新增 PR-pipeline_atvc.yml,通过 workflow_dispatchpull_request_commentpr_comment 等事件触发,定义 PreBuild(镜像修订 revise-image)、compileCompile_Ascend_X86/Compile_Ascend_ARM/Compile_Ascend_X86_ubuntu24/CodeCheck/staticcheck_md_check)、utUT_atvc)及 post 阶段,并支持并发上限 5 与 MR 预占机制。
  • 新增编译工作流及脚本:新增 compile_action.yml 子工作流(workflow_call 可复用),按 task_name/image_version/arch/package_name 参数完成 checkout、OBS 下载、构建加速执行 compile.shbuild_out 产物重命名为 cann-atvc_linux-x86_64.run 等包名并上传 OBS;compile.sh 依据 task_name 是否为 *_ubuntu24 选择 gcc-14 或 devtoolset-7 环境,并调用 bash build.sh --pkg --cann_3rd_lib_path,通过 DP_ASSERT_CHECK_SKIP 校验构建退出码(0 或 200)。
  • 新增单测工作流及脚本:新增 ut_action.yml 子工作流,checkout 后执行 bash ut.sh 并上传 *.txt/*.log 日志到 OBS;ut.sh 通过 ASCEND_HOME_PATH 判定并 source setenv.bash 加载 Ascend 环境,调用 sh build.sh --utest --cann_3rd_lib_path 运行 UT 用例,同样以 DP_ASSERT_CHECK_SKIP 校验结果。
  • 新增静态检查工作流:新增 staticcheck_action.yml 子工作流,支持 check_type(如 md_check)与镜像参数,下载 gitdiff.txt 等文件后调用 staticcheck action 执行静态检查,并将 *.csvStaticCheck_*.json 结果上传 OBS。
  • 统一环境与产物处理:各脚本通过 CHECK_ENV_VAR 校验 WORKSPACEGIT_TARGET_BRANCHrepo_name 等必需环境变量,缺少时报错退出;编译/单测/静态检查产物统一按 obs_pathorg/repo/ci/package/{MERGE_ID})前缀上传至华为云 OBS(ascend-ci bucket)。
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.
You can self-configure the PR merge rules for this repository. For more details, please refer to 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/** Larry_liuyi, tanghaoran7 (2/2) Larry_liuyi (1/1)

💡 Tip:

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

likedislike
此处折叠了85条消息 查看更多
CANN-robot
CANN-robot成员
3 小时前 评论:

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

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
codecheck_codestyle ✅ SUCCESS >>>>>
precommit ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
UT_Test ✅ SUCCESS

[2026-09-08 16:30:29]    CI执行结束

likedislike
LLarry成员
3 小时前 解决了最后一个问题
CANN-robotCANN-robot成员
2 小时前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
2 小时前 添加了label:ci-pipeline-passed
CANN-robotCANN-robot成员
2 小时前 合入了pull request