msys2 / setup-msys2

GitHub Action to setup MSYS2
https://github.com/marketplace/actions/setup-msys2
MIT License
282 stars 37 forks source link

Feature: option for disable caching #298

Closed carlopi closed 1 year ago

carlopi commented 1 year ago

Normally it's possible to control the behaviour of ccache, it's possible to provide a boolean to have the option of NOT saving msys2 artifacts?

Reason is that other artifacts might be more costly to rebuild. In my setup I basically disable cache on every non-master build, since artifacts from master are normally reused from PRs, while artifacts from PRs are good only for the exact same branch.

Thanks a lot! Carlo

lazka commented 1 year ago

Is this about ccache, or the setup-msys2 action? Can you describe the problem you are facing? And what you expect to happen

carlopi commented 1 year ago

Sorry for the confusion, the last step of the setup-msys2 action I believe does cache the artifacts that gets a name like: msys2-pkgs-upd:true-conf:0ea6810d-files:b4c3d2198d83a319bb77491ef6a2488223ba048a (see here for example: https://github.com/duckdb/duckdb/actions/caches?query=sort%3Asize-asc, there are a few).

Do you think this is created by setup-msys2? If so, could it be made configurable so those artifacts are not stored?

lazka commented 1 year ago

That's the cache for the installed packages, otherwise it would need to fetch them from MSYS2 mirrors the next time. Why is the cache a problem for you?

carlopi commented 1 year ago

I would prefer caching behaviour to be user configurable. Why? Cache is a scarce resource, it's capped at 10 GB.

On duckdb/duckdb we use this strategy: only workflows on master branch get to update the cache, and keep the limit below 10 GB. After the inclusion of msys2 in a workflow I am seeing that every PR takes 200MB dedicated to msys2, and on a big project this easily adds up (see above link, over 8 PR a total of 1.6 GB of 10 GB are dedicated to msys2), and I would prefer if there was a way to decide workflow by workflow (say passing a boolean) whether cache should be written to or not.

lazka commented 1 year ago

new release is out