From 8f766f39df3e312f79f461b2accc2f9c90fa6338 Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 3 Jul 2025 11:46:19 +0100 Subject: [PATCH] ci: enable -Werror=dev Turn developer & deprecation warnings into errors. --- .github/ci-test-each-commit-exec.py | 1 + .github/workflows/ci.yml | 2 +- ci/test/03_test_script.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/ci-test-each-commit-exec.py b/.github/ci-test-each-commit-exec.py index 14b84cf1f22..966841d6501 100755 --- a/.github/ci-test-each-commit-exec.py +++ b/.github/ci-test-each-commit-exec.py @@ -27,6 +27,7 @@ def main(): "cmake", "-B", "build", + "-Werror=dev", "-DCMAKE_C_COMPILER=clang", "-DCMAKE_CXX_COMPILER=clang++", "-DWERROR=ON", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 168c5793409..5e2ed480989 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -223,7 +223,7 @@ jobs: - name: Generate build system run: | - cmake -B build --preset vs2022 -DCMAKE_TOOLCHAIN_FILE="${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ${{ matrix.generate-options }} + cmake -B build -Werror=dev --preset vs2022 -DCMAKE_TOOLCHAIN_FILE="${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ${{ matrix.generate-options }} - name: Save vcpkg binary cache uses: actions/cache/save@v4 diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh index 1884b9525dd..e2e7f2f56c9 100755 --- a/ci/test/03_test_script.sh +++ b/ci/test/03_test_script.sh @@ -118,7 +118,7 @@ BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build-$HOST} mkdir -p "${BASE_BUILD_DIR}" cd "${BASE_BUILD_DIR}" -BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR" +BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR -Werror=dev" if [[ "${RUN_TIDY}" == "true" ]]; then BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"