mirror of
https://github.com/utmapp/utmapp-runner.git
synced 2026-12-01 07:53:18 -10:00
- Automatic login: sysadminctl set autoLoginUser but left the previous user's password in /etc/kcpassword (macOS 27), so the machine stopped at the login screen. Write and verify /etc/kcpassword ourselves, and treat automatic login as working only if the stored password authenticates (probe-user.sh, verify). - Command Line Tools: move to a separate "clt" step, which also updates outdated tools after a macOS upgrade (Homebrew refuses to build squid with them). softwareupdate offers them even when current, so the step reinstalls every time; add --skip to leave it out. - Xcode: accept an .xip already on the runner (--xcode-xip-on-runner / XCODE_XIP_ON_RUNNER) and delete the .xip only once the whole step succeeds. - Squid: remove a leftover sh.brew.squid LaunchAgent (Homebrew 7 label) and check for the patch without a pipefail-unsafe pipe. Update squid-patch. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
123 lines
5.0 KiB
Bash
123 lines
5.0 KiB
Bash
# Settings for the macOS CI runner. Sourced by bootstrap.sh (bash).
|
|
#
|
|
# Everything a re-image might change lives here. Do NOT put secrets in this
|
|
# file: it is committed. Secrets come from the git-ignored backup made by
|
|
# backup.sh (SECRETS_DIR below), the environment, or prompts -- see README.md.
|
|
#
|
|
# To override a value without editing this file, put the assignment in
|
|
# config.local.env (git-ignored), which is sourced after this one.
|
|
|
|
# ---------------------------------------------------------------- connection --
|
|
|
|
# Address (or ~/.ssh/config alias) of the machine and the admin account that
|
|
# MacStadium provisions. The network is expected to be set up already by the
|
|
# provider. Set RUNNER_HOST in config.local.env; it is deliberately not
|
|
# committed.
|
|
RUNNER_HOST=""
|
|
SSH_PORT="22"
|
|
ADMIN_USER="administrator"
|
|
|
|
# Public key installed into ADMIN_USER's authorized_keys if key login does not
|
|
# work yet (you will be asked for the provisioned password once).
|
|
SSH_PUBLIC_KEY_FILE="$HOME/.ssh/id_ed25519.pub"
|
|
|
|
# Optional file, relative to this repo, with more public keys to authorize for
|
|
# ADMIN_USER (one per line). Leave empty to skip.
|
|
SSH_AUTHORIZED_KEYS_FILE=""
|
|
|
|
# Where the setup files are copied on the runner, relative to ADMIN_USER's home.
|
|
REMOTE_STAGING_DIR="runner-setup"
|
|
|
|
# Where backup.sh stores the machine's secrets (SSH host keys, the Squid CA,
|
|
# runner registrations, the automatic login password), relative to this repo.
|
|
# bootstrap.sh restores them from here instead of generating new ones. It MUST
|
|
# stay git-ignored; backup.sh refuses to write anywhere that is not.
|
|
SECRETS_DIR="secrets"
|
|
|
|
# ------------------------------------------------------------------- machine --
|
|
|
|
# 1 = yes, 0 = no
|
|
DISABLE_SPOTLIGHT=1
|
|
SCREEN_SHARING=1 # VNC; useful to look at the runner's desktop
|
|
SSH_DISABLE_PASSWORD_AUTH=1 # keys only; applied only after key login works
|
|
SOFTWARE_UPDATE_AUTO_DOWNLOAD=1
|
|
SOFTWARE_UPDATE_AUTO_INSTALL_MACOS=1
|
|
SOFTWARE_UPDATE_CRITICAL=1 # security responses and XProtect data
|
|
|
|
# --------------------------------------------------------------------- users --
|
|
|
|
RUNNER_USER="runner"
|
|
RUNNER_FULL_NAME="runner"
|
|
|
|
# The account macOS logs in at boot. The runners are LaunchAgents that need a
|
|
# GUI session (simulators, keychain), so this should be RUNNER_USER.
|
|
AUTOLOGIN_USER="runner"
|
|
|
|
# ---------------------------------------------------------------- homebrew ----
|
|
|
|
HOMEBREW_PREFIX="/opt/homebrew"
|
|
|
|
# ------------------------------------------------------------------- squid -----
|
|
|
|
# Extra arguments for squid-patch/deploy.sh, e.g. "--force-config".
|
|
# (--system is always passed.)
|
|
SQUID_DEPLOY_ARGS=""
|
|
|
|
# Must match the http_port in squid-patch/squid.conf.
|
|
SQUID_PROXY_HOST="127.0.0.1"
|
|
SQUID_PROXY_PORT="3128"
|
|
|
|
# ------------------------------------------------------------------- xcode -----
|
|
|
|
# Local path to an Xcode .xip to upload and install (or pass --xcode-xip).
|
|
# Download it from https://developer.apple.com/download/all/ -- run
|
|
# tools/latest-xcode.sh to find the newest one the runner's macOS supports.
|
|
XCODE_XIP=""
|
|
|
|
# Or the path of an .xip that is already on the runner (absolute, or relative
|
|
# to ADMIN_USER's home, e.g. "Downloads/Xcode_26.3_Apple_silicon.xip"), or pass
|
|
# --xcode-xip-on-runner. Ignored when XCODE_XIP is set.
|
|
XCODE_XIP_ON_RUNNER=""
|
|
|
|
# Or a URL the runner can download the .xip from directly (e.g. a pre-signed
|
|
# bucket URL). Ignored when either of the above is set.
|
|
XCODE_XIP_URL=""
|
|
|
|
# Name under /Applications. Empty = Xcode_<version>.app (e.g. Xcode_26.3.app),
|
|
# which is what UTM's build.yml expects via its HOST_XCODE_PATH variable.
|
|
XCODE_APP_NAME=""
|
|
|
|
XCODE_SELECT=1 # make the new Xcode the default
|
|
XCODE_PLATFORMS="iOS visionOS" # simulator runtimes to download
|
|
XCODE_COMPONENTS="MetalToolchain" # extra components (Xcode 26+)
|
|
XCODE_DELETE_XIP=1 # delete the .xip from the runner once the xcode step succeeds
|
|
|
|
# ---------------------------------------------------------- github actions ----
|
|
|
|
# Organization (https://github.com/ORG) or repository (https://github.com/ORG/REPO).
|
|
GITHUB_URL="https://github.com/utmapp"
|
|
RUNNER_GROUP="Default"
|
|
|
|
RUNNER_COUNT=4
|
|
RUNNER_NAME_PREFIX="macstadium" # runners are named macstadium-1 .. macstadium-N
|
|
RUNNER_LABELS="" # extra labels, comma separated; self-hosted,macOS,ARM64 are automatic
|
|
|
|
RUNNER_VERSION="latest" # or e.g. "2.337.0"
|
|
RUNNERS_DIR="actions" # relative to RUNNER_USER's home: ~/actions/runner-N
|
|
RUNNER_WORK_DIR="_work"
|
|
|
|
# git settings for RUNNER_USER. The UTM build clones through the proxy.
|
|
RUNNER_GIT_POSTBUFFER="157286400"
|
|
RUNNER_GIT_SSLVERIFY="false"
|
|
|
|
# Python and Ruby packages installed for RUNNER_USER (--user). These mirror what
|
|
# UTM's build.yml installs on GitHub-hosted runners.
|
|
RUNNER_PIP_PACKAGES="six pyparsing pyyaml setuptools distlib mako"
|
|
RUNNER_GEMS="xcpretty"
|
|
|
|
# Weekly purge of DerivedData / SwiftPM / clang caches (0 = Sunday).
|
|
XCODE_CACHE_CLEANUP=1
|
|
XCODE_CACHE_CLEANUP_WEEKDAY=0
|
|
XCODE_CACHE_CLEANUP_HOUR=3
|
|
XCODE_CACHE_CLEANUP_MINUTE=15
|