🛠️ Self-Hosted ephemeral macOS CI on Apple Silicon
self-hosted selfhosted swift virtualization self-hosted-runner ci github-actions m1 m2 macos silicon swiftui
Cilicon is a self-hosted GitHub Action that allows you to run your macOS CI jobs on ephemeral macOS virtual machines on Apple Silicon. This provides a number of benefits over using GitHub's hosted macOS runners, including:
To use Cilicon, you first need to set up a self-hosted runner on your macOS machine. You can find instructions on how to do this in the GitHub documentation. Once you have a self-hosted runner set up, you can add the following to your .github/workflows/*.yml
file:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: apple-silicon-ci/cilicon@v1
with:
# The Xcode version to use
xcode-version: '14.2'
# The macOS version to use (defaults to 'latest')
macos-version: 'latest'
# The amount of memory to allocate to the VM (defaults to '8gb')
memory: '8gb'
# The number of CPUs to allocate to the VM (defaults to '2')
cpus: '2'
# The path to the Xcode project (defaults to 'Package.swift')
project: 'Package.swift'
# The scheme to build (defaults to the target name)
scheme: 'MyTarget'
# Additional arguments to pass to xcodebuild
extra-args: '-workspace MyWorkspace.xcworkspace'
Cilicon supports the following features:
Using Cilicon provides a number of benefits over using GitHub's hosted macOS runners, including:
Cilicon is free to use. There are no charges for using the service or for running CI jobs on Apple Silicon VMs.
If you have any questions or problems using Cilicon, please open an issue on the GitHub repository.