Files
xen/automation/scripts/build
T
Andrew Cooper 4fcd2f59a7 CI: Drop automation/configs/
Having 3 extra hypervisor builds on the end of a full build is deeply
confusing to debug if one of them fails, because the .config file presented in
the artefacts is not the one which caused a build failure.  Also, the log
tends to be truncated in the UI.

PV-only is tested as part of PV-Shim in a full build anyway, so doesn't need
repeating.  HVM-only and neither appear frequently in randconfig, so drop all
the logic here to simplify things.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
(cherry picked from commit 7b20009a81)
2023-04-12 09:00:36 +01:00

51 lines
1.3 KiB
Python
Executable File

#!/bin/bash -ex
$CC --version
# Express the compiler version as an integer. e.g. GCC 4.9.2 => 0x040902
cc-ver()
{
$CC -dumpversion | awk -F. '{ printf "0x%02x%02x%02x", $1, $2, $3 }'
}
# random config or default config
if [[ "${RANDCONFIG}" == "y" ]]; then
make -C xen KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig
else
make -C xen defconfig
fi
# build up our configure options
cfgargs=()
cfgargs+=("--enable-docs")
if [[ "${CC}" == "clang"* ]]; then
# SeaBIOS cannot be built with clang
cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin")
# iPXE cannot be built with clang
cfgargs+=("--with-system-ipxe=/usr/lib/ipxe/ipxe.pxe")
# newlib cannot be built with clang so we cannot build stubdoms
cfgargs+=("--disable-stubdom")
fi
# Qemu requires Python 3.5 or later
if ! type python3 || python3 -c "import sys; res = sys.version_info < (3, 5); exit(not(res))"; then
cfgargs+=("--with-system-qemu=/bin/false")
fi
# SeaBIOS requires GCC 4.6 or later
if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then
cfgargs+=("--with-system-seabios=/bin/false")
fi
./configure "${cfgargs[@]}"
make -j$(nproc) dist
# Extract artifacts to avoid getting rewritten by customised builds
cp xen/.config xen-config
mkdir binaries
if [[ "${XEN_TARGET_ARCH}" == "x86_64" ]]; then
cp xen/xen binaries/xen
fi