From b69b886c180417a48097806223ccce7cc0b6292e Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 21 Jul 2023 09:16:53 +0200 Subject: [PATCH 1/2] add check for build warnings also for clang builds --- .gitlab-ci.yml | 4 +++- ci/build_codec_sanitizers_linux.sh | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 760f908abd..342a6c4dc8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -281,11 +281,13 @@ build-codec-instrumented-linux: # make sure that the codec builds with msan, asan and usan build-codec-sanitizers-linux: extends: - - .build-job-linux + - .build-job-with-check-for-warnings - .rules-basis script: - *print-common-info - bash ci/build_codec_sanitizers_linux.sh + # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...< + - ci/check_for_warnings.py $BUILD_OUTPUT || exit $? build-codec-windows-cmake: extends: diff --git a/ci/build_codec_sanitizers_linux.sh b/ci/build_codec_sanitizers_linux.sh index d352fa32ec..9eadfb3899 100755 --- a/ci/build_codec_sanitizers_linux.sh +++ b/ci/build_codec_sanitizers_linux.sh @@ -40,4 +40,5 @@ make CLANG=1 -j make clean make CLANG=2 -j make clean -make CLANG=3 -j +# write out one build for warnings check +make CLANG=3 -j | tee build_output.txt -- GitLab From 344f8ecde5f427370834ac4f7cb679d4d2feeff2 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 21 Jul 2023 13:42:23 +0200 Subject: [PATCH 2/2] also redirect stderr to actually capture warnings --- ci/build_codec_sanitizers_linux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/build_codec_sanitizers_linux.sh b/ci/build_codec_sanitizers_linux.sh index 9eadfb3899..4e40f89b9a 100755 --- a/ci/build_codec_sanitizers_linux.sh +++ b/ci/build_codec_sanitizers_linux.sh @@ -41,4 +41,4 @@ make clean make CLANG=2 -j make clean # write out one build for warnings check -make CLANG=3 -j | tee build_output.txt +make CLANG=3 -j 2>&1 | tee build_output.txt -- GitLab