Skip to content

[ci] Various performance improvements#2822

Closed
joshlf wants to merge 6 commits intomainfrom
optimize-ci-branch
Closed

[ci] Various performance improvements#2822
joshlf wants to merge 6 commits intomainfrom
optimize-ci-branch

Conversation

@joshlf
Copy link
Member

@joshlf joshlf commented Nov 25, 2025

One optimization per commit, in total bringing the time to execute GH Actions for a PR (not counting time in the merge queue) to 2m 44s.

@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 (ce54168).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2822   +/-   ##
=======================================
  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 force-pushed the optimize-ci-branch branch 5 times, most recently from 1f08e57 to 54cb042 Compare November 25, 2025 05:10
@joshlf joshlf changed the title [ci] Cache MSRV's cargo index to improve performance [ci] Various performance improvements Nov 25, 2025
@joshlf joshlf marked this pull request as ready for review November 25, 2025 05:14
@joshlf joshlf enabled auto-merge November 25, 2025 05:14
@joshlf joshlf requested a review from jswrenn November 25, 2025 05:14
@joshlf joshlf force-pushed the optimize-ci-branch branch from 54cb042 to 69eb992 Compare November 25, 2025 14:35
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.
@joshlf joshlf force-pushed the optimize-ci-branch branch 4 times, most recently from 2261772 to 933be75 Compare November 25, 2025 15:46
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
@joshlf joshlf force-pushed the optimize-ci-branch branch 2 times, most recently from 9a1c042 to e5b7b43 Compare November 25, 2025 17:03
@joshlf joshlf force-pushed the optimize-ci-branch branch from e5b7b43 to ce54168 Compare November 25, 2025 17:27
@joshlf joshlf closed this Nov 25, 2025
auto-merge was automatically disabled November 25, 2025 18:06

Pull request was closed

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.

2 participants