Pull Request已成功合入, 合并人@CANN-robot
(感谢 yajie_caroline 的贡献)变更摘要
本 PR 主要为 atvc(action)仓库适配 GitCode 的 CI action 流水线上线,新增了整套流水线编排、编译/单测执行脚本与可复用子工作流。核心包括:新增主流水线 PR-pipeline_atvc.yml,按 PreBuild → compile → ut → post 多阶段编排编译(x86/arm/ubuntu24)、CodeCheck、静态检查与单测任务;新增编译脚本 compile.sh 与单测脚本 ut.sh,分别通过 build.sh --pkg 和 build.sh --utest 触发构建并校验退出码;同时新增可复用的 compile_action.yml、ut_action.yml、staticcheck_action.yml 子工作流,统一完成代码检出、从 OBS 下载产物、执行任务及结果上传。
主要改动
- 新增主流水线编排:新增
PR-pipeline_atvc.yml,通过workflow_dispatch、pull_request_comment、pr_comment等事件触发,定义PreBuild(镜像修订revise-image)、compile(Compile_Ascend_X86/Compile_Ascend_ARM/Compile_Ascend_X86_ubuntu24/CodeCheck/staticcheck_md_check)、ut(UT_atvc)及post阶段,并支持并发上限 5 与 MR 预占机制。 - 新增编译工作流及脚本:新增
compile_action.yml子工作流(workflow_call可复用),按task_name/image_version/arch/package_name参数完成 checkout、OBS 下载、构建加速执行compile.sh、build_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等文件后调用staticcheckaction 执行静态检查,并将*.csv与StaticCheck_*.json结果上传 OBS。 - 统一环境与产物处理:各脚本通过
CHECK_ENV_VAR校验WORKSPACE、GIT_TARGET_BRANCH、repo_name等必需环境变量,缺少时报错退出;编译/单测/静态检查产物统一按obs_path(org/repo/ci/package/{MERGE_ID})前缀上传至华为云 OBS(ascend-cibucket)。


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
/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. 👍


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


描述
关联的Issue
测试
文档更新
类型标签