lukka / run-cmake

GitHub Action to build C++ applications with CMake (CMakePresets.json), Ninja and vcpkg on GitHub.
MIT License
176 stars 19 forks source link

Add support for build cache #13

Closed magnesj closed 4 years ago

magnesj commented 4 years ago

Hi,

I am looking into how to use a build cache to reduce build times. Is this something you might consider to include in your GitHub Action?

One alternative that looks promising https://github.com/mbitsnbites/buildcache

Regards Magne

lukka commented 4 years ago

I took a brief look to the buildcache tool, look interesting. Regarding run-cmake, I think you can use it in one of these ways:

  1. instruct CMake to run buildcache in place of the compiler;
  2. create a toolchain for using buildcache in CMake;
  3. use the cmakeWrapperCommand input, it allows you to run CMake onto the environment set up by a wrapper for buildcache.

Is there anything in particular feature that you have in mind that may be good to have?

magnesj commented 4 years ago

Thanks for you comments.

I think it could be useful to have the buildcache as an optional part of run-cmake, and I think your option number 1 is the best and maybe easiest to implement and use.

lukka commented 4 years ago

@magnesj if feel like the usage of option number 1 is indeed the most widely used and accepted solution. Avoiding adding another input argument to 'run-cmake' action is also always the best option :)