mirror of
https://github.com/kmod-project/kmod.git
synced 2026-01-27 09:54:37 +00:00
Instead of listing each combination on per-compiler basis, assume we want both unless annotated otherwise. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/362 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
28 lines
798 B
Bash
28 lines
798 B
Bash
# TODO: add helper to validate only_bits and skip_test
|
|
# Allowed values are 32, 64 and help.
|
|
|
|
#
|
|
# Simple helper executing the given function for all compiler/bit combinations
|
|
#
|
|
for_each_config() {
|
|
[[ -n $1 ]] && compilers="$1" || compilers="gcc clang"
|
|
[[ -n $2 ]] && bits="$2" || bits="32 64"
|
|
[[ -n $3 ]] && suffix="-$3" || suffix=""
|
|
meson_cmd=$4
|
|
|
|
for compiler in ${compilers[@]}; do
|
|
for bit in ${bits[@]}; do
|
|
echo "::group::$compiler, $bit bit"
|
|
builddir="builddir-$compiler-$bit$suffix/"
|
|
|
|
if [[ "$bit" == "32" ]]; then
|
|
CC="$compiler -m32" $meson_cmd "$builddir" "$bit"
|
|
else
|
|
CC=$compiler $meson_cmd "$builddir" "$bit"
|
|
fi
|
|
|
|
echo "::endgroup::"
|
|
done
|
|
done
|
|
}
|