Skip to content
Discussion options

You must be logged in to vote

It looks like the cache is being restored correctly, but vcpkg is still rebuilding because the restored tree isn’t in a fully “ready-to-use” state for binary reuse.

A few things to check:

  1. vcpkg binary caching must be enabled

By default, vcpkg will rebuild if binary caching isn’t turned on explicitly:

vcpkg install --binarysource=clear --binarysource=files:$(VCPKG_ROOT)/archives

Or in vcpkg.json:

{
"binarySources": [
"files:./vcpkg/archives,readwrite"
]
}

If binary caching isn’t configured, vcpkg treats the restored directory as empty and rebuilds everything.

  1. The cache may not include the archives/ folder

vcpkg’s actual binary packages live in:

vcpkg/installed/
vcpkg/buildtrees/
vcpkg/…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@HappySeaFox
Comment options

@TanishqCh07
Comment options

Answer selected by HappySeaFox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Question Ask and answer questions about GitHub features and usage Actions Cache For topics related to the actions/cache action in GitHub workflows Workflow Configuration Topics about workflow files, YAML setup, job dependencies, and general workflow configuration issues
2 participants