Merge pull request #518 from omacom/builder-qemu-10
Builders emulate aarch64 with QEMU 10.2.3 instead of the abandoned 7.2 image
This commit is contained in:
2 files changed
+22
-7
No files matched your search
@@ -68,10 +68,14 @@ runcmd:
|
|||||||
- chage -d "$(date +%F)" -M -1 root
|
- chage -d "$(date +%F)" -M -1 root
|
||||||
- systemctl enable --now docker
|
- systemctl enable --now docker
|
||||||
# aarch64 builds run under user-mode emulation (DO has no arm droplets).
|
# aarch64 builds run under user-mode emulation (DO has no arm droplets).
|
||||||
# Register QEMU with the F and C flags via the multiarch image, exactly as
|
# Register QEMU with the F and C flags via tonistiigi/binfmt, exactly as
|
||||||
# helpers/docker-helpers.sh setup_qemu does: Ubuntu's qemu-user-static
|
# helpers/docker-helpers.sh setup_qemu does. Ubuntu's qemu-user-static
|
||||||
# package registers without C, so sudo inside the emulated container fails
|
# registers without C, so sudo inside the emulated container fails with
|
||||||
# with "effective uid is not 0". Best-effort: an x86-only job never needs it.
|
# "effective uid is not 0"; multiarch/qemu-user-static is abandoned at QEMU
|
||||||
- docker run --rm --privileged docker.io/multiarch/qemu-user-static --reset -p yes --credential yes || true
|
# 7.2, under which qmake's compiler probe returns nothing on current gcc
|
||||||
|
# ("failed to parse default include paths", PR #517). Pin the emulator
|
||||||
|
# version: the tag is the only thing that decides what every aarch64 build
|
||||||
|
# runs under. Best-effort: an x86-only job never needs it.
|
||||||
|
- docker run --rm --privileged docker.io/tonistiigi/binfmt:qemu-v10.2.3-68 --uninstall qemu-aarch64 --install arm64 || true
|
||||||
- chown -R runner:runner /home/runner
|
- chown -R runner:runner /home/runner
|
||||||
- sudo -u runner /home/runner/start.sh > /home/runner/runner.log 2>&1
|
- sudo -u runner /home/runner/start.sh > /home/runner/runner.log 2>&1
|
||||||
@@ -91,8 +91,19 @@ setup_qemu() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Register emulators for builds whose target differs from the host.
|
# Register emulators for builds whose target differs from the host, with
|
||||||
if ! "$CONTAINER_ENGINE" run --rm --privileged docker.io/multiarch/qemu-user-static --reset -p yes --credential yes >/dev/null 2>&1; then
|
# the F and C flags (tonistiigi/binfmt always sets both). The image tag pins
|
||||||
|
# the QEMU version every emulated build runs under; multiarch/qemu-user-static
|
||||||
|
# stopped at QEMU 7.2, which breaks qmake's compiler probe on current gcc.
|
||||||
|
# Keep ci/runner-cloud-init.yaml on the same tag. Uninstall first: install
|
||||||
|
# leaves an existing registration (an older emulator) in place and exits 0.
|
||||||
|
local platform_arch
|
||||||
|
case "$target_arch" in
|
||||||
|
aarch64) platform_arch=arm64 ;;
|
||||||
|
x86_64) platform_arch=amd64 ;;
|
||||||
|
*) platform_arch="$target_arch" ;;
|
||||||
|
esac
|
||||||
|
if ! "$CONTAINER_ENGINE" run --rm --privileged docker.io/tonistiigi/binfmt:qemu-v10.2.3-68 --uninstall "qemu-$target_arch" --install "$platform_arch" >/dev/null 2>&1; then
|
||||||
print_error "Failed to set up QEMU emulation"
|
print_error "Failed to set up QEMU emulation"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in new issue
Block a user