From dd698a696340ab610e31c782ed0bf19e70fd7254 Mon Sep 17 00:00:00 2001 From: Jelte Fennema-Nio Date: Tue, 1 Oct 2024 12:02:50 +0200 Subject: [PATCH] Use -Werror in CI (#237) The PG15 support that was introduced in #180 introduced a bunch of warnings when compiling. To avoid getting numb to warnings, this adds the -Werror to our CI builds, so we catch warnings before merging to main. This also starts to ignore the register warning which was introduced by PG15 support. --- .github/workflows/build_and_test.yaml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 126184a6..62741787 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -113,7 +113,7 @@ jobs: id: build run: | pushd duckdb - make -j8 install + make -j8 install CFLAGS=-Werror CXXFLAGS=-Werror - name: Run make installcheck id: installcheck diff --git a/Makefile b/Makefile index dcef9c3b..56d4c167 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ DUCKDB_LIB = libduckdb$(DLSUFFIX) FULL_DUCKDB_LIB = third_party/duckdb/build/$(DUCKDB_BUILD_TYPE)/src/$(DUCKDB_LIB) override PG_CPPFLAGS += -Iinclude -Ithird_party/duckdb/src/include -Ithird_party/duckdb/third_party/re2 -override PG_CXXFLAGS += -std=c++17 -Wno-sign-compare ${DUCKDB_BUILD_CXX_FLAGS} +override PG_CXXFLAGS += -std=c++17 -Wno-sign-compare -Wno-register ${DUCKDB_BUILD_CXX_FLAGS} SHLIB_LINK += -Wl,-rpath,$(PG_LIB)/ -lpq -Lthird_party/duckdb/build/$(DUCKDB_BUILD_TYPE)/src -L$(PG_LIB) -lduckdb -lstdc++ -llz4