已开启
action上线适配 #39
yajie_caroline创建于 6 天前
action上线适配 #39
已开启
yajie_caroline创建于 6 天前
6 天前

描述

关联的Issue

测试

文档更新

类型标签

likedislike
合并受阻
Yyajie_caroline
6 天前 创建了 pull request,commit e56c461e
atomgit-bot
atomgit-bot
6 天前 评论:

变更摘要

本 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
6 天前 评论:

代码审查

✅ 未发现问题

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

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

⚠️ This PR does not yet meet the following requirements:lgtm (requires ≥ 2 person(s) per module)、approve (requires ≥ 1 person(s) per module)

Module Approval Details

module lgtm status approve status
.gitcode/** ❌ (0/2)(You can also ask: fujun19, wulinyu, 黄金华, Larry_liuyi, 宋常霞) ❌ (0/1)(You can also ask: 李超然, shentukangjun, Larry_liuyi, tanghaoran7, 宋常霞)

💡 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
CANN-robotCANN-robot成员
6 天前 将mywaaagh_admin,songchangxia,tanghaoran7,shentukangjun,wulinyu,xun_zhuge,ascendhjh,wangxiaozhi,fujun19,Larry_liuyi设为评审人
CANN-robotCANN-robot成员
6 天前 将mywaaagh_admin,songchangxia,tanghaoran7,shentukangjun,Larry_liuyi设为审查人
yajie_caroline
6 天前 评论:

compile

likedislike
CANN-robotCANN-robot成员
6 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
6 天前 评论:

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

任务名称状态日志下载链接
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-08-26 11:49:20]    CI执行结束

likedislike
CANN-robotCANN-robot成员
6 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
6 天前 添加了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
6 天前 评论:
流水线 PR-pipeline_cann_atvc#80 [ commitID:76dfa9cb ] 已完成
likedislike
LLarry成员
4 天前 通过审查
LLarry成员
4 天前 通过审查
LLarry成员
4 天前 通过审查
LLarry成员
4 天前 通过审查
Larry成员
4 天前 评论:

[规范14] concurrency.max 取值范围 — P1
文件: .gitcode/workflows/PR-pipeline_atvc.yml 第4行
问题: concurrency.max=5,期望 15-25(含边界)
建议: 修改 max 为 15-25 之间的整数

likedislike
Larry成员
4 天前 评论:

[规范3] Stage name 命名 — P1
文件: .gitcode/workflows/PR-pipeline_atvc.yml 第60行
问题: stage name='compile',期望 'Compile'(首字母大写)
建议: 修改 stage2 name 为 Compile

likedislike
Larry成员
4 天前 评论:

[规范13] job select/needs 冗余 — P1
文件: .gitcode/workflows/PR-pipeline_atvc.yml 第80行
问题: Job 'JOB_x86_compile_ubuntu24' 不应包含 needs 配置
建议: 移除 needs: []

likedislike
Larry成员
4 天前 评论:

[规范3] Stage name 命名 — P1
文件: .gitcode/workflows/PR-pipeline_atvc.yml 第103行
问题: stage name='ut',UT 必须大写为 'UT'
建议: 修改 stage3 name 为 UT

likedislike
Larry成员
4 天前 评论:

[规范15] 重点问题检查 — P0
文件: .gitcode/workflows/PR-pipeline_atvc.yml 第15行
问题: pull_request_comment branches=['*'],期望 ['**']
建议: 修改 branches 为 ['**']

likedislike
Yyajie_caroline
3 天前 update merge request[project id: 8257680, iid: 39, commit_id: 7b4cb83326d93621842828b9f49dde0532ae5858] virtual merging success
Yyajie_caroline
3 天前 审查状态已重置,审查人: Larry_liuyi
Yyajie_caroline
3 天前 推送  1 个提交:38822c67-修改检视意见
Yyajie_caroline
3 天前 update merge request[project id: 8257680, iid: 39, commit_id: 44b13f5298a03ca995d266f49c00697a9e3a263c] virtual merging success
CANN-robotCANN-robot成员
3 天前 删除了label:cann-cla/yes
yajie_caroline
3 天前 评论:

compile

likedislike
CANN-robotCANN-robot成员
3 天前 添加了label:stat/needs-squash
CANN-robotCANN-robot成员
3 天前 添加了label:cann-cla/yes
CANN-robotCANN-robot成员
3 天前 删除了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
3 天前 评论:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): ci-pipeline-passed.

likedislike
CANN-robotCANN-robot成员
3 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
3 天前 评论:

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

任务名称状态日志下载链接
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-08-29 11:04:55]    CI执行结束

likedislike
CANN-robotCANN-robot成员
3 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
3 天前 添加了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
3 天前 评论:
流水线 PR-pipeline_cann_atvc#84 [ commitID:38822c67 ] 已完成
likedislike