build: Use binary kernel artifacts

The Linux kernel fork repository for Cloud Hypervisor now produces
prebuilt x86-64 and aarch64 binaries. Speed up the CI by using those
binaries.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
This commit is contained in:
Rob Bradford
2024-09-08 11:51:57 +01:00
parent e47677020e
commit a10e9e6cd5
6 changed files with 29 additions and 7 deletions

View File

@@ -42,6 +42,7 @@ checkout_repo() {
fi
}
# Not actively used by CI
build_custom_linux() {
ARCH=$(uname -m)
SRCDIR=$PWD
@@ -130,6 +131,24 @@ download_hypervisor_fw() {
popd || exit
}
download_linux() {
if [ -n "$AUTH_DOWNLOAD_TOKEN" ]; then
echo "Using authenticated download from GitHub"
KERNEL_URLS=$(curl --silent https://api.github.com/repos/cloud-hypervisor/linux/releases/latest \
--header "Authorization: Token $AUTH_DOWNLOAD_TOKEN" \
--header "X-GitHub-Api-Version: 2022-11-28" | grep "browser_download_url" | grep -o 'https://.*[^ "]')
else
echo "Using anonymous download from GitHub"
KERNEL_URLS=$(curl --silent https://api.github.com/repos/cloud-hypervisor/linux/releases/latest | grep "browser_download_url" | grep -o 'https://.*[^ "]')
fi
pushd "$WORKLOADS_DIR" || exit
for url in $KERNEL_URLS; do
wget --quiet "$url" || exit 1
done
popd || exit
}
download_ovmf() {
OVMF_FW_TAG="ch-6624aa331f"
OVMF_FW_URL="https://github.com/cloud-hypervisor/edk2/releases/download/$OVMF_FW_TAG/CLOUDHV.fd"