mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-13 13:17:43 +03:00
ci: Add mold to build tests
This commit is contained in:
parent
9ed999cb5d
commit
ed862b95b2
15
.github/workflows/build_test.sh
vendored
15
.github/workflows/build_test.sh
vendored
@ -45,6 +45,7 @@ PACKAGES=(
|
||||
libxkbcommon-dev
|
||||
libxtables-dev
|
||||
libzstd-dev
|
||||
mold
|
||||
mount
|
||||
net-tools
|
||||
perl
|
||||
@ -134,11 +135,21 @@ for args in "${ARGS[@]}"; do
|
||||
if [[ "$LINKER" != lld ]]; then
|
||||
additional_meson_args="--fatal-meson-warnings"
|
||||
fi
|
||||
|
||||
# mold < 1.1 does not support LTO.
|
||||
if dpkg --compare-versions "$(dpkg-query --showformat='${Version}' --show mold)" ge 1.1; then
|
||||
fatal "Newer mold version detected, please remove this workaround."
|
||||
elif [[ "$args" == *"-Db_lto=true"* ]]; then
|
||||
LD="gold"
|
||||
else
|
||||
LD="$LINKER"
|
||||
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" \
|
||||
CC="$CC" CC_LD="$LD" CFLAGS="-Werror" \
|
||||
CXX="$CXX" CXX_LD="$LD" CXXFLAGS="-Werror" \
|
||||
meson -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true --werror \
|
||||
-Dnobody-group=nogroup $additional_meson_args \
|
||||
-Dcryptolib="${CRYPTOLIB:?}" $args build; then
|
||||
|
2
.github/workflows/build_test.yml
vendored
2
.github/workflows/build_test.yml
vendored
@ -27,7 +27,7 @@ jobs:
|
||||
env:
|
||||
- { COMPILER: "gcc", COMPILER_VERSION: "11", LINKER: "bfd", CRYPTOLIB: "gcrypt" }
|
||||
- { COMPILER: "gcc", COMPILER_VERSION: "12", LINKER: "gold", CRYPTOLIB: "openssl" }
|
||||
- { COMPILER: "clang", COMPILER_VERSION: "13", LINKER: "gold", CRYPTOLIB: "gcrypt" }
|
||||
- { COMPILER: "clang", COMPILER_VERSION: "13", LINKER: "mold", CRYPTOLIB: "gcrypt" }
|
||||
- { COMPILER: "clang", COMPILER_VERSION: "14", LINKER: "lld", CRYPTOLIB: "openssl" }
|
||||
- { COMPILER: "clang", COMPILER_VERSION: "15", LINKER: "bfd", CRYPTOLIB: "auto" }
|
||||
env: ${{ matrix.env }}
|
||||
|
Loading…
Reference in New Issue
Block a user