Conversation
依赖 wasm-pack 构建的 ferrous-opencc-wasm 已经跳过构建了(上传了预构建的 wasm),因此直接在 onlyBuiltDependencies 去掉了 wasm-pack
版本太低(使用了 Node.js 20)会给警告
There was a problem hiding this comment.
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 版本 |
| "ignoredBuiltDependencies": [ | ||
| "register-scheme" | ||
| "register-scheme", | ||
| "wasm-pack" | ||
| ] |
There was a problem hiding this comment.
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。
There was a problem hiding this comment.
依赖 wasm-pack 构建的 ferrous-opencc-wasm 已经跳过构建了(上传了预构建的 wasm)
| runner: windows-11-arm | ||
| target: windows-arm64 | ||
| - name: macOS x64 | ||
| runner: macos-15-intel |
There was a problem hiding this comment.
这里使用了 runs-on: windows-11-arm 和 runs-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 等)。
| 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 |
There was a problem hiding this comment.
我确认 windows-11-arm 和 macos-15-intel 存在
来源:
windows-11-arm存在于 actions/partner-runner-imagesmacos-15-intel存在于 actions/runner-images
| runner: ubuntu-latest | ||
| target: linux-x64 | ||
| - name: Linux arm64 | ||
| runner: ubuntu-24.04-arm |
There was a problem hiding this comment.
runs-on: ubuntu-24.04-arm 这个 runner label 需要确认在 GitHub Actions(或你们的 runner 池)中确实存在;否则 Linux arm64 的矩阵任务将无法被调度执行。若目标是 GitHub-hosted ARM runner,建议核对官方 label 命名(常见的是 ubuntu-24.04-arm64 或类似命名)。
| runner: ubuntu-24.04-arm | |
| runner: ubuntu-24.04-arm64 |
There was a problem hiding this comment.
ubuntu-24.04-arm 存在于 actions/partner-runner-images
|
如果想省一些actions配额可以交叉编译 |
测试 Build Dev