summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2022-01-13 12:28:09 +0000
committerEvgeny Vereshchagin <evvers@ya.ru>2022-01-14 01:53:37 +0300
commit007721e939a3a549e8ff456fdfbc196e7e1f0086 (patch)
treef5673c47913363c63a21aa954a80bc8243dacdd5 /.github
parente6d692ddfd5a363957e38b22968958695a73b9eb (diff)
downloadsystemd-007721e939a3a549e8ff456fdfbc196e7e1f0086.tar.gz
ci: turn meson warnings into errors
Diffstat (limited to '.github')
-rwxr-xr-x.github/workflows/build_test.sh9
-rwxr-xr-x.github/workflows/unit_tests.sh4
2 files changed, 11 insertions, 2 deletions
diff --git a/.github/workflows/build_test.sh b/.github/workflows/build_test.sh
index 9dc53a8c9b..d7f3ce3130 100755
--- a/.github/workflows/build_test.sh
+++ b/.github/workflows/build_test.sh
@@ -117,12 +117,21 @@ ninja --version
for args in "${ARGS[@]}"; do
SECONDS=0
+ # meson fails with
+ # src/boot/efi/meson.build:52: WARNING: Not using lld as efi-ld, falling back to bfd
+ # src/boot/efi/meson.build:52:16: ERROR: Fatal warnings enabled, aborting
+ # when LINKER is set to lld so let's just not turn meson warnings into errors with lld
+ # to make sure that the build systemd can pick up the correct efi-ld linker automatically.
+ if [[ "$LINKER" != lld ]]; then
+ additional_meson_args="--fatal-meson-warnings"
+ fi
info "Checking build with $args"
# shellcheck disable=SC2086
if ! AR="$AR" \
CC="$CC" CC_LD="$LINKER" CFLAGS="-Werror" \
CXX="$CXX" CXX_LD="$LINKER" CXXFLAGS="-Werror" \
meson -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true --werror \
+ -Dnobody-group=nogroup $additional_meson_args \
-Dcryptolib="${CRYPTOLIB:?}" $args build; then
cat build/meson-logs/meson-log.txt
diff --git a/.github/workflows/unit_tests.sh b/.github/workflows/unit_tests.sh
index fc9c9b2cdc..8c59cf3636 100755
--- a/.github/workflows/unit_tests.sh
+++ b/.github/workflows/unit_tests.sh
@@ -56,7 +56,7 @@ for phase in "${PHASES[@]}"; do
# The docs build is slow and is not affected by compiler/flags, so do it just once
MESON_ARGS+=(-Dman=true)
fi
- run_meson --werror -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true "${MESON_ARGS[@]}" build
+ run_meson --fatal-meson-warnings -Dnobody-group=nogroup --werror -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true "${MESON_ARGS[@]}" build
ninja -C build -v
meson test -C build --print-errorlogs
;;
@@ -71,7 +71,7 @@ for phase in "${PHASES[@]}"; do
# -Db_lundef=false: See https://github.com/mesonbuild/meson/issues/764
MESON_ARGS+=(-Db_lundef=false -Dfuzz-tests=true)
fi
- run_meson --werror -Dtests=unsafe -Db_sanitize=address,undefined "${MESON_ARGS[@]}" build
+ run_meson --fatal-meson-warnings -Dnobody-group=nogroup --werror -Dtests=unsafe -Db_sanitize=address,undefined "${MESON_ARGS[@]}" build
ninja -C build -v
export ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1