-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix: unity cloud build cache improvements #1640
Merged
Merged
Conversation
This file contains 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
aixaCode
added
do not merge
force-build
Used to trigger a build on draft PR
and removed
force-build
Used to trigger a build on draft PR
labels
Aug 2, 2024
github-actions
bot
requested review from
Ludmilafantaniella,
mikhail-dcl and
pravusjif
August 2, 2024 16:49
Windows and Mac build successfull in Unity Cloud! You can find a link to the downloadable artifact below.
|
aixaCode
added
the
no QA needed
Used to tag pull requests that does not require QA validation
label
Aug 21, 2024
aixaCode
changed the title
fix: don't delete build target on healthy build
fix: unity cloud build cache improvements
Aug 21, 2024
dalkia
requested changes
Aug 22, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice caching time 💪!
Left a comment, because Im not sure if we can avoid caching with this change
dalkia
approved these changes
Aug 23, 2024
dalkia
approved these changes
Aug 23, 2024
fcolarich
approved these changes
Aug 23, 2024
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.
What does this PR change?
We are currently experiencing longer build times with Unity Cloud due to issues with caching and the way we've set up our caching mechanism.
With this update, when creating a new branch, the build process will no longer attempt to use a template cache, which has caused random errors. Instead, it will create a new cache. Although the first build will be slower, this approach will prevent the random errors and failures that arise from cache inconsistencies.
For future improvements, to reduce the build time on the first run, we could consider using @T_MacOS and @T_WindowsOS as template caches. However, to maintain these caches up-to-date, we would need to build these template targets regularly. Implementing a cron job or scheduled builds could help automate this process.
When a build is successful on a new target, it will generate its own cache. For all subsequent builds on this target, the existing cache will be reused, significantly speeding up the build process. We will retain the targets and their caches as long as the PR remains open, ensuring proper cache reuse. This approach also enables us to leverage workspace caching effectively.
Based on my tests, this change has reduced average build times from 1 hour 15 minutes to 35 minutes.
This PR also introduces the ability to customize the caching strategy directly from GitHub, offering greater flexibility in managing builds.
Targets will be deleted, and their caches cleared, only when the PR is merged or closed.