]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci: bring fatal-meson-warnings back
authorEvgeny Vereshchagin <evvers@ya.ru>
Thu, 28 Apr 2022 01:26:04 +0000 (01:26 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Thu, 28 Apr 2022 18:21:59 +0000 (21:21 +0300)
It's a follow-up to https://github.com/systemd/systemd/pull/23204

v2: replaced xargs with exec as suggested by Jan Janssen

.github/workflows/build_test.sh
.github/workflows/unit_tests.sh

index aa8fa97f4e5380c483f94fe074e36a2d80fc40b9..ad820cf0f504db2d907834fa6812142863d18b05 100755 (executable)
@@ -123,12 +123,14 @@ for args in "${ARGS[@]}"; do
     #   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.
-    # We use some features (like install_tag) that were introduced in 0.60, but that don't
-    # break running with older versions
-    # FIXME: re-enable once the minimum version is bumped to 0.60
-    #if [[ "$LINKER" != lld ]]; then
-    #    additional_meson_args="--fatal-meson-warnings"
-    #fi
+
+    # The install_tag feature introduced in 0.60 causes meson to fail with fatal-meson-warnings
+    # "Project targeting '>= 0.53.2' but tried to use feature introduced in '0.60.0': install_tag arg in custom_target"
+    # It can be safely removed from the CI since it isn't actually used anywhere to test anything.
+    find . -type f -name meson.build -exec sed -i '/install_tag/d' '{}' '+'
+    if [[ "$LINKER" != lld ]]; then
+        additional_meson_args="--fatal-meson-warnings"
+    fi
     additional_meson_args=""
     info "Checking build with $args"
     # shellcheck disable=SC2086
index f689f97e40861a7162f79350199607dd009a8e35..442202f46a04a5f9226e4300a744796e3c0765ae 100755 (executable)
@@ -60,10 +60,11 @@ 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
-            # We use some features (like install_tag) that were introduced in 0.60, but that don't
-            # break running with older versions
-            # FIXME: re-enable once the minimum version is bumped to 0.60
-            # MESON_ARGS+=(--fatal-meson-warnings)
+            # The install_tag feature introduced in 0.60 causes meson to fail with fatal-meson-warnings
+            # "Project targeting '>= 0.53.2' but tried to use feature introduced in '0.60.0': install_tag arg in custom_target"
+            # It can be safely removed from the CI since it isn't actually used anywhere to test anything.
+            find . -type f -name meson.build -exec sed -i '/install_tag/d' '{}' '+'
+            MESON_ARGS+=(--fatal-meson-warnings)
             run_meson -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
@@ -83,10 +84,11 @@ for phase in "${PHASES[@]}"; do
                     MESON_ARGS+=(-Dskip-deps=true)
                 fi
             fi
-            # We use some features (like install_tag) that were introduced in 0.60, but that don't
-            # break running with older versions
-            # FIXME: re-enable once the minimum version is bumped to 0.60
-            # MESON_ARGS+=(--fatal-meson-warnings)
+            # The install_tag feature introduced in 0.60 causes meson to fail with fatal-meson-warnings
+            # "Project targeting '>= 0.53.2' but tried to use feature introduced in '0.60.0': install_tag arg in custom_target"
+            # It can be safely removed from the CI since it isn't actually used anywhere to test anything.
+            find . -type f -name meson.build -exec sed -i '/install_tag/d' '{}' '+'
+            MESON_ARGS+=(--fatal-meson-warnings)
             run_meson -Dnobody-group=nogroup --werror -Dtests=unsafe -Db_sanitize=address,undefined "${MESON_ARGS[@]}" build
             ninja -C build -v