lukka / run-vcpkg

The GitHub Action to setup vcpkg for your C++ based projects. Stores built ports using Binary Caching backed onto GH Cache.
MIT License
196 stars 26 forks source link

Use same cache for all builds? #208

Closed dsvensson closed 1 year ago

dsvensson commented 1 year ago

Just started using this action, and it seems like branches don't use cache entries from master or other branches. Am I missing some setting or is this not supported? Rebuilds on the same branch correctly uses the cache.

lukka commented 1 year ago

@dsvensson thank you for the report! Since version v11 (i.e., run-vcpkg@v11) the cache management of the artifacts built with vcpkg is delegated to the vcpkg executable, which on the other hand is using the HTTP REST APIs to store and restore the cache using the GitHub Action Cache. The latter is responsible for the behavior you are experiencing: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache .

In this case I do not foresee any actionable item on the run-vcpkg side, but let me know if anything can be done to make this action better!

lukka commented 1 year ago

@dsvensson closing this issue, feel free to ping me if this needs to be reopened.