Skip to content

ci: cache native dependency builds in Verify jobs - #1177

Merged
kvlonge merged 3 commits into
mainfrom
ci/rust-build-cache
Oct 20, 2026
Merged

kvlonge merged 3 commits into
mainfrom
ci/rust-build-cache

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Why

Every Verify job built the native extension and its dependencies from scratch: 14–21 minutes per job on Linux and over 30 on Windows, which pushed jobs past their time limits. Verify never runs on main, so PR runs had no cache to reuse.

Changes

  • New rust-cache.yml runs on push to main, daily and on demand, and saves three dependency caches (Linux extension, static/native checks, Windows) only when main lacks the key.
  • The 14 native-building Verify jobs restore one of them and never save; workspace crates still build from source. The same-runner ratio job shares the restored dependencies with its base build.
  • The Linux x86_64 wheel build records cargo --timings and uploads the reports. Release wheels stay uncached.

Verification

  • Three Verify dispatches on a backup branch. Warm cache: Linux install median ~1,040 s -> ~560 s, native checks 324 s -> 169 s, Windows ~2,000 s -> 716–1,125 s.
  • The sqb binary was byte-identical across all 33 builds per run, cached or cold, so performance jobs measure the same code.
  • Cache sizes: 313, 505 and 375 MiB. actionlint clean.

Verify restores the dependency builds that a new Rust Build Cache workflow
saves on main, so pull requests stop rebuilding polyglot-sql and the other
dependencies from scratch. The linux-x86_64 wheel job records cargo build
timing reports.
@kvlonge
kvlonge enabled auto-merge (squash) October 20, 2026 10:46
@kvlonge
kvlonge merged commit d11f529 into main Oct 20, 2026
39 checks passed
@kvlonge
kvlonge deleted the ci/rust-build-cache branch October 20, 2026 12:05
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