ci: 加速发版构建并迁移到 Node 24 Actions - #108
Merged
Merged
Conversation
- postinstall 只为 Electron 重编 better-sqlite3、node-pty;classic-level 是 N-API 预编译,@electron/rebuild 因文件名不匹配每次从源码编译(Intel mac 4 分多钟) - tag 构建缓存按 ref 隔离永不复用,改为只读 main 的 pnpm-store,不再每版写入 ~2.5GB - Node 按 .nvmrc(22),Actions 升到 node24 版本,显式 --publish onTag,yq 用镜像自带
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
v0.1.34 构建 17 分钟,关键路径 mac x64 15 分钟:
electron-builder install-app-deps每次从源码重编classic-level(Intel mac 4m16s)。它是 N-API 预编译,但文件名classic-level.node不符合 @electron/rebuild 的node.napi.node匹配规则Cache not found/reused 0,却还写入约 2.5GB,挤占 10GB 配额,并在每个 job 收尾多花 13–71s改动
electron-rebuild --only better-sqlite3,node-pty(@electron/rebuild 4.2.0,与 electron-builder 内置版本一致)actions/cache/restore),Linux job 共用 main 上的pnpm-store-*;去掉 mac/Windows 永远命中不了的缓存.nvmrc,package-manager-cache: false;Actions 升到 node24 版本;--publish onTag;yq 用镜像自带验证