lukka / run-cmake

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

Set RUNVCPKG_NO_CACHE on configure failure #96

Closed quyykk closed 1 year ago

quyykk commented 1 year ago

To prevent a partial cache store, the RUNVCPKG_NO_CACHE needs to be set if the run is cancelled or fails. The docs for run-vcpkg mention doing it as an additional step, however this means that any failure at any stage of the job results in no cache being saved, which is less than ideal.

run-cmake should set this environment variable automatically iff the configure preset fails.

lukka commented 1 year ago

@quyykk thanks for the suggestion, indeed setting that variable when cmake --preset configure fails makes perfectly sense.

quyykk commented 1 year ago

Superseded by v11, whee this environment variable isn't necessary anymore.