Просмотр исходного кода

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.
_Kerman 3 недель назад
Родитель
Сommit
f97ea54ca9
1 измененных файлов с 11 добавлено и 1 удалено
  1. 11 1
      .github/workflows/ci.yml

+ 11 - 1
.github/workflows/ci.yml

@@ -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