-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong cache directory #54
Comments
@Milerius the The binary caching is a preview feature this action is not currently supporting. Before supporting "modern/future" vcpkg, I'd need to understand in detail how this newly created features (e.g., binary caching and manifest) are working and how to support them. |
@strega-nil: good to know! I need time to write a design around it, i.e. how would the flowchart change. TL;DR: I think it would be helpful to have in Details: |
@ras0219 should be able to tell you more :) |
Please review the following and let me know if you are on the same page. TL;DR Details OTOH, if |
In the cache hit scenario, that's the correct TL;DR -- as long as every package is in the installed\ folder, we won't consult the archives. The only way a package would be missing from the installed folder is if the cache didn't hit, in which case the archives would also be missing. There is potentially some improvement available via fallback keys on the archives directory, however I think this is relatively low value. Instead, we recommend using GitHub Packages[1] to store the binaries via our NuGet backend. This will reuse packages as much as possible and complement the Cache Task to maximize performance and minimize rebuilds. [1] https://github.com/microsoft/vcpkg/blob/master/docs/users/binarycaching.md#github-packages |
based on the conclusions, no changes are needed to this action regarding the cached directories. |
Caching VCPKG_ROOT is hardly helpful, at least for manifest mode. All it helps with is avoiding needing to bootstrap the vcpkg executable. Caching VCPKG_ROOT/packages, VCPKG_ROOT/buildtrees, VCPKG_ROOT/downloads does not help; vcpkg still does a full rebuild every time (in manifest mode at least).
For these use cases caching is hardly relevant anyway. For complex applications with large dependencies like FFmpeg (30 minute build), wxWidgets (10 minute build), or Qt5 (>2 hour build!), the cost of computing the hash for vcpkg's package cache key is trivial compared to the build time. Running
takes 9 seconds, which is very fast from my perspective.
The benefits of fallback restore keys are huge if an application has even one dependency that takes a long time to build. I have fixed these issues in #94. |
@Be-ing Thanks for adding this comment! I'd like to put your comments on the right context first, as I think we are almost on the same page, only some clarifications are still needed.
Caching I'd be curious to see what is the Also, I really appreciated your contribution on #94, which is something I was preparing already but I did not publish yet. So you beat me to it! |
Without #94 every package is fully rebuilt for any cache miss. The action is hardly useful for my purposes like that. |
I just realized I got confused by the incorrect information in the README:
Manifest mode installs to |
Caching the |
according to:
run-vcpkg/src/vcpkg-action.ts
Line 102 in d950c94
it's save a wrong cache (from vcpkg docs):
https://vcpkg.readthedocs.io/en/latest/specifications/binarycaching/#solution-aspects
for example with your actions every run it's what happens:
^ we can see that
$HOME/.cache/vcpkg/archives
orC:\Users\runneradmin\AppData\Local\vcpkg\archives\
is missing in the caching pathwould be nice to have a v6 that cache the good directory
I never made typescript in my life but an equivalent in c++ would be :
The text was updated successfully, but these errors were encountered: