Fast smoke builds

We have a mid-sized CMake project (~300 sub-targets, ~2 mil lines of 1st party code, ~7 mil 3rd) targetting 7 platforms, and I want to setup up runner tasks that will perform simple, fast smoke build checks.

Using the cache seems to actively defeat this purpose, and the recommended solution seems to be to have dedicated runners that use a dedicated build directory somewhere else on the filesystem.

That gets complex for us because we break the golden rule and have some codegen take place that occurs in-tree (unfortunately, platform support requires it).

Goals:

  • Only run cmake configure/generate when the build folder is missing or cmake config files changed (changes: **/*.cmake **/CMake*.txt),
  • use the same build directory,
  • [ideally] regardless of branch,

What’s the best practice for this?