diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 077258c8..bf66a3a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,18 +36,17 @@ jobs: pip install numpyro python scripts/test-jax-install.py - name: Install latex dependencies + timeout-minutes: 30 run: | - sudo apt-get -qq update - sudo apt-get install -y \ - texlive-latex-recommended \ - texlive-latex-extra \ - texlive-fonts-recommended \ - texlive-fonts-extra \ - texlive-xetex \ - latexmk \ - xindy \ - dvipng \ - cm-super + # Retried with per-command timeouts (timeout inside sudo, so the kill reaches + # apt-get and the dpkg lock is released): a stalled Ubuntu mirror otherwise + # hangs this step for hours (two 358-minute hangs on 2026-08-18). + pkgs="texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra texlive-xetex latexmk xindy dvipng cm-super" + for attempt in 1 2; do + sudo timeout -k 30s 2m apt-get -qq update && sudo timeout -k 30s 12m apt-get install -y $pkgs && break + if [ "$attempt" = 2 ]; then echo "apt-get failed after 2 attempts"; exit 1; fi + echo "apt-get attempt $attempt failed; retrying in 30s"; sleep 30 + done - name: Display Conda Environment Versions shell: bash -l {0} run: conda list diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 83baca77..de7e5c66 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -52,18 +52,17 @@ jobs: run: | nvidia-smi - name: Install latex dependencies + timeout-minutes: 30 run: | - sudo apt-get -qq update - sudo apt-get install -y \ - texlive-latex-recommended \ - texlive-latex-extra \ - texlive-fonts-recommended \ - texlive-fonts-extra \ - texlive-xetex \ - latexmk \ - xindy \ - dvipng \ - cm-super + # Retried with per-command timeouts (timeout inside sudo, so the kill reaches + # apt-get and the dpkg lock is released): a stalled Ubuntu mirror otherwise + # hangs this step for hours (two 358-minute hangs on 2026-08-18). + pkgs="texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra texlive-xetex latexmk xindy dvipng cm-super" + for attempt in 1 2; do + sudo timeout -k 30s 2m apt-get -qq update && sudo timeout -k 30s 12m apt-get install -y $pkgs && break + if [ "$attempt" = 2 ]; then echo "apt-get failed after 2 attempts"; exit 1; fi + echo "apt-get attempt $attempt failed; retrying in 30s"; sleep 30 + done - name: Display Conda Environment Versions shell: bash -l {0} run: conda list