diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3066a7dc1..8d91e9fa2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -117,20 +117,24 @@ jobs: - name: Install development tools without the recorder run: uv sync --locked --no-group recorder # The instruction-count guard in check-ci runs its workloads under callgrind. - # The runner's Azure Ubuntu mirror sometimes stops resolving, so apt uses archive.ubuntu.com - # directly. apt still checks the archive's signatures. + # Ubuntu mirrors fail from the runners now and then: the Azure mirror stopped resolving, and + # archive.ubuntu.com has been unreachable. apt tries the runner's own mirror, then + # archive.ubuntu.com, then mirrors.edge.kernel.org, and still checks the archive's signatures. - name: Install valgrind run: | - { sudo grep -rlE 'mirror\+file:|azure\.archive\.ubuntu\.com' /etc/apt || true; } | xargs -r sudo sed -i -E \ - -e 's#mirror\+file:/etc/apt/apt-mirrors\.txt#http://archive.ubuntu.com/ubuntu/#g' \ - -e 's#https?://azure\.archive\.ubuntu\.com/ubuntu/?#http://archive.ubuntu.com/ubuntu/#g' - for attempt in 1 2 3; do + for mirror in runner http://archive.ubuntu.com/ubuntu/ http://mirrors.edge.kernel.org/ubuntu/; do + if [ "$mirror" != runner ]; then + { sudo grep -rlE 'mirror\+file:|https?://([a-z]+\.)?archive\.ubuntu\.com/ubuntu|mirrors\.edge\.kernel\.org' /etc/apt || true; } | + xargs -r sudo sed -i -E \ + -e "s#mirror\+file:/etc/apt/apt-mirrors\.txt#$mirror#g" \ + -e "s#https?://([a-z]+\.)?archive\.ubuntu\.com/ubuntu/?#$mirror#g" + fi if sudo apt-get update -q -o Acquire::Retries=3 && sudo apt-get install -y -q --no-install-recommends -o Acquire::Retries=3 valgrind; then exit 0 fi - sleep $((attempt * 15)) done + echo "::error title=Infrastructure failure::No Ubuntu mirror served valgrind (the runner's own, archive.ubuntu.com, mirrors.edge.kernel.org). This is an infrastructure failure, not a failure of the change; rerun the job once a mirror answers." exit 1 # One gate build serves every step: check-ci, the Rust tests, the Python tests and the replay. - name: Run static checks and tests