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.
38 lines
1.4 KiB
Python
38 lines
1.4 KiB
Python
#!/usr/bin/env python3
|
|
"""Bounded Apple toolchain probes; never install components or change the host."""
|
|
import subprocess
|
|
import sys
|
|
|
|
|
|
def probe(command, timeout=60):
|
|
label = " ".join(command)
|
|
print(f"Runner prerequisite: checking {label} (timeout {timeout}s)", flush=True)
|
|
try:
|
|
result = subprocess.run(command, capture_output=True, text=True, timeout=timeout, check=False)
|
|
except subprocess.TimeoutExpired as error:
|
|
raise RuntimeError(
|
|
f"{label} did not return within {timeout}s. Check selected Xcode, first-launch components "
|
|
"and CoreSimulator in the runner user's interactive login session; run this command there. "
|
|
"CI has not accepted licenses or changed host settings."
|
|
) from error
|
|
except OSError as error:
|
|
raise RuntimeError(f"Cannot start {label}: {error}") from error
|
|
if result.returncode:
|
|
raise RuntimeError(f"{label} exited {result.returncode}: {(result.stderr or result.stdout).strip()}")
|
|
return result.stdout
|
|
|
|
|
|
def main():
|
|
try:
|
|
print(probe(["xcodebuild", "-version"]).strip(), flush=True)
|
|
probe(["xcrun", "--find", "swift"])
|
|
probe(["xcrun", "simctl", "list", "devices", "available"])
|
|
except RuntimeError as error:
|
|
print(f"Runner prerequisite: {error}", file=sys.stderr)
|
|
return 1
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|