friendlyanon/setup-vcpkg

Add option to save cache even if build failed

Closed this issue · 2 comments

It still makes sense to save the cache if the build fails. Even if vcpkg itself fails, some dependencies might have been built successfully already, which can save significant time on the next try.

I would also very much like to see this feature, but I am not sure if it is possible to implement it purely in this action. There was an attempt to add a save-always option to the cache action, but that did not (reliably) work (see this issue) and the option will be deprecated and removed. Instead, as documented here, the way to go is to use cache/restore and cache/save separately, which allows to always run the save step. I have never tried this but to me, it seems that setup-vcpkg can therefore only do the restore part. The save step must be run by the user at an appropriate time later.

Implemented as part of 2d431e8