Repository navigation
Conversation
The combined actions/cache step saved the vcpkg archives only when the whole job succeeded. A failed Windows build therefore discarded a freshly built OpenSSL, and the next push rebuilt it again (6-9 minutes per architecture). Restore and save in separate steps, saving straight after vcpkg install. Also restore in two steps: a pull-request run searches all of its own keys before any base-branch cache, so the broad fallback could restore a stale PR archive even when master had one matching the current runner image and vcpkg revision. Accept only matching archives first, from any scope, and fall back to older ones only if none exists.
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.
Problem
The Windows jobs cache vcpkg's OpenSSL archives with the combined
actions/cachestep, which saves only if the whole job succeeds. A failed build therefore discards a freshly built OpenSSL. In thepkcs11-uriruns on 6 Oct, for example, the first run failed and the next push spent another 7–9 minutes per architecture rebuilding OpenSSL.The restore fallback
<id>-vcpkg-has a second weakness. A pull-request run searches all of its own keys before any master cache, so a PR's older archive wins over a master archive that matches the current runner image and vcpkg revision. vcpkg then rejects every package and rebuilds.Fix
vcpkg install, in a separate step, so build failures no longer lose them.Validation
No cache existed in this repository, so both CI runs on this PR tested the build-and-save path:
vcpkg install.C:/vcpkgcheckout, so their ABIs differ between images: vcpkg rebuilt OpenSSL and saved a key for that image too.Later runs on either image should now get an exact hit.