How to change toolchain without breaking developer workflows?

Ordinarily, you’d try to set up CI such that every build is a fresh build. Things like sccache or ccache are usually very effective at reducing the build times for that. But it is also not that unusual to see CI use incremental builds too. Some projects have characteristics that mean making every build a fresh build isn’t feasible. In that case, you could look at having the CI script delete the CMakeCache.txt file at the start. That would make it a fresh build from CMake’s perspective, but the build step may still re-use some of the existing build results. YMMV for this, as removing the CMakeCache.txt file may trigger many of the build outputs needing to be rebuilt. It depends on your project. Still, using sccache or ccache as well may still be enough to get this second strategy to work (I’ve seen exactly this in some companies and it was reasonably effective).

1 Like