mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-10-11 00:00:13 +08:00
[actions] retry apt package installs through Ubuntu mirror outages
Mirror outages have outlasted the existing retries, which covered only `apt-get update` (and not the WSL `additional-packages` install). Installs now go through `.github/scripts/apt-install.sh`, which retries each request within apt and retries the whole update+install with backoff for about 10 minutes.
This commit is contained in:
@@ -79,21 +79,9 @@ jobs:
|
||||
bash -c '
|
||||
set -ex
|
||||
|
||||
# Retry apt-get update up to 5 times due to flaky Ubuntu mirrors
|
||||
# apt-get update can return 0 even with partial failures, so check for warnings
|
||||
for i in 1 2 3 4 5; do
|
||||
if apt-get update 2>&1 | tee /tmp/apt-update.log | grep -qE "^(W:|E:|Err:)"; then
|
||||
echo "apt-get update had warnings/errors, attempt $i/5"
|
||||
cat /tmp/apt-update.log
|
||||
sleep $((i * 5))
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
apt-get install -y git curl wget make build-essential python zsh libssl-dev
|
||||
sh /workspace/.github/scripts/apt-install.sh git curl wget make build-essential python zsh libssl-dev
|
||||
if [ "$TEST_SHELL" != "sh" ] && [ "$TEST_SHELL" != "bash" ]; then
|
||||
apt-get install -y $TEST_SHELL || true
|
||||
sh /workspace/.github/scripts/apt-install.sh $TEST_SHELL || true
|
||||
fi
|
||||
|
||||
# Use nvm to install Node.js for running urchin
|
||||
|
||||
Reference in New Issue
Block a user