已合并
support local compilation CI build. #537
liu-wei创建于 3月17日
support local compilation CI build. #537
已合并
liu-wei创建于 3月17日
liu-wei
liu-wei成员
3月17日

描述

支持本地执行CI命令

关联的Issue

https://gitcode.com/cann/ops-cv/issues/206

测试

本地修改算子文件后可以按照命令成功构建不报错。

常规测试:

kirinx90             : FAILED (build error)
ascend950            : OK (112 .o)
ascend910            : SKIPPED (.o)
ascend310b           : OK (3 .o)
ascend310p           : OK (19 .o)
ascend910b           : OK (72 .o)
STATIC_BUILD         : OK (cann-910b-ops-cv_9.0.0_linux-x86_64.run, cann-910b-ops-cv-static_9.0.0_linux-x86_64.tar.gz)
mc62cm12a            : OK (cann-mc62cm12a-ops-cv_9.0.0_linux-x86_64.run)
ascend910b_install_check : OK (install/uninstall clean)

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 liu-wei 的贡献)
liu-weiliu-wei成员
3月17日 创建了 pull request,commit 3e82b1ab
liu-weiliu-wei成员
3月17日 关联了issue:[Requirement|需求建议]:
liu-wei
liu-wei成员
3月17日 评论:

compile

likedislike
CANN-robot
CANN-robot成员
3月17日 评论:

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
repo-cann/ops-cv zhou-qilong, llimwang (2/2) zhou-qilong, llimwang (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
3月17日 添加了label:cann-cla/yes
CANN-robotCANN-robot成员
3月17日 将zhou-qilong,rxtfeng,loov1,llimwang,gubaocheng设为评审人
CANN-robotCANN-robot成员
3月17日 将zhou-qilong,rxtfeng,loov1,llimwang,gubaocheng设为审查人
CANN-robotCANN-robot成员
3月17日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
3月17日 评论:

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

任务名称状态日志下载链接
解析CI分支 ✅ SUCCESS
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
anti_virus ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5 ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Pre_Compile ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_experimental_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_A5_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_ARM_experimental_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_ARM_A5_ubuntu24 ✅ SUCCESS >>>>>
UT_Test ✅ SUCCESS
Smoke_A900_npupool ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>

[2026-03-17 17:02:22]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
3月17日 评论:

问题/功能描述

新增一个本地构建脚本,旨在解决开发者在提交代码前需手动执行一系列构建和测试步骤的问题。通过自动化流程,该脚本能够提高开发效率和代码质量,主要功能是执行基于代码变更的增量构建和测试。

修改方案描述

新增一个Bash脚本 local_build.sh,提供灵活的构建选项,支持增量与全量构建。核心功能包括:通过分析Git提交历史或指定文件列表自动识别变更文件;根据选项执行JIT构建、单元测试构建、冒烟测试流程及实验性功能检查;根据系统架构自动调整编译参数;并在执行过程中进行错误检查,确保构建的可靠性。

likedislike
CANN-robotCANN-robot成员
3月17日 添加了label:api-check-pass
CANN-robotCANN-robot成员
3月17日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
3月17日 添加了label:ci-pipeline-passed
liu-wei
liu-wei成员
3月17日 评论:

代码审查 - PR #537

变更概述

本PR新增本地CI构建脚本,支持在本地执行CI命令进行构建验证,与Issue #206关联。

变更内容

  • 新增文件: scripts/ci/local_build.sh (283行)

脚本功能

  1. 参数选项:

    • -u - 构建单元测试
    • -s - 构建冒烟测试流程(单算子构建、Ascend950构建、A2冒烟测试)
    • -f <file> - 指定构建文件列表
    • --jit - 启用OPHost构建
    • -h, --help - 显示帮助信息
  2. 默认行为:

    • 无参数时默认启用:OPHost + 单元测试 + 冒烟测试
  3. 环境配置:

    • 自动设置 WORKSPACEASCEND_3RD_LIB_PATH

审查结果

  • ✅ 脚本结构清晰,参数解析完整
  • ✅ 支持多种构建场景
  • ✅ 与Issue #206关联正确
  • ✅ CI已通过(ci-pipeline-passed、api-check-pass)

结论

已批准 - 本地CI构建脚本功能完整,有助于开发者在本地验证代码修改。


由 OpenCode code-checker 技能生成

likedislike
llimwang成员
3月17日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
3月17日 添加了label:approved
liu-weiliu-wei成员
3月17日 修改了pull request 的描述
liu-weiliu-wei成员
3月17日 修改了pull request 的描述
sunday成员
3月17日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
3月17日 添加了label:lgtm
CANN-robot
CANN-robot成员
3月17日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: llimwang, zhou-qilong.
Reviewers who wrote a comment of /lgtm are: llimwang, zhou-qilong.

likedislike
CANN-robotCANN-robot成员
3月17日 关闭了关联的issue
CANN-robotCANN-robot成员
3月17日 合入了pull request