已合并
[CICD]Add a GitCode Actions workflow for PR #492
dilililiwhy创建于 8月5日
[CICD]Add a GitCode Actions workflow for PR #492
已合并
dilililiwhy创建于 8月5日
dilililiwhy
dilililiwhy成员
8月5日

Which issue(s) this PR fixes or accomplishes

如问题已解决,按照下方示例附上ISSUE单号 / Apply bug or request issue as follow if the solved
Fixes #ISSUE ID
Fixes关键字会自动关闭issue,如问题部分解决请不要使用Fixes,可以用下方标签替代
Fixes will automatically close issue, please use the following tag if only part of the issue is solved

Fix part of #ISSUE ID

Purpose

Add a GitCode Actions workflow for PR

Test Plan

设计了哪些测试内容,指导他人如何对你的PR进行测试
Apply information to show others your test design and how to test your Pull Request

Test Report

image.png

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 dilililiwhy 的贡献)
dilililiwhydilililiwhy成员
8月5日 创建了 pull request,commit 60dd838d
dilililiwhydilililiwhy成员
8月5日 关联了issue:[Feature]: Adapt for GitHub Actions
atomgit-bot
atomgit-bot
8月5日 评论:

变更摘要

此 PR 为项目新增了一套 GitCode Actions 的 CI/CD 工作流配置,用于在 PR 触发时自动执行代码检查和构建验证。主流水线 PR-pipeline_MindIE-SD.yml 响应 PR 的打开、重新打开、更新事件以及特定评论(^compile$),分为代码检查(CodeCheck)和构建(Build)两个阶段,并通过文件变更检测来跳过纯文档类 PR 的构建。构建阶段复用了两个独立的可复用工作流 build_job.ymlut_job.yml,分别负责多架构多 ABI 的 wheel 包编译和单元测试执行。

主要改动

  • 新增主流水线 PR-pipeline_MindIE-SD.yml:定义了完整的 PR CI 流程,包含 CodeCheck(pre-commit 检查与 gitleaks 敏感信息扫描)和 Build(条件构建)两个阶段,触发条件为 dev/master 分支的 PR 事件及特定评论。
  • 新增文件变更检测逻辑:在 Detect_file_changes job 中使用 paths-changes-filter 过滤 .md.rst.log 等文档/资源文件,仅当有非文档文件变更时才设置 need_build=yes,后续 Build 阶段各 job 通过 if 条件依赖该输出决定是否执行。
  • 新增可复用构建工作流 build_job.yml:通过 workflow_call 接收 abi_typearchCP_DOCKER_IMG 等参数,在指定容器中校验 Python 3.11 版本、配置 ABI 与 GCC 环境后执行 python setup.py bdist_wheel 生成 wheel 包。
  • 新增可复用单元测试工作流 ut_job.yml:通过 workflow_call 接收 CP_DOCKER_IMG 等参数,在容器中执行 build.sh 构建后,仅在 aarch64 架构下运行 run_UT_test.sh 并检查输出中是否包含 OK 来判定测试成败。
  • 支持多架构多 ABI 构建:Build 阶段并行触发 Build_linux_x86_abi1Build_linux_arm_abi1Build_linux_arm_abi0 三个构建 job 以及一个 UT_linux_x86 单元测试 job,覆盖 x86_64 和 aarch64 架构及 ABI 0/1 两种模式。
likedislike
不准确?
atomgit-bot
atomgit-bot
8月5日 评论:

代码审查


审查总结

优先级 数量 说明
P0 0
P1 2 工作流文件扩展名不匹配(将导致 x86 构建直接失败);LD_LIBRARY_PATH 错误指向 .so 文件
P2 4 pr_id 输入在 build_job / ut_job 中被忽略(2 处);$(arch) 命令替换应为变量;sed -i '$d' 缺少注释
P3 1 arch 输入声明为 required 但从未使用

各文件审查结果:

  • .gitcode/workflows/PR-pipeline_MindIE-SD.yml:发现 1 个 P1 问题(.yaml.yml 扩展名不匹配),其余部分无明显问题。
  • .gitcode/workflows/build_job.yml:发现 1 个 P2 问题(pr_id 输入未使用)、1 个 P3 问题(arch 输入未使用)。
  • .gitcode/workflows/ut_job.yml:发现 1 个 P1 问题(LD_LIBRARY_PATH 指向 .so 文件)、2 个 P2 问题(pr_id 未使用、$(arch) 笔误)、1 个 P2 问题(sed -i '$d' 无注释)。

整体风险评估:中等。 最严重的问题是 .yaml 扩展名不匹配,将导致 Build_linux_x86_abi1 任务在运行时直接失败。LD_LIBRARY_PATH 指向 .so 文件是一个隐蔽的环境配置错误,可能导致 UT 任务中动态库加载异常。pr_id 输入被忽略在当前场景下可能不触发(若事件上下文正确透传),但在手动覆盖 PR ID 的场景下会出错。建议优先修复两个 P1 问题后再合并。

类型 数量
🔴 阻塞 2
🟡 建议 3

⛔ 需要修改

likedislike
不准确?
ascend-robotascend-robot成员
8月5日 添加了label:ascend-cla/yes
此处折叠了236条消息 查看更多
lijinxilijinxi成员
8月6日 修改标题为 “[CICD]Add a GitCode Actions workflow for PR”,原标题为“Add a GitCode Actions workflow for PR”
lanwangli成员
8月6日 评论:

/merge

likedislike
ascend-robotascend-robot成员
8月6日 添加了label:keeper_approved
ascend-robotascend-robot成员
8月6日 合入了pull request
ascend-robot
ascend-robot成员
8月6日 评论:

Pull Request 已合并或已关闭。

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike