From 3061f6cf5b7b5f281307f00ceb60ab343c01c1cd Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Fri, 2 Sep 2022 13:09:43 +0800 Subject: [PATCH] GHA CI: treat compile warnings as errors PR #17651. --- .github/workflows/ci_macos.yaml | 2 ++ .github/workflows/ci_ubuntu.yaml | 2 ++ .github/workflows/ci_windows.yaml | 1 + 3 files changed, 5 insertions(+) diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml index f6592fcdb..6d86278c2 100644 --- a/.github/workflows/ci_macos.yaml +++ b/.github/workflows/ci_macos.yaml @@ -82,6 +82,7 @@ jobs: -B build \ -G "Ninja" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_CXX_FLAGS="-Werror -Wno-error=deprecated-declarations" \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DBOOST_ROOT="${{ env.boost_path }}" \ -DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \ @@ -99,6 +100,7 @@ jobs: -B build \ -G "Ninja" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_CXX_FLAGS="-Werror -Wno-error=deprecated-declarations" \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DBOOST_ROOT="${{ env.boost_path }}" \ -DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \ diff --git a/.github/workflows/ci_ubuntu.yaml b/.github/workflows/ci_ubuntu.yaml index eb9ecfeed..5e060bb4d 100644 --- a/.github/workflows/ci_ubuntu.yaml +++ b/.github/workflows/ci_ubuntu.yaml @@ -68,6 +68,7 @@ jobs: -B build \ -G "Ninja" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_CXX_FLAGS="-Werror -Wno-error=deprecated-declarations" \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DTESTING=ON \ @@ -85,6 +86,7 @@ jobs: -B build \ -G "Ninja" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_CXX_FLAGS="-Werror" \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DQT6=ON \ diff --git a/.github/workflows/ci_windows.yaml b/.github/workflows/ci_windows.yaml index ef4819b58..e31255a0e 100644 --- a/.github/workflows/ci_windows.yaml +++ b/.github/workflows/ci_windows.yaml @@ -108,6 +108,7 @@ jobs: -B build ` -G "Ninja" ` -DCMAKE_BUILD_TYPE=RelWithDebInfo ` + -DCMAKE_CXX_FLAGS="/WX" ` -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ` -DCMAKE_TOOLCHAIN_FILE="${{ env.RUNVCPKG_VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" ` -DBOOST_ROOT="${{ env.boost_path }}" `