Add a backup Ubuntu package mirror in CI (#66841) (cherry-pick to preview) (#66845)

Cherry-pick of #66841 to preview

----
## Summary

Add the Clarkson Ubuntu mirror fallback used by Delta, restricted to
GitHub Actions. Append it to existing Namespace archive and security
mirror lists before installing Linux dependencies.

This intentionally does not rewrite direct source URLs. CI will test
whether the existing runner configuration is sufficient. Local developer
runs remain unchanged.

## Validation

- `bash -n script/linux`
- `git diff --check`
- Real-runner dependency installation is being checked by PR CI.

Release Notes:

- N/A

Co-authored-by: Cole Miller <cole@zed.dev>
This commit is contained in:
zed-zippy[bot]
2026-11-11 16:29:27 +00:00
committed by GitHub
parent 44372cd67e
commit 5db8ed0c65
+10
View File
@@ -19,6 +19,16 @@ EOF
# Ubuntu, Debian, Mint, Kali, Pop!_OS, Raspbian, etc.
apt=$(command -v apt-get || true)
if [[ -n $apt ]]; then
if [[ "${GITHUB_ACTIONS:-}" == "true" ]]; then
# Namespace's Ubuntu sources use these mirror lists; other runners may not.
for mirror_file in /etc/apt/apt-mirrors.txt /etc/apt/apt-security-mirrors.txt; do
if [[ -f "$mirror_file" ]] && ! grep -Fxq 'https://mirror.clarkson.edu/ubuntu/' "$mirror_file"; then
printf '\n%s\n' 'https://mirror.clarkson.edu/ubuntu/' | \
$maysudo tee -a "$mirror_file" > /dev/null
fi
done
fi
deps=(
gcc
g++