From 32faecb0c28dabfc68e29a5e98e0b4b3f0f1031d Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Tue, 16 Dec 2025 09:15:18 -0800 Subject: [PATCH] CI: Use Ubuntu mirrors instead of azure (#18057) Use the official Ubuntu apt mirrors instead of azure.archive.ubuntu.com, since that mirror can be slow: https://github.com/actions/runner-images/issues/7048 This can help speed up the 'Setup QEMU' stage. Reviewed-by: Brian Behlendorf Signed-off-by: Tony Hutter Closes #18057 --- .github/workflows/scripts/qemu-1-setup.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/scripts/qemu-1-setup.sh b/.github/workflows/scripts/qemu-1-setup.sh index 0278264d9279..a597e3462f04 100755 --- a/.github/workflows/scripts/qemu-1-setup.sh +++ b/.github/workflows/scripts/qemu-1-setup.sh @@ -13,6 +13,20 @@ set -eu # handle on what the timeout value should be. (while [ 1 ] ; do sleep 30 && echo "[watchdog: $(ps -eo cmd --sort=-pcpu | head -n 2 | tail -n 1)}')]"; done) & +# The default 'azure.archive.ubuntu.com' mirrors can be really slow. +# Prioritize the official Ubuntu mirrors. +# +# The normal apt-mirrors.txt will look like: +# +# http://azure.archive.ubuntu.com/ubuntu/ priority:1 +# https://archive.ubuntu.com/ubuntu/ priority:2 +# https://security.ubuntu.com/ubuntu/ priority:3 +# +# Just delete the 'azure.archive.ubuntu.com' line. +sudo sed -i '/azure.archive.ubuntu.com/d' /etc/apt/apt-mirrors.txt +echo "Using mirrors:" +cat /etc/apt/apt-mirrors.txt + # install needed packages export DEBIAN_FRONTEND="noninteractive" sudo apt-get -y update