diff options
author | João Valverde <j@v6e.pt> | 2022-11-15 16:56:19 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2022-11-17 11:31:30 +0000 |
commit | 006f10f108ee8301a444b555b14787c2ec698e10 (patch) | |
tree | 1c08e08b415cc51d3fa4bb5cd5701c1f1abc19dc /.gitlab-ci.yml | |
parent | e1d492e2e0324b8c6cf6b784b5229cebb05c6415 (diff) |
Gitlab CI: Enable -Werror with Clang builds
Enable -Werror so Clang specific warnings will trigger a build
error and can't be checked-in.
This requires disabling "extra" warnings.
Add explicit ENABLE_WERROR=ON options instead of relying on defaults.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2b075690a6..a70c905882 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -509,7 +509,7 @@ GCC Release Build: # 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 -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 -DENABLE_WERROR=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 @@ -522,7 +522,7 @@ GCC Release Build: paths: - gcc_report.html -Code Checks + Clang Warnings: +Clang + Code Checks: extends: .build-ubuntu rules: !reference [.if-merge-request] variables: @@ -540,7 +540,7 @@ Code Checks + Clang Warnings: - cd build - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)" # We don't have an "All options" job, so build fuzzshark and tfshark here. - - cmake -DENABLE_EXTRA_COMPILER_WARNINGS=on -DENABLE_WERROR=off -DENABLE_CHECKHF_CONFLICT=on -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DBUILD_fuzzshark=ON -DBUILD_tfshark=On -DBUILD_logray=ON -DENABLE_CCACHE=ON -G Ninja .. + - cmake -DENABLE_CHECKHF_CONFLICT=on -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DBUILD_fuzzshark=ON -DBUILD_tfshark=On -DBUILD_logray=ON -DENABLE_CCACHE=ON -DENABLE_WERROR=ON -G Ninja .. - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)" - mkdir ../html - script --command ninja --flush --quiet --return ../tmp_clang_report.txt |