fix(ci): install Wine offline from the restored apt archive

The windows wine-blocking job installs Wine with apt-get over the local
.deb archive, but apt re-downloads the full 100+ MB closure from the
Ubuntu mirror anyway. A degraded runner network stalled that transfer
past the job's 15-minute budget and cancelled the check. Install the
restored archive directly with dpkg (no repository access) and keep the
apt network install as the fallback when the archive cannot satisfy the
closure.
This commit is contained in:
_Kerman
2026-08-19 11:06:57 +08:00
parent 97a3bb746d
commit f97ea54ca9
+11 -1
View File
@@ -389,7 +389,17 @@ jobs:
- name: Install Wine
run: |
if compgen -G "$HOME/wine-debs/*.deb" > /dev/null; then
sudo apt-get install -y --no-install-recommends "$HOME"/wine-debs/*.deb
# The restored archive is the full --download-only closure of
# `wine` for this runner image, so installing the .debs directly
# with dpkg needs no repository access. apt-get would instead
# re-download the same 100+ MB closure from the mirror, which has
# stalled the job past its budget on a degraded runner network.
# If the archive cannot satisfy the closure, fall back to the apt
# network install.
if ! sudo DEBIAN_FRONTEND=noninteractive dpkg -i "$HOME"/wine-debs/*.deb; then
sudo DEBIAN_FRONTEND=noninteractive dpkg --configure -a || true
sudo apt-get install -y --no-install-recommends "$HOME"/wine-debs/*.deb
fi
else
sudo apt-get update
sudo apt-get install -y --no-install-recommends --download-only wine