Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Setup #3

Merged
merged 1 commit into from
Sep 29, 2023
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
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@ The repository consists scripts and additional setups for maintaining the build

## Setup Instructions

The CI setup for GitHub Actions runners uses the Virtual Machine app to host a virtual machine that we use as a GitHub Action runner.
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.
1. Set up a macOS machine in conformance with the Stanford device setup requirements: https://uit.stanford.edu/service/StanfordJamf/Install.
2. Install the [UTM App](https://mac.getutm.app). Set up the application to "Open on Login" using the macOS dock context menu of the app. Ensure that you set the UTM settings to never put the host machine to sleep if a VM is running.
2. Install the [UTM App](https://mac.getutm.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.
3. Either generate [new macOS virtual machine using the app](https://docs.getutm.app/guest-support/macos/) 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.
4. 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 ...
4. 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 ...
5. Setup that the VM user automatically logs in when the VM starts: [Apple Support - How to log in automatically to a Mac user account](https://support.apple.com/en-au/HT201476).
6. Disable automatic screen saves, turn off the display, and requiring a passcode when the screen is locked: [Apple Support - Set sleep and wake settings for your Mac](https://support.apple.com/guide/mac-help/set-sleep-and-wake-settings-mchle41a6ccd/mac) and enable the "preserve automatic sleeping when the display is off" setting in the System Settings > Displays > Advanced settings.
6. 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.
7. Ensure that the GitHub runner appears on your GitHub organization or repo.
8. 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](https://docs.getutm.app/scripting/scripting/). Copy the `LaunchVMs` app to the Applications folder of your host VM. Add the UTM App as well as the `LaunchVMs` app as login items: [Apple Support - Open items automatically when you log in on Mac](https://support.apple.com/en-au/guide/mac-help/mh15189/mac).
6. 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](https://support.apple.com/guide/mac-help/set-sleep-and-wake-settings-mchle41a6ccd/mac).
7. 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](https://support.apple.com/en-us/HT201476).
8. 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.
9. Ensure that the GitHub runner appears on your GitHub organization or repo.
10. 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](https://docs.getutm.app/scripting/scripting/). Copy the `LaunchVMs` app to the Applications folder of your host VM. Add the UTM App as well as the `LaunchVMs` app as login items: [Apple Support - Open items automatically when you log in on Mac](https://support.apple.com/en-au/guide/mac-help/mh15189/mac).


## Contributing
Expand Down