Skip to content
Merged
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
6 changes: 5 additions & 1 deletion scripts/swm-macos-runner/guest/install-runner.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Build VM: install runner, hook, run-job.sh. Args: VERSION SHA256.
# Build VM: install runner, hook, run-job.sh, python3. Args: VERSION SHA256.
# job-started.sh and run-job.sh are already in /tmp.
set -euo pipefail
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Expand All @@ -23,4 +23,8 @@ sudo install -o root -g wheel -m 0755 /tmp/run-job.sh "${job}"
printf 'ACTIONS_RUNNER_HOOK_JOB_STARTED=%s\n' "${hook}" >"${dir}/.env"
grep -q "^ACTIONS_RUNNER_HOOK_JOB_STARTED=${hook}$" "${dir}/.env" || { echo "hook not configured" >&2; exit 1; }
[[ -x "${job}" && -x "${dir}/run.sh" ]] || { echo "runner files missing" >&2; exit 1; }
# Base python3 is CLT 3.9: its pty.spawn never returns on macOS. macos-latest
# has a current one.
brew install --quiet python
python3 -c 'import sys; sys.exit(sys.version_info < (3, 10))' || { echo "python3 is older than 3.10" >&2; exit 1; }
echo "install-runner: ${version} installed"
Loading