Repository navigation
Restore the vcpkg packages from an older entry, and cancel superseded PR runs - #54
Merged
Merged
Conversation
The vcpkg cache key includes the workflow file hash and had no fallback, so a pull request that edits the workflow rebuilt OpenSSL and Boost in each Windows job, which takes about 10 minutes. vcpkg checks each cached package against a hash of its port and toolchain, so restoring an older entry with the same vcpkg commit is safe. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
Without a concurrency group, every run continued after a new commit was pushed, and kept the runners busy. Runs on cpprest-lts each have their own group, so they are never cancelled or queued behind each other. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
32 of 34 tasks
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.
The Windows jobs key the vcpkg package cache on the runner label, the vcpkg commit, and the hash of the workflow file, with no fallback. Any pull request that edits the workflow therefore misses the cache, and each Windows job spends about 10 minutes building OpenSSL and Boost again. That happened on #52 and #53.
This PR adds
restore-keyswith the same runner label and vcpkg commit, so that a miss restores the newest older entry. vcpkg checks each cached package against a hash of its port and toolchain, so it reuses the packages whose hashes are unchanged and builds only the rest. The fallback doesn't cross vcpkg commits, so packages from an older vcpkg don't pile up in the entry. The websocketpp workflow already has a similar fallback.This PR edits the workflow itself, so its own Windows jobs should restore the entries saved on
cpprest-ltsinstead of rebuilding.The second commit adds a
concurrencygroup, so that a new commit on a pull request or another branch cancels the run for the previous commit. Each run oncpprest-ltshas its own group, so those runs are never cancelled or queued behind each other.Co-authored-by: Gareth's 🤖 buddy