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.
This commit is contained in:
João Valverde 2022-11-11 14:19:35 +00:00
parent 1ed750dd94
commit 795e318739
1 changed files with 2 additions and 2 deletions

View File

@ -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