Closed DanRStevens closed 1 year ago
After updating to cache the project local vcpkg_installed
folder, I noticed the following in the build output:
All requested packages are currently installed. Restored 0 package(s) from C:\Users\runneradmin\AppData\Local\vcpkg\archives in 16.7 ms. Use --debug to see more details.
The path in the message is consistent with the documentation for Binary Caching with the default files provider:
%LOCALAPPDATA%\vcpkg\archives
Documentation:
It seems the
vcpkg
cache is no longer being saved, and so there is no cache to restore. Seems like perhaps the folder where packages are cached has moved.From the step "Post Restore vcpkg dependency cache":
Currently we are attempting to cache:
Checking env vars on CI with:
Only one env var appeared to be related to
vcpkg
:Some relevant documentation: https://learn.microsoft.com/en-ca/vcpkg/users/buildsystems/msbuild-integration#vcpkginstalleddir-installed-directory Classic mode:
$(VcpkgRoot)\installed\
Manifest mode:$(VcpkgManifestRoot)\vcpkg_installed\$(VcpkgTriplet)\
Mind you, I've noticed if the
vcpkg_installed
folder is deleted, packaged are restored very quickly (less than 1s), so I believe it still uses a user wide cache to restore from. Not sure if it would be better to cache the user wide packages or the project specific packages.Found some documentation that may be helpful:
Seems the Binary Caching allows caching per dependency. That way if there is a build failure, you don't have to rebuild the entire cache of all dependencies. You would only need to rebuild dependencies that failed or were changed.