From dfe8efd3162c80045068c62e8810417865fdcce4 Mon Sep 17 00:00:00 2001 From: sdolbec Date: Mon, 26 Oct 2026 23:36:08 -0400 Subject: [PATCH] CI: use the ports mirror for apt on arm64 runners via a shared composite action --- .github/actions/fast-apt/action.yml | 17 +++++++++++ .github/workflows/aurora-kernel.yml | 2 ++ .github/workflows/build-release.yml | 2 ++ .github/workflows/daily-9.0.yml | 4 +++ .github/workflows/message-pins.yml | 2 ++ .github/workflows/msdk.yml | 2 ++ .github/workflows/mseries-debs.yml | 8 +++++ .github/workflows/mseries-diskspace-app.yml | 2 ++ .github/workflows/mseries-messages-rs.yml | 2 ++ .github/workflows/mseries-signal-import.yml | 2 ++ .github/workflows/mseries-updates-app.yml | 2 ++ .github/workflows/rust-pantheon-apple-dev.yml | 2 ++ .../rust-pantheon-system-monitor.yml | 2 ++ .github/workflows/validate-mseries.yml | 30 +++++++++++++++++++ .github/workflows/verification-codes.yml | 2 ++ 15 files changed, 81 insertions(+) create mode 100644 .github/actions/fast-apt/action.yml diff --git a/.github/actions/fast-apt/action.yml b/.github/actions/fast-apt/action.yml new file mode 100644 index 000000000..3ba9fb440 --- /dev/null +++ b/.github/actions/fast-apt/action.yml @@ -0,0 +1,17 @@ +name: Fast apt on arm64 runners +description: >- + Point Ubuntu package sources at the official ports mirror and set apt retry/timeout + defaults. The default Azure mirror took over 30 minutes for dependency installs on + arm64 runners (runs 40418762416, 40418762747). No-op on non-arm64 runners. +runs: + using: composite + steps: + - shell: bash + run: | + [ "$(dpkg --print-architecture)" = arm64 ] || exit 0 + printf 'Acquire::Retries "3";\nAcquire::http::Timeout "20";\nAcquire::https::Timeout "20";\n' \ + | sudo tee /etc/apt/apt.conf.d/99ci-fast >/dev/null + for f in /etc/apt/sources.list.d/ubuntu.sources; do + [ -f "$f" ] && sudo sed -i -E 's#^URIs:.*(azure\.)?ports\.ubuntu\.com.*#URIs: http://ports.ubuntu.com/ubuntu-ports#; s#^URIs:.*archive\.ubuntu\.com.*#URIs: http://ports.ubuntu.com/ubuntu-ports#' "$f" + done + [ -f /etc/apt/sources.list ] && sudo sed -i -E 's#https?://[a-z.]*(azure\.)?(ports|archive)\.ubuntu\.com/ubuntu(-ports)?#http://ports.ubuntu.com/ubuntu-ports#g' /etc/apt/sources.list || true diff --git a/.github/workflows/aurora-kernel.yml b/.github/workflows/aurora-kernel.yml index ab738f9bb..aed310be8 100644 --- a/.github/workflows/aurora-kernel.yml +++ b/.github/workflows/aurora-kernel.yml @@ -23,6 +23,8 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install payload inspection tools run: sudo apt-get update && sudo apt-get install -y zstd device-tree-compiler shellcheck - name: Check installer and staging regressions diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index b5542ca4b..d7db7bae6 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -55,6 +55,8 @@ jobs: docker-images: true swap-storage: false + - uses: ./.github/actions/fast-apt + - name: Install deps run: sudo apt-get update && sudo apt-get install just podman zstd -y diff --git a/.github/workflows/daily-9.0.yml b/.github/workflows/daily-9.0.yml index 0724a93fa..cc813ae8c 100644 --- a/.github/workflows/daily-9.0.yml +++ b/.github/workflows/daily-9.0.yml @@ -29,6 +29,8 @@ jobs: timeout-minutes: 180 steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install kernel build tools run: | sudo apt-get update @@ -101,6 +103,8 @@ jobs: large-packages: true docker-images: true swap-storage: false + - uses: ./.github/actions/fast-apt + - name: Install build dependencies run: sudo apt-get update && sudo apt-get install -y just mtools podman zstd rsync - name: Download enhanced kernel packages diff --git a/.github/workflows/message-pins.yml b/.github/workflows/message-pins.yml index 1335b3528..f12167bb6 100644 --- a/.github/workflows/message-pins.yml +++ b/.github/workflows/message-pins.yml @@ -23,6 +23,8 @@ jobs: repository: erikwb/blueferry ref: 60fd7ef1abbd25947981f0cf27a521d82784a75f path: .pin-test-blueferry + - uses: ./.github/actions/fast-apt + - name: Install native fixture dependencies run: sudo apt-get update && sudo apt-get install -y python3-gi python3-dbus python3-pil gir1.2-gtk-4.0 libgranite-7-dev gir1.2-secret-1 gnome-keyring dbus-x11 xvfb xauth - name: Check matching, drafts, failed writes and isolated Secret Service diff --git a/.github/workflows/msdk.yml b/.github/workflows/msdk.yml index b73852f66..19d1314fb 100644 --- a/.github/workflows/msdk.yml +++ b/.github/workflows/msdk.yml @@ -41,6 +41,8 @@ jobs: CARGO_TARGET_DIR: ${{ github.workspace }}/work/sdk-target steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Provision native SDK test environment run: | # The Azure mirror took >25 minutes for two Rust archives in run diff --git a/.github/workflows/mseries-debs.yml b/.github/workflows/mseries-debs.yml index 461c59c76..916afe156 100644 --- a/.github/workflows/mseries-debs.yml +++ b/.github/workflows/mseries-debs.yml @@ -76,6 +76,8 @@ jobs: - uses: actions/checkout@v7 # Launchpad answers 503 now and then (it broke PR #429's first build); retry before failing. + - uses: ./.github/actions/fast-apt + - name: Add elementary daily PPA (build + gate headers) run: | for attempt in 1 2 3 4 5; do @@ -209,6 +211,8 @@ jobs: steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install compositor build dependencies run: | sudo apt-get update @@ -248,6 +252,8 @@ jobs: steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Add elementary daily PPA (wingpanel-9 for the indicator) run: | for attempt in 1 2 3 4 5; do @@ -363,6 +369,8 @@ jobs: fi echo "AUTH_HEADER=$auth" >> "$GITHUB_ENV" + - uses: ./.github/actions/fast-apt + - name: Assemble and sign the ${{ steps.suite.outputs.channel }} suite if: steps.key.outputs.have == 'true' run: | diff --git a/.github/workflows/mseries-diskspace-app.yml b/.github/workflows/mseries-diskspace-app.yml index b07b94a61..a48a4de26 100644 --- a/.github/workflows/mseries-diskspace-app.yml +++ b/.github/workflows/mseries-diskspace-app.yml @@ -37,6 +37,8 @@ jobs: steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install build and test dependencies run: | sudo apt-get update diff --git a/.github/workflows/mseries-messages-rs.yml b/.github/workflows/mseries-messages-rs.yml index b2c8e014f..f6b4c5cb6 100644 --- a/.github/workflows/mseries-messages-rs.yml +++ b/.github/workflows/mseries-messages-rs.yml @@ -41,6 +41,8 @@ jobs: ref: 60fd7ef1abbd25947981f0cf27a521d82784a75f path: .pin-test-blueferry + - uses: ./.github/actions/fast-apt + - name: Install build dependencies run: | sudo apt-get update diff --git a/.github/workflows/mseries-signal-import.yml b/.github/workflows/mseries-signal-import.yml index c5d886603..70e042d46 100644 --- a/.github/workflows/mseries-signal-import.yml +++ b/.github/workflows/mseries-signal-import.yml @@ -26,6 +26,8 @@ jobs: steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install build dependencies run: | sudo apt-get update diff --git a/.github/workflows/mseries-updates-app.yml b/.github/workflows/mseries-updates-app.yml index 2c16ed765..f83c5d0b8 100644 --- a/.github/workflows/mseries-updates-app.yml +++ b/.github/workflows/mseries-updates-app.yml @@ -42,6 +42,8 @@ jobs: steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install build and test dependencies run: | sudo apt-get update diff --git a/.github/workflows/rust-pantheon-apple-dev.yml b/.github/workflows/rust-pantheon-apple-dev.yml index 48fe88480..790577a3a 100644 --- a/.github/workflows/rust-pantheon-apple-dev.yml +++ b/.github/workflows/rust-pantheon-apple-dev.yml @@ -33,6 +33,8 @@ jobs: steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install build dependencies run: | sudo apt-get update diff --git a/.github/workflows/rust-pantheon-system-monitor.yml b/.github/workflows/rust-pantheon-system-monitor.yml index 0171b23f8..fe0c668d6 100644 --- a/.github/workflows/rust-pantheon-system-monitor.yml +++ b/.github/workflows/rust-pantheon-system-monitor.yml @@ -33,6 +33,8 @@ jobs: steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install build dependencies run: | sudo apt-get update diff --git a/.github/workflows/validate-mseries.yml b/.github/workflows/validate-mseries.yml index d91dc70a8..27938d667 100644 --- a/.github/workflows/validate-mseries.yml +++ b/.github/workflows/validate-mseries.yml @@ -36,6 +36,8 @@ jobs: runs-on: ubuntu-26.04-arm steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install desktop integration test dependencies run: sudo apt-get update && sudo apt-get install -y python3-gi desktop-file-utils - name: Test without browsers, accounts or network @@ -48,6 +50,8 @@ jobs: runs-on: ubuntu-26.04-arm steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install private GTK test dependencies run: sudo apt-get update && sudo apt-get install -y python3-gi gir1.2-gtk-4.0 gir1.2-ibus-1.0 gir1.2-atspi-2.0 dbus-x11 xvfb xauth - name: Verify source-only release, rollback and host checks @@ -65,6 +69,8 @@ jobs: runs-on: ubuntu-26.04-arm steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install native GTK and private D-Bus test dependencies run: sudo apt-get update && sudo apt-get install -y valac libgtk-4-dev libgranite-7-dev python3-gi gsettings-desktop-schemas libglib2.0-bin dbus-x11 xvfb xauth - name: Planner, dock token and size-lint unit tests @@ -84,6 +90,8 @@ jobs: runs-on: ubuntu-26.04-arm steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install native GTK and private D-Bus test dependencies run: sudo apt-get update && sudo apt-get install -y valac libgtk-4-dev libgranite-7-dev python3-dbus python3-gi dbus-x11 xvfb xauth - name: Keep all Quick Settings builds on shared source preparation @@ -100,6 +108,8 @@ jobs: runs-on: ubuntu-26.04-arm steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install private GTK fixture dependencies run: sudo apt-get update && sudo apt-get install -y python3-gi gir1.2-gtk-3.0 gir1.2-gtk-4.0 xvfb xauth dbus-x11 ffmpeg xdotool gir1.2-pango-1.0 python3-gi-cairo - name: Check responsiveness, error recovery and scale in both themes @@ -115,6 +125,8 @@ jobs: runs-on: ubuntu-26.04-arm steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install GTK and Granite test dependencies run: sudo apt-get update && sudo apt-get install -y python3-gi gir1.2-gtk-4.0 gir1.2-granite-7.0 xvfb xauth dbus-x11 git meson ninja-build valac gcc pkg-config libgtk-4-dev libgranite-7-dev libgee-0.8-dev libjson-glib-dev libsoup-3.0-dev libsecret-1-dev - name: Test without a daemon or real guests @@ -144,6 +156,8 @@ jobs: runs-on: ubuntu-26.04-arm steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install GSettings test dependencies run: sudo apt-get update && sudo apt-get install -y python3-gi libglib2.0-bin gsettings-desktop-schemas iproute2 - name: Test with keyfile GSettings, a local IP service and no user services @@ -154,6 +168,8 @@ jobs: runs-on: ubuntu-26.04-arm steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install native test dependencies run: sudo apt-get update && sudo apt-get install -y git valac libglib2.0-dev - name: Verify activation, delayed Gala readiness and session stops @@ -167,6 +183,8 @@ jobs: runs-on: ubuntu-26.04-arm steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install GTK test dependencies run: sudo apt-get update && sudo apt-get install -y git valac libgtk-4-dev libgranite-7-dev xvfb xauth build-essential python3-gi libglib2.0-bin - name: Test top-bar 130 percent measurement and allocation @@ -181,6 +199,8 @@ jobs: runs-on: ubuntu-26.04-arm steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install build dependencies run: sudo apt-get update && sudo apt-get install -y meson ninja-build valac gcc pkg-config libgtk-4-dev libgranite-7-dev libjson-glib-dev libsoup-3.0-dev libsecret-1-dev python3 appstream desktop-file-utils xvfb xauth dbus-x11 genisoimage curl qemu-utils - name: Build and run the tests (machines, QMP, clipboard, display, Incus, Podman, window) @@ -205,6 +225,8 @@ jobs: runs-on: ubuntu-26.04-arm steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install native build and headless test dependencies run: >- sudo apt-get update && sudo apt-get install -y git meson ninja-build valac gcc pkg-config @@ -234,6 +256,8 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install build and headless EDS test dependencies run: >- sudo apt-get update && sudo apt-get install -y git meson ninja-build valac gcc pkg-config gettext sassc @@ -264,6 +288,8 @@ jobs: [[ "$audit_revision" =~ ^[0-9a-f]{40}$ ]] || exit 1 git fetch --no-tags --depth=1 origin "$audit_revision" + - uses: ./.github/actions/fast-apt + - name: Install deps run: sudo apt-get update && sudo apt-get install just podman zstd bison flex device-tree-compiler mtools fdisk shellcheck dpkg-dev -y @@ -336,6 +362,8 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v7 + - uses: ./.github/actions/fast-apt + - name: Install offline test tools run: sudo apt-get update && sudo apt-get install -y mtools fdisk shellcheck python3-libarchive-c keyutils - name: Validate hardware ports without target hardware @@ -366,6 +394,8 @@ jobs: # The crate pins gtk4 0.11 (v4_20) and granite-rs 3.3 (v7_8); Ubuntu's libgranite-7-dev is 7.8, enough # for the bindings, so no PPA is needed here (RUST-UPSTREAM-MAINTENANCE.md). The indicator needs the # wingpanel-9 API, which the daily PPA ships. + - uses: ./.github/actions/fast-apt + - name: Add elementary daily PPA (wingpanel-9 for the indicator) run: | for attempt in 1 2 3 4 5; do diff --git a/.github/workflows/verification-codes.yml b/.github/workflows/verification-codes.yml index 509144bba..6fdbcab8a 100644 --- a/.github/workflows/verification-codes.yml +++ b/.github/workflows/verification-codes.yml @@ -23,6 +23,8 @@ jobs: repository: erikwb/blueferry ref: 60fd7ef1abbd25947981f0cf27a521d82784a75f path: .code-test-blueferry + - uses: ./.github/actions/fast-apt + - name: Install native fixture dependencies run: sudo apt-get update && sudo apt-get install -y python3-gi python3-dbus python3-pil gir1.2-gtk-4.0 gir1.2-atspi-2.0 libgranite-7-dev at-spi2-core dbus-x11 xvfb xauth xdotool gsettings-desktop-schemas gnome-settings-daemon-common shellcheck - name: Check models, actual field editing and settings in isolation