Skip to content

[ci] Various performance improvements#2829

Merged
joshlf merged 4 commits intomainfrom
optimize-ci
Nov 25, 2025
Merged

[ci] Various performance improvements#2829
joshlf merged 4 commits intomainfrom
optimize-ci

Conversation

@joshlf
Copy link
Member

@joshlf joshlf commented Nov 25, 2025

Supersedes #2822, factoring out most of its optimizations while avoiding the ones that turned out to be overly complex without much performance benefit.

Brings the execution time to 3m20s when there's a cache hit.

This seems to speed things up significantly, resulting e.g. in [1]
taking 3m34s (with a cache hit, skipping the "Generate cache" step).

[1] https://github.com/google/zerocopy/actions/runs/19657114158
When generating the cache, if there's a cache hit, don't download the
cache. Previously, we would download the cache and *then* check for a
cache hit.
Modify the `cargo-zerocopy` tool:
- To set `CARGO_TARGET_DIR` to a toolchain-specific directory inside of
  `target/` so that different toolchains won't clobber each others'
  artifacts
- To auto-install toolchains and toolchain components via `rustup`
  without prompting for user input when running from a GitHub Actions
  environment

This allows us to remove an explicit install step during CI.
@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.14%. Comparing base (0b7b338) to head (4de71cc).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2829   +/-   ##
=======================================
  Coverage   88.14%   88.14%           
=======================================
  Files          20       20           
  Lines        5450     5450           
=======================================
  Hits         4804     4804           
  Misses        646      646           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joshlf joshlf requested a review from jswrenn November 25, 2025 18:21
@joshlf joshlf marked this pull request as ready for review November 25, 2025 18:21
@joshlf joshlf enabled auto-merge November 25, 2025 18:21
@joshlf joshlf force-pushed the optimize-ci branch 2 times, most recently from 4c40d6b to ffb9dc8 Compare November 25, 2025 18:38
@joshlf joshlf added this pull request to the merge queue Nov 25, 2025
Merged via the queue into main with commit d4750c9 Nov 25, 2025
303 checks passed
@joshlf joshlf deleted the optimize-ci branch November 25, 2025 20:25
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.

3 participants