From f11f93242c4866f0bcefff12ace263c5526548a0 Mon Sep 17 00:00:00 2001 From: zachyking Date: Mon, 26 Oct 2026 17:10:18 +0000 Subject: [PATCH 1/2] temporary: apt diagnostic Co-Authored-By: Claude Opus 5.5 --- .github/workflows/diag-apt.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/diag-apt.yml diff --git a/.github/workflows/diag-apt.yml b/.github/workflows/diag-apt.yml new file mode 100644 index 00000000..5dde64d0 --- /dev/null +++ b/.github/workflows/diag-apt.yml @@ -0,0 +1,21 @@ +name: diag-apt +on: + push: + branches: [ci/apt-opam-robust] +permissions: + contents: read +jobs: + diag: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - run: | + cat /etc/apt/sources.list.d/ubuntu.sources || true + timeout 300 sudo apt-get update -o Acquire::Retries=5 -o Acquire::http::Timeout=60 | tail -3 + apt-cache depends opam + echo ---- recommends-only check + apt-get install -s --no-install-recommends opam libgmp-dev pkg-config zstd | grep '^Inst' | awk '{print $2}' | tr '\n' ' ' + echo; echo ---- with recommends + apt-get install -s opam libgmp-dev pkg-config zstd | grep '^Inst' | awk '{print $2}' | tr '\n' ' ' + echo; echo ---- tools present + for t in curl git make gcc patch unzip rsync bwrap tar zstd; do printf '%s: ' $t; command -v $t || echo MISSING; done From 4c84bf31e7446cd64b4c6b30ae859dba20fbb975 Mon Sep 17 00:00:00 2001 From: zachyking Date: Mon, 26 Oct 2026 17:11:48 +0000 Subject: [PATCH 2/2] ci: make the opam and multilib apt steps robust against a slow Azure mirror opam only Recommends ocaml, which setup-toolchain.sh does not need (it builds OCaml 5.3.0), so install with --no-install-recommends plus the recommends the build uses. Add apt retries and a 60s timeout, and fall back to archive.ubuntu.com on attempts 2 and 3. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 20 ++++++++++++++++++-- .github/workflows/diag-apt.yml | 21 --------------------- 2 files changed, 18 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/diag-apt.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4def471e..bbea219c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,8 +126,14 @@ jobs: # Bound each attempt and retry instead of waiting out the job limit. - name: install 32-bit linker (multilib) run: | + APT="-o Acquire::Retries=5 -o Acquire::http::Timeout=60" for attempt in 1 2 3; do - sudo timeout 300 apt-get update && sudo timeout 600 apt-get install -y gcc-multilib && exit 0 + # The runner's default mirror (azure.archive.ubuntu.com) can stall on one large file; from the + # second attempt use the canonical archive instead (this step's runner only, not global). + if [ "$attempt" -gt 1 ]; then + sudo sed -i 's|^URIs:.*|URIs: http://archive.ubuntu.com/ubuntu|' /etc/apt/sources.list.d/ubuntu.sources + fi + sudo timeout 300 apt-get update $APT && sudo timeout 600 apt-get install -y $APT gcc-multilib && exit 0 echo "apt attempt $attempt failed or timed out; retrying" >&2 sleep 20 done @@ -655,8 +661,18 @@ jobs: key: averin-aeneas-${{ runner.os }}-${{ steps.pins.outputs.key }}-${{ hashFiles('formal/production/setup-toolchain.sh') }} - name: system packages for opam (bounded, retried; see core-32bit) run: | + # opam only Recommends ocaml (apt-cache depends opam, noble); setup-toolchain.sh builds its own OCaml + # 5.3.0, so the 81 MB system ocaml 4.14 (the download that kept hanging) is skipped. The + # recommends opam/the build still use are named explicitly: git, rsync, m4, ca-certificates. + APT="-o Acquire::Retries=5 -o Acquire::http::Timeout=60" for attempt in 1 2 3; do - sudo timeout 300 apt-get update && sudo timeout 900 apt-get install -y opam libgmp-dev pkg-config zstd && exit 0 + # From the second attempt use the canonical archive instead of the azure mirror (this step's + # runner only, not global). + if [ "$attempt" -gt 1 ]; then + sudo sed -i 's|^URIs:.*|URIs: http://archive.ubuntu.com/ubuntu|' /etc/apt/sources.list.d/ubuntu.sources + fi + sudo timeout 300 apt-get update $APT && sudo timeout 900 apt-get install -y $APT --no-install-recommends \ + opam libgmp-dev pkg-config zstd git rsync m4 ca-certificates && exit 0 echo "apt attempt $attempt failed or timed out; retrying" >&2 sleep 20 done diff --git a/.github/workflows/diag-apt.yml b/.github/workflows/diag-apt.yml deleted file mode 100644 index 5dde64d0..00000000 --- a/.github/workflows/diag-apt.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: diag-apt -on: - push: - branches: [ci/apt-opam-robust] -permissions: - contents: read -jobs: - diag: - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - run: | - cat /etc/apt/sources.list.d/ubuntu.sources || true - timeout 300 sudo apt-get update -o Acquire::Retries=5 -o Acquire::http::Timeout=60 | tail -3 - apt-cache depends opam - echo ---- recommends-only check - apt-get install -s --no-install-recommends opam libgmp-dev pkg-config zstd | grep '^Inst' | awk '{print $2}' | tr '\n' ' ' - echo; echo ---- with recommends - apt-get install -s opam libgmp-dev pkg-config zstd | grep '^Inst' | awk '{print $2}' | tr '\n' ' ' - echo; echo ---- tools present - for t in curl git make gcc patch unzip rsync bwrap tar zstd; do printf '%s: ' $t; command -v $t || echo MISSING; done