π Welcome to Tartelet - a macOS app that launches self-hosted GitHub Actions runners in virtual machines using Tart.
Tartelet makes it a breeze to manage up to two GitHub Actions runners in ephemeral virtual machines on a single host machine. The benefits are that runners can run in parallel and each job runs in an isolated environment that is recreated after each GitHub Actions job has finished.
- π Getting Started
- π¨βπ§ How does it work?
- π How is the performance?
- π©βπ» How can I contribute?
- π€¨ Why is it named Tartelet?
- π Acknowledgements
Please refer to the following articles in the wiki to get started with Tartelet.
Tartelet uses Tart for managing the virtual machines and Tart which in turn uses Apple's Apple's Virtualization framework. The lifecycle of a GitHub Actions runner managed by Tartelet is as follows:
- Tartelet uses Tart to clone a virtual machine.
- The virtual machine is booted.
- After the machine is booted, a setup script is being run. The script downloads the newest version of GitHub's runner application and registers the runner on the GitHub organization.
- The runner listens for a job and executes it.
- After executing the job, the runner automatically removes itself from the GitHub organization.
- The virtual machine is shutdown.
- Tartelet uses Tart to delete the virtual machine.
After the last step the process starts over.
The performance depends on the hardware that the app is running on. When testing on a Mac mini M1 from 2020 with 16 GB memory, we found that our jobs run 3 - 4 times faster than on GitHub's runners.
We found that our jobs run about 12% slower when running two virtual machines in parallel compared to running a single virtual machine. We find this performance cost negligible as running two virtual machines significantly increases our throughput at a low monetary cost.
This means that Tartelet can run two virtual machines at once. This the maximum number of virtual machines that Appleβs Virtualization framework allows us to run at once.
After a job has finished, the virtual machine that ran the job is shut down and destroyed, and a new virtual machine is created and booted. This process takes about 25 - 30 seconds. However, that overhead is insignificant in most cases as Tartelet creates a new virtual machine after each job has finished. This means that a new virtual machine and its GitHub Actions runner are ready to process the next job. Unless there are more jobs queued on GitHub than the number of available virtual machines, the overhead of creating and booting a virtual machine becomes negligible.
These numbers were last updated in January/February 2023.
Pull requests with bugfixes and new features are much appreciated. We are happy to review PRs and merge them once they are ready, as long as they contain changes that fit within the vision of Tartelet.
Clone the repository to get started working on the project.
git clone git@github.com:shapehq/tartelet.git
After cloning the repository you will notice that the project does not contain a .xcodeproj file. This should be generated using XcodeGen. Install XcodeGen using Homebrew by running the following command in your terminal.
brew install xcodegen
After installing XcodeGen the project file can be generated by running the following command.
xcodegen generate
We use SwiftGen to generate constants for images, colors, and localizations. Install SwiftGen using Homebrew by running the following command in your terminal.
brew install swiftgen
Constants for images, colors, and localizations are then generated by running the following command in your terminal.
swiftgen
The swiftgen.yml
file at the root of the repository describes how constants are generated.
To run your project locally it is necessary to update the Tartelet.entitlements
file, updating its Keychain Access Groups
value to one you control. Then in the CompositionRoot.swift
file you can update the KeychainLive
definition with the same value. If you don't do this, the project will not be able to save preference values to the keychain.
We use SwiftLint to ensure uniformity in the code. Install SwiftLint using Homebrew by running the following command in your terminal.
brew install swiftlint
The app is named Tartelet because it builds upon Tart, a source-available CLI for managing macOS virtual machines. Tartelet makes it easy to run multiple virtual machines using Tart. The Danish word for "easy" is "let". "Tart" + "e" + "let" = "Tartelet" and a "tartelet" is a traditional Danish food.
- Tart does all the heavy-lifting of creating, cloning, and running virtual machines.
- Tartelet is heavily inspired by Cilicon.
Tartelet is built with β€οΈ by Shape in Denmark. Oh, and we are hiring π€