Fix caching for unity builds - #5642
Merged
Merged
Conversation
joshua-spacetime
requested review from
bfops,
cloutiertyler and
jdetter
as code owners
July 31, 2026 21:35
jdetter
approved these changes
Jul 31, 2026
jdetter
left a comment
Contributor
There was a problem hiding this comment.
Seems fine, not tested manually by me
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
This is part of the work to break up #5612 into smaller reviewable chunks.
Before this change, the cache key for the unity library was
Unity-${{ github.head_ref }}. This meant every single PR experienced a cache miss, whether or not it changed any unity dependencies, and would subsequently do a full unity build and upload a new multi-GB entry to the actions cache. The actions cache isn't that big, so this was responsible for a huge amount of cache churn which in turn slowed all other builds down.Now the cache key incorporates the proper dependencies, and the cache is only written to on pushes to master.
API and ABI breaking changes
None
Expected complexity level and risk
1
Testing
N/A