-
-
Notifications
You must be signed in to change notification settings - Fork 23.1k
[CI] Upload build cache before running tests #94314
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
Conversation
uses: actions/cache/save@v4 | ||
with: | ||
path: ${{inputs.scons-cache}} | ||
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} |
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.
Skipped the restore-keys
here as we're not restoring from any possible keys just exactly this one
c22e8c5
to
89c57cd
Compare
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.
Great catch! Rebasing in larger PRs will always be tedious to a certain extent, but this will absolutely make minor tweaks less of a headache
Can't be easily cherry picked for 4.2 so will make a dedicated commit for that if this is merged, and one for 3.x, if desired |
This improves turnaround time on large PRs where compilation is successful but unit testing or similar fails, forcing recompilation of unchanged code
89c57cd
to
32f8292
Compare
Moved the upload immediately after the compile step as it only involves the SCons cache |
Thanks! |
Thank you! |
This improves turnaround time on large PRs where compilation is successful but unit testing or similar fails, forcing recompilation of unchanged code
Unsure what exactly should be part of the upload but placed the save step after the artifact prepare step and before the upload step to hopefully upload as identically as possible, assuming the artifact preparation might make for a better artifact with striping down, unsure what exactly is uploaded (it seems only the
.scons-cache
is uploaded, so might be able to move it earlier as the cache isn't touched by other steps)This was a source of friction for me making some PRs where the compilation worked fine, but the changes were relatively substantial and unit tests kept failing on Linux builds due to sanitizer errors, being unable to run those locally I ended up having to run a few CI builds to try and fix it and since they had to be recompiled from scratch (or rather from
master
) it took longer than it could have, hence this PR