Skip to content

Commit 7d2f77b

Browse files
committed
ci: an apt list this job does not use must not fail its setup
Two cross-build jobs died in setup with E: Failed to fetch https://dl.google.com/linux/chrome-stable/deb/.../Packages.gz Hash Sum mismatch E: Some index files failed to download. before a single byte was compiled. The runner image carries third-party apt lists that these jobs never install from, and `apt-get update` fails the whole run when any one of them is transiently inconsistent -- so a red that says nothing about the change under test. The lists a job has no use for are removed before the update. What remains is Ubuntu's own, which is what `qemu-user-static`, `wine` and `build-essential` come from. Left alone: the two container-based jobs, whose images carry no third-party lists, and the `|| { ... }` fallback beside the wine dpkg path, which already continues past a failed update.
1 parent 75515ca commit 7d2f77b

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/cross-build-test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ jobs:
9999
100100
- name: Install qemu-user-static
101101
run: |
102+
# The runner image carries third-party apt lists (Google Chrome
103+
# among them) that this job does not use, and a transient
104+
# `Hash Sum mismatch` on one of them fails the whole update -- which
105+
# killed two cross-build jobs in setup, before a single byte was
106+
# compiled. Dropping the lists this job has no use for is what makes
107+
# the step's failure mean something about this job.
108+
sudo rm -f /etc/apt/sources.list.d/google-chrome.list \
109+
/etc/apt/sources.list.d/microsoft-prod.list || true
102110
sudo apt-get update -qq
103111
sudo apt-get install -y qemu-user-static
104112
${{ matrix.qemu_bin }} --version | head -1
@@ -251,6 +259,14 @@ jobs:
251259
sudo dpkg -i ~/wine-debs/*.deb 2>/dev/null \
252260
|| { sudo apt-get update -qq; sudo apt-get install -f -y; }
253261
else
262+
# The runner image carries third-party apt lists (Google Chrome
263+
# among them) that this job does not use, and a transient
264+
# `Hash Sum mismatch` on one of them fails the whole update -- which
265+
# killed two cross-build jobs in setup, before a single byte was
266+
# compiled. Dropping the lists this job has no use for is what makes
267+
# the step's failure mean something about this job.
268+
sudo rm -f /etc/apt/sources.list.d/google-chrome.list \
269+
/etc/apt/sources.list.d/microsoft-prod.list || true
254270
sudo apt-get update -qq
255271
sudo apt-get install -y --download-only wine64 wine \
256272
|| sudo apt-get install -y --download-only wine

.github/workflows/openkal-cross.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,14 @@ jobs:
368368
- name: Install the emulators the last two scripts need
369369
run: |
370370
set -euo pipefail
371+
# The runner image carries third-party apt lists (Google Chrome
372+
# among them) that this job does not use, and a transient
373+
# `Hash Sum mismatch` on one of them fails the whole update -- which
374+
# killed two cross-build jobs in setup, before a single byte was
375+
# compiled. Dropping the lists this job has no use for is what makes
376+
# the step's failure mean something about this job.
377+
sudo rm -f /etc/apt/sources.list.d/google-chrome.list \
378+
/etc/apt/sources.list.d/microsoft-prod.list || true
371379
sudo apt-get update -qq && sudo apt-get install -y -qq qemu-user
372380
"$XLINGS_BIN" install xim:qemu-riscv -y
373381
XLINGS_HOME="${MCPP_HOME:-$HOME/.mcpp}/registry" \

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,14 @@ jobs:
275275

276276
- name: Install system deps + qemu
277277
run: |
278+
# The runner image carries third-party apt lists (Google Chrome
279+
# among them) that this job does not use, and a transient
280+
# `Hash Sum mismatch` on one of them fails the whole update -- which
281+
# killed two cross-build jobs in setup, before a single byte was
282+
# compiled. Dropping the lists this job has no use for is what makes
283+
# the step's failure mean something about this job.
284+
sudo rm -f /etc/apt/sources.list.d/google-chrome.list \
285+
/etc/apt/sources.list.d/microsoft-prod.list || true
278286
sudo apt-get update -qq
279287
sudo apt-get install -y curl git build-essential qemu-user-static
280288
qemu-aarch64-static --version | head -1

0 commit comments

Comments
 (0)