Since https://github.com/actions/runner-images/pull/11706, https://github.com/actions/runner-images/pull/11707 and https://github.com/actions/runner-images/pull/11737, ninja is preinstalled in the Ubuntu, macOS and x86 Windows runner images. (See https://github.com/actions/runner-images/issues/11391 for the overall issue where this was finally agreed to be installed.) It is still missing in the windows-11-arm images though, so keep installing it in any jobs running on Windows.