fix: only write vcpkg cache on dependency and toolset changes#16
Merged
fix: only write vcpkg cache on dependency and toolset changes#16
Conversation
Co-authored-by: johnpatek <31934875+johnpatek@users.noreply.github.com> Agent-Logs-Url: https://github.com/maxtek6/WebFrame/sessions/119ad140-61dd-47ae-b1a1-bf9d9daaf024
Copilot
AI
changed the title
[WIP] Update CI/CD pipeline to manage cache usage efficiently
fix: only write vcpkg cache on dependency changes
Mar 24, 2026
johnpatek
requested changes
Mar 24, 2026
Co-authored-by: johnpatek <31934875+johnpatek@users.noreply.github.com> Agent-Logs-Url: https://github.com/maxtek6/WebFrame/sessions/fb217989-1474-4e1b-9ac5-e89043f9f671
Copilot stopped work on behalf of
johnpatek due to an error
March 24, 2026 20:12
Copilot
AI
changed the title
fix: only write vcpkg cache on dependency changes
fix: only write vcpkg cache on dependency and toolset changes
Mar 24, 2026
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 pipeline was keyed on
github.run_id, guaranteeing a cache miss every restore and an unconditional new entry every save — even when vcpkg binaries were identical.Changes
Compute vcpkg cache hashstep usesjqto extract onlyfeaturesanddependenciesfromvcpkg.json(excluding the appversionfield) and combines that withvcpkg-configuration.jsonbefore hashing. This prevents a version-only bump invcpkg.jsonfrom needlessly invalidating the cache.VCPKG_REFis defined as a workflow-level env var and embedded in every cache key. Bumping the vcpkg toolset ref now correctly busts the cache, and the same value drives both theCheckout vcpkgstep and the cache key, keeping them in sync.cache-hit != 'true'on its paired restore step, skipping the write entirely on an exact hit.The same pattern is applied to the matrix
buildjob (restore-build-cache/actions/cache/restore@v5).Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.