Skip to content

refactor(ci): 修复 arm64 架构构建并更新构建配置#1033

Open
MoYingJi wants to merge 4 commits intoimsyy:devfrom
MoYingJi:pr/fix-native-ci
Open

refactor(ci): 修复 arm64 架构构建并更新构建配置#1033
MoYingJi wants to merge 4 commits intoimsyy:devfrom
MoYingJi:pr/fix-native-ci

Conversation

@MoYingJi
Copy link
Copy Markdown
Collaborator

@MoYingJi MoYingJi commented Apr 9, 2026

  • 拆分 arm64 到单独的机器构建,fix Linux arm64 版里塞了 x86_64 的 native 库 #1032
  • 同步了 dev/nightly/release 三个 CI 的步骤顺序,看起来更统一了
  • 升级部分 GitHub Actions 的版本,版本太低(使用了 Node.js 20)会给警告

测试 Build Dev

MoYingJi added 4 commits April 9, 2026 14:45
依赖 wasm-pack 构建的 ferrous-opencc-wasm 已经跳过构建了(上传了预构建的 wasm),因此直接在 onlyBuiltDependencies 去掉了 wasm-pack
版本太低(使用了 Node.js 20)会给警告
Copilot AI review requested due to automatic review settings April 9, 2026 08:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

该 PR 主要聚焦于 CI 构建矩阵重构:将各平台的 x64/arm64 拆分到独立 runner 上构建,并统一 dev/nightly/release 的步骤顺序,同时调整 pnpm 的构建依赖配置以改善安装/构建行为。

Changes:

  • 将 Windows/macOS/Linux 的 x64 与 arm64 构建拆分为独立矩阵项,并按 matrix.target 分发到对应构建命令参数。
  • 更新多个 GitHub Actions 依赖版本,并对 nightly/release 的产物上传/下载逻辑做了对应调整。
  • 调整 pnpm.onlyBuiltDependencies / pnpm.ignoredBuiltDependencies,将 wasm-pack 移至忽略构建列表。

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
package.json 调整 pnpm 构建脚本白名单/黑名单(涉及 wasm-pack)
.github/workflows/dev.yml dev 构建矩阵拆分到 x64/arm64 并升级 actions 版本
.github/workflows/nightly.yml nightly 构建矩阵拆分并统一步骤顺序、升级 actions 版本
.github/workflows/release.yml release 构建矩阵拆分并统一构建/上传/下载产物流程、升级 actions 版本
.github/workflows/docker.yml 升级 checkout action 版本

Comment on lines 149 to 152
"ignoredBuiltDependencies": [
"register-scheme"
"register-scheme",
"wasm-pack"
]
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm.ignoredBuiltDependencies 里加入 wasm-pack 会导致 pnpm 跳过 wasm-pack 的安装/构建脚本;而 native/ferrous-opencc-wasm 的构建脚本直接依赖 wasm-pack CLI(见 native/ferrous-opencc-wasm/package.json)。这会让本地/CI 想单独构建该包时出现 wasm-pack: command not found 或缺少二进制的问题。建议仅在确实不需要 wasm-pack 的环境里跳过(例如通过 CI 变量控制是否构建该 workspace 包),或不要把 wasm-pack 放进 ignoredBuiltDependencies

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

依赖 wasm-pack 构建的 ferrous-opencc-wasm 已经跳过构建了(上传了预构建的 wasm)

Comment on lines +43 to +46
runner: windows-11-arm
target: windows-arm64
- name: macOS x64
runner: macos-15-intel
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里使用了 runs-on: windows-11-armruns-on: macos-15-intel 这两个 runner label;如果仓库没有启用对应的 GitHub-hosted runner(或这些 label 并不存在),工作流会直接卡在 Waiting for a runner to pick up this job。建议在合并前确认这些 label 的可用性,或改用 GitHub 官方提供的稳定 label(例如 macOS Intel 通常用 macos-13/macos-14 等)。

Suggested change
runner: windows-11-arm
target: windows-arm64
- name: macOS x64
runner: macos-15-intel
runner: windows-latest
target: windows-arm64
- name: macOS x64
runner: macos-13

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我确认 windows-11-armmacos-15-intel 存在

来源:

runner: ubuntu-latest
target: linux-x64
- name: Linux arm64
runner: ubuntu-24.04-arm
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runs-on: ubuntu-24.04-arm 这个 runner label 需要确认在 GitHub Actions(或你们的 runner 池)中确实存在;否则 Linux arm64 的矩阵任务将无法被调度执行。若目标是 GitHub-hosted ARM runner,建议核对官方 label 命名(常见的是 ubuntu-24.04-arm64 或类似命名)。

Suggested change
runner: ubuntu-24.04-arm
runner: ubuntu-24.04-arm64

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ubuntu-24.04-arm 存在于 actions/partner-runner-images

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the package.json file by moving wasm-pack from the list of built dependencies to ignoredBuiltDependencies. I have no feedback to provide as no review comments were submitted for evaluation.

@chiyuki0325
Copy link
Copy Markdown

如果想省一些actions配额可以交叉编译

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux arm64 版里塞了 x86_64 的 native 库

3 participants