Skip to content

Commit 5353b08

Browse files
committed
ci: install valgrind from archive.ubuntu.com when the Azure mirror fails
The runners' Azure Ubuntu mirror stopped resolving, so apt could not download valgrind and Checks, tests and replay failed before any check ran. Point apt at archive.ubuntu.com directly and retry the install up to three times. apt still verifies the archive's signatures.
1 parent 2e43768 commit 5353b08

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,21 @@ jobs:
113113
- name: Install development tools without the recorder
114114
run: uv sync --locked --no-group recorder
115115
# The instruction-count guard in check-ci runs its workloads under callgrind.
116+
# The runner's Azure Ubuntu mirror sometimes stops resolving, so apt uses archive.ubuntu.com
117+
# directly. apt still checks the archive's signatures.
116118
- name: Install valgrind
117-
run: sudo apt-get update -q && sudo apt-get install -y -q --no-install-recommends valgrind
119+
run: |
120+
{ sudo grep -rlE 'mirror\+file:|azure\.archive\.ubuntu\.com' /etc/apt || true; } | xargs -r sudo sed -i -E \
121+
-e 's#mirror\+file:/etc/apt/apt-mirrors\.txt#http://archive.ubuntu.com/ubuntu/#g' \
122+
-e 's#https?://azure\.archive\.ubuntu\.com/ubuntu/?#http://archive.ubuntu.com/ubuntu/#g'
123+
for attempt in 1 2 3; do
124+
if sudo apt-get update -q -o Acquire::Retries=3 &&
125+
sudo apt-get install -y -q --no-install-recommends -o Acquire::Retries=3 valgrind; then
126+
exit 0
127+
fi
128+
sleep $((attempt * 15))
129+
done
130+
exit 1
118131
# One gate build serves every step: check-ci, the Rust tests, the Python tests and the replay.
119132
- name: Run static checks and tests
120133
run: make check-merge test-python

0 commit comments

Comments
 (0)