Skip to content

ci: 缓存原生插件构建;push 只跑 main,PR 新推送取消旧运行 - #241

Merged
sweetcornna merged 5 commits into
mainfrom
ci/native-cache-concurrency
Oct 18, 2026
Merged

sweetcornna merged 5 commits into
mainfrom
ci/native-cache-concurrency

Conversation

@sweetcornna

Copy link
Copy Markdown
Owner

CI 提速第一批(分析见 ~/atlas-evidence/m1-work/2026-10-18/tidy/,取自最近 167 次运行的逐步耗时)。只改 .github/workflows/atlas.yml(阡陌自有路径)和 CONTRIBUTING 一句,不动基座文件、不动门禁内容。

改动

  1. 缓存 omp 原生插件构建(c2babf268)。原生插件从零编译均值 12.2 分钟(9–14),是 ci 作业最大的一块。缓存键 = runner OS/架构/镜像(ImageOS)+ 构建输入的哈希(crates/**、Cargo 三件、.cargo/**、bun.lock、packages/natives 的 package.json/scripts/版本哨兵、scripts/{bazel-natives,host-detect,stamp-native-version}.ts、build-native-portable.sh)。这些输入除构建脚本外都是基座文件,只在上游同步时变。命中时跳过 rustup 与编译;无论命中与否都打印产物 sha256。sync-omp、fleet-payload 不走缓存,每次重编,兜住键漏列输入。
  2. push 只跑 main,PR 按编号分组、新推送取消旧运行(bffe7fe92)。13 天里 81 个 PR 运行有 39 个带同一提交的 push 孪生运行;新分支首推还会以 manual-or-new-branch 触发 omp 全量套件(21–26 分钟)。非 PR 事件每次运行自成一组,main 上的提交不会被顶掉。

预期

验证

  • actionlint 通过。
  • 本 PR 的 CI:第一次运行未命中、正常编译并在成功后存缓存;之后再推一次应命中(Build the omp native addon 跳过),两次打印的 sha256 应一致。

从零编译约 9–14 分钟,是 ci 作业最大的一块。输入除构建脚本外都是基座
文件,只在上游同步时变;键里带 runner 镜像。命中时跳过 rustup 与编译,
打印产物 sha256 便于对照。sync-omp 与 fleet-payload 仍每次重编。
feat/* 推送与它的 PR 各跑一整轮(13 天 81 个 PR 运行里 39 个有孪生运行),
新分支首推还会触发 omp 全量套件。改为 push 只跑 main,PR 按编号分组、
新推送取消旧运行,main 上不取消。
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T04:45:47.700797Z 2778a98 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bffe7fe92d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/atlas.yml Resolved
Comment thread .github/workflows/atlas.yml Resolved
构建同时重写 native/index.d.ts 与 index.js 的生成段,只缓存 .node 会让
命中时用到检出里的旧绑定;Bun 版本与 build:native 脚本也决定产物。
根 package.json 只取 build:native 一条进键,避免阡陌脚本改动让缓存失效。
CONTRIBUTING.md 在基座快照路径里,改它会让 PR 追加 omp 全量套件。
@sweetcornna
sweetcornna merged commit ae3b205 into main Oct 18, 2026
2 checks passed
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.

1 participant