合并受阻
变更摘要
本 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
⚠️ 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
/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. 👍


compile


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




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


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


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


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


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


compile


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




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