feat: add setup-vcpkg composite action with binary caching#13
Merged
Conversation
Replaces lukka/run-vcpkg whose x-gha binary cache provider was removed from vcpkg in April 2025. This action: - Clones and bootstraps vcpkg at a pinned commit - Configures VCPKG_BINARY_SOURCES with filesystem cache - Persists binary cache via actions/cache@v4 - Supports Linux and Windows Includes self-test job that validates the action on both platforms with a yaml-cpp smoke install. Refs: microsoft/vcpkg#45073, lukka/run-vcpkg#251
x64-linux-static is a custom triplet defined in consuming repos' triplets/ directories. The .github repo doesn't have it. Use built-in x64-linux for the smoke test — the triplet input is only for cache key partitioning.
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.
Summary
Adds a shared composite action at
.github/actions/setup-vcpkg/action.ymlthat replaceslukka/run-vcpkgacross the org.Why
lukka/run-vcpkg@v11setsVCPKG_BINARY_SOURCES=clear;x-gha,readwrite, but vcpkg removed thex-ghaprovider in April 2025 (microsoft/vcpkg-tool#1662). Theclearalso disables the default filesystem cache. Result: every CI run compiles all vcpkg packages from source — gRPC alone takes 33–46 minutes.This affects all 5 C++ repos in the org (provider-sim: 2h50m, anolis: 2h, fluxgraph: 50m, bread/ezo: 22m).
What this action does
bootstrap-vcpkg.shon Linux,.baton Windows)VCPKG_ROOTandVCPKG_BINARY_SOURCES=clear;files,...,readwriteactions/cache@v4Usage (for consuming repos)
Testing
Self-test job added: installs
yaml-cppon both Linux and Windows, verifies binary package appears in cache directory.Rollout plan
anolis-provider-bread(simplest repo)References
x-ghabinary cache provider microsoft/vcpkg-tool#1662 — PR that removed x-gha