The repository consists scripts and additional setups for maintaining the build agents for the Stanford BDHG and related projects.
The CI setup for GitHub Actions runners uses the Virtual Machine app to host a virtual machine we use as a GitHub Action runner. The repository contains the necessary steps, tools, and scripts to set up the environment.
- Set up a macOS machine in conformance with the Stanford device setup requirements: https://uit.stanford.edu/service/StanfordJamf/Install.
- Install the UTM App. Set up the application to "Open on Login" using the macOS dock context menu of the app. Ensure you set the UTM settings to never put the host machine to sleep if a VM is running.
- Either generate new macOS virtual machine using the app or use a preexisting UTM VM. If you use a preexisting bundle that has done all the following steps, you can skip the setup steps.
- Start the VM using the app and go through the setup process with the minimal possible setup, e.g., no location services, no Apple ID, and more ...
- Disable automatic screen saves, turn off the display, and require a passcode when the screen is locked and enable the "preserve automatic sleeping when the display is off" setting in the system: Apple Support - Set sleep and wake settings for your Mac.
- Enable automatic login of the user to ensure that the system is booting properly on restarts of the host Mac: How to log in automatically to a Mac user account.
- Download this repository from GitHub to the VM and run the installation steps by adapting the
.env
file and running$ sh install.sh
. Optionally change the installed Xcode versions in the script. We recommend setting Safari to default to a private window on launch to ensure that any entered credentials or elements are never saved. - Ensure that the GitHub runner appears on your GitHub organization or repo.
- To automate launching the VMs every time the host machine starts up, open the
LaunchVMs
app in this repo using the Apple Script Editor, modify the script, or add additional VMs. You can find a list of possible commands for the UTM App in the UTM documentation. Copy theLaunchVMs
app to the Applications folder of your host VM. Add the UTM App as well as theLaunchVMs
app as login items: Apple Support - Open items automatically when you log in on Mac.
Contributions to this project are welcome. Please make sure to read the contribution guidelines and the contributor covenant code of conduct first.
You can find a list of contributors in the CONTRIBUTORS.md
file.
This project is licensed under the MIT License. See Licenses for more information.