SHA256
Mac Node bootstrap and checkout now pass, but Apple-tool preflight stalled after Xcode version output for twenty minutes. Add per-command deadlines and diagnostics without changing licenses/host settings; fourteen preflight/probe regressions pass. Record successful Android build/upload, downloaded APK signature/version and emulator install/launch, and unchanged missing-KVM matrix failures. No Apple app success is claimed.
24 lines
1.0 KiB
Bash
24 lines
1.0 KiB
Bash
#!/usr/bin/env bash
|
|
# Validate prerequisites without installing packages or modifying the runner host.
|
|
set -euo pipefail
|
|
|
|
fail() { printf 'Runner prerequisite: %s\n' "$*" >&2; exit 1; }
|
|
for tool in git curl unzip python3; do
|
|
command -v "$tool" >/dev/null || fail "install $tool in the job environment"
|
|
done
|
|
|
|
case "${1:-}" in
|
|
android|emulator)
|
|
[[ "$(uname -s)" == Linux && "$(uname -m)" == x86_64 ]] || fail 'ubuntu-latest must provide Linux x86_64'
|
|
if [[ "$1" == emulator ]]; then
|
|
[[ -c /dev/kvm && -r /dev/kvm && -w /dev/kvm ]] || fail 'expose /dev/kvm to the job and grant the runner user read/write access (nested virtualization required on VMs)'
|
|
fi
|
|
;;
|
|
ios)
|
|
[[ "$(uname -s)" == Darwin && "$(uname -m)" == arm64 ]] || fail 'macos-arm64 must execute natively on the Apple Silicon host'
|
|
command -v xcodebuild >/dev/null || fail 'install full Xcode and select it with xcode-select'
|
|
python3 "${BASH_SOURCE[0]%/*}/check-apple-tools.py"
|
|
;;
|
|
*) fail 'usage: bash scripts/check-ci-runner.sh android|emulator|ios' ;;
|
|
esac
|