Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions .github/scripts/install-openshell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,28 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
source "${SCRIPT_DIR}/openshell-version.sh"

echo "Installing OpenShell ${OPENSHELL_VERSION} (${OPENSHELL_SHA})"
curl -LsSf "https://raw.githubusercontent.com/NVIDIA/OpenShell/${OPENSHELL_SHA}/install.sh" \
| OPENSHELL_VERSION="v${OPENSHELL_VERSION}" sh

# Retry the entire install pipeline (curl | sh) with exponential backoff.
# The upstream install.sh internally downloads the .deb from GitHub Releases,
# which can fail on transient CDN errors. Retrying only the outer curl would
# not cover that inner download, so we retry the full pipeline.
max_attempts=3
attempt=1
delay=5
while true; do
if curl -LsSf --retry 3 --retry-delay 5 \
"https://raw.githubusercontent.com/NVIDIA/OpenShell/${OPENSHELL_SHA}/install.sh" \
| OPENSHELL_VERSION="v${OPENSHELL_VERSION}" sh; then
break
fi
if (( attempt >= max_attempts )); then
echo "::error::OpenShell install failed after ${max_attempts} attempts" >&2
exit 1
fi
echo "::warning::OpenShell install attempt ${attempt}/${max_attempts} failed, retrying in ${delay}s..." >&2
sleep "${delay}"
(( attempt++ ))
(( delay *= 3 ))
done

openshell --version
Loading