chromium-setup/install-deps.sh
Philip Peterson a084710b65 Add exec subcommand; split monolithic build.sh into per-phase scripts
exec runs a command/script against an already-provisioned server (from a
prior up), without provisioning or tearing down -- lets the CI workflow
split a build into separately-visible steps (Sync, gn gen, Build v8, ...)
that all share one box.

sync.sh also fixes a real bug found in ci run #54: chromium's own gclient
hooks run update_depot_tools_toggle.py --disable partway through sync,
which can win a race against depot_tools' python3 wrapper's own
first-use bootstrap and leave python3_bin_reldir.txt missing for the next
phase's install-build-deps.py. Forcing the bootstrap before sync starts
sidesteps the race.
2026-08-04 12:15:07 -08:00

25 lines
746 B
Bash

#!/usr/bin/env bash
# Install-build-deps phase: run via `hetzner-runner exec -script install-deps.sh`
# against a box already synced by sync.sh in an earlier step.
set -euo pipefail
: "${CHROMIUM_ROOT:=/root/chromium-ci}"
export PATH="$HOME/depot_tools:$PATH"
retry() {
local desc="$1"; shift
local attempt=1
local max=5
until "$@"; do
if [ "$attempt" -ge "$max" ]; then
echo "$desc failed after $attempt attempts, giving up"
return 1
fi
echo "$desc failed (attempt $attempt/$max); retrying in 5s"
attempt=$((attempt + 1))
sleep 5
done
}
# Already root on this box -- no sudo/no_new_privs wrinkle to work around.
retry "install-build-deps" "$CHROMIUM_ROOT/src/build/install-build-deps.py" --no-prompt