⚠️ 🚧 Under construction. Cache build not complete or reliable.
Cache all vcpkg assets (sources) in a single place to improve build reliability. Don't let some unreliable mirror service interrupt development or CI work.
Logo by DALL-E
This tool uses the Vcpkg asset cache feature (experimental) and attempts to download all assets for a given point in time of Vcpkg.
Fork the repo and run the tool yourself to populate a cache for your own projects.
If your project depends on multiple hosts for its source code assets then the probability that you can successfully download your assets is the product of the hosts' reliability (success probability decreases with each host you add). Caching all files in a single, more reliable host can increase your chances of a successful build.
Consider 3 hosts:
Host | Reliability | Expected Days Downtime per Year |
---|---|---|
A | 99% | 3.65 |
B | 98% | 7.3 |
C | 99.9% | 0.365 |
A project that depends on hosts A, B, and C can expect up to 11.2 days of downtime per year. If you could cache all assets on a host that had 99.99% uptime then the project can expect 0.0365 days of build downtime per year.
I'm currently experimenting with hosting caches in an Azure Storage account that is publicly accessible. If it becomes too popular I might need help with hosting.
Set the following variables in your development/CI environment to start using the read-only public cache immediately:
bash:
export X_VCPKG_ASSET_SOURCES="x-azurl,https://djurekvcpkgcachebuilder.blob.core.windows.net/vcpkg-assets,,read"
pwsh:
$env:X_VCPKG_ASSET_SOURCES="x-azurl,https://djurekvcpkgcachebuilder.blob.core.windows.net/vcpkg-assets,,read"
When you run vcpkg install
with this environment variable set, vcpkg will
attempt to download source assets from the blob storage account.
vcpkg-assets
Storage Blob Data Contributor
role to the AAD app in the storage accountbuild-cache
in the environment...AZURE_CLIENT_ID
, AZURE_TENANT_ID
, AZURE_SUBSCRIPTION_ID
STORAGE_ACCOUNT_NAME
with the value of the storage account created in previous steps (e.g. myvcpkgcache
, leave blob.core.windows.net
off) Populate
GitHub Actions Workflow (it'll take a long time)Check out issues, assign yourself and open a Pull Request. Issues are vague so comment if any questions come up.
This tool is provided as-is with no support. This is a personal project and not a Microsoft-supported tool. There is no warranty or SLA. Use at your own risk.
See LICENSE