The Linux GCC platform in CI does not treat compiler warnings as errors.
see here for an example of this issue; Windows, Linux clang, and MacOS all threw an error on the same narrowing warning but Linux GCC did not.
CMake has a property to enable this feature:
set_property(TARGET my_target PROPERTY COMPILE_WARNING_AS_ERROR ON)