From 795e3187391bdf689a9f2e79e87dc7d0242e3efb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Fri, 11 Nov 2022 14:19:35 +0000 Subject: [PATCH] Gitlab CI: Add build with -Werror enabled Currently we don't have any build with -Werror because of widespread use of ENABLE_EXTRA_COMPILER_WARNINGS CMake option, that automatically disables -Werror. That's bad because it allows code with warnings to pass the CI jobs and be checked in, which is something we want to avoid. Configure the GCC build to not use ENABLE_EXTRA_COMPILER_WARNINGS. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e87d65c7cf..94f31c990f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -496,7 +496,7 @@ Commit Check: - bash ./tools/pre-commit "HEAD~$NUM_COMMITS" - tools/validate-commit.py -GCC Warnings: +GCC Release Build: extends: .build-ubuntu rules: !reference [.if-merge-request] needs: [ 'Commit Check' ] @@ -504,7 +504,7 @@ GCC Warnings: # build-ubuntu puts us in `build`. - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)" # Test release build. - - CC=gcc CXX=g++ cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_EXTRA_COMPILER_WARNINGS=on -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DENABLE_CCACHE=ON -G Ninja .. + - CC=gcc CXX=g++ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DENABLE_CCACHE=ON -G Ninja .. - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)" - script --command ninja --flush --quiet --return ../gcc_report.txt - ansi2html < ../gcc_report.txt > ../gcc_report.html