Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: rework GitHub caching strategy #3886

Merged
merged 2 commits into from
Feb 23, 2024
Merged

Conversation

davidhewitt
Copy link
Member

I realised today that we are facing many cache misses in CI because we skip running workflows on main, and GitHub Actions caches only populate from the default branch or the current branch.

So the vast majority of jobs will be cache misses until their branch is populated, because the default branch (main) runs nothing.

This PR therefore reworks things in an attempt to put some oomph back into our build times:

  • I've set jobs to run on main just as they would in the merge queue
  • I've removed the hardcoded keys to Swatinem/rust-cache, which shouldn't be necessary based on what it uses by default (job ID + OS + rust version)
  • I've added two things to reduce cache thrashing:

If this looks like it builds, I'll probably merge it right away without review and hope it speeds up CI times. If it creates problems we can easily revert.

@davidhewitt davidhewitt added the CI-skip-changelog Skip checking changelog entry label Feb 22, 2024
@davidhewitt davidhewitt added this pull request to the merge queue Feb 23, 2024
Merged via the queue into PyO3:main with commit 5ca8102 Feb 23, 2024
40 checks passed
@davidhewitt davidhewitt deleted the ci-cache-misses branch February 23, 2024 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-skip-changelog Skip checking changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants