aminya / setup-cpp

Install all the tools required for building and testing C++/C projects.
Apache License 2.0
186 stars 29 forks source link

Question: Can we cache the installation folders #212

Open pedroo-seaiaa opened 9 months ago

pedroo-seaiaa commented 9 months ago

Hello,

I have been using setup-cpp and I saw that it takes some time to run on GitHub-hosted environments (Windows and Ubuntu). So, I was wondering if it is possible to cache the installation of the tools I am using (e.g. cmake, ninja, vcpkg, etc..).

Technically, if all the jobs ran under the same OS environment, I don't see a reason why we cannot install the tools once and use them on a matrix configuration multiple times. Now, of course, being new to this, I may be unaware of its possibilities and how to do it. So, I would appreciate any information.

Kind regards,

PS: Sorry to open an issue for a question.

Upvote & Fund

Fund with Polar

aminya commented 7 months ago

Hi, @pedroo-seaiaa. The installation is cached on GitHub Actions, and on other platforms, the installations are skipped.

Inside GitHub Action, I have not noticed any speedup from caching as the installation is bound by the network and hardware disk, not CPU time.

We can provide prebuilt images via #184 which might speed up the process if you use Docker.