macOS and Linux VMs on Apple Silicon to use in CI and other automations
Go to file
Tor Arne Vestbø c6e8d0bfd7
Gracefully stop vm on tart stop (#808)
* Give Virtualization.framework a chance to stop the VM on tart stop

We were letting the CancellationError bubble up all the way until
it terminated app, which meant we didn't hit the shutdown code
in run(), stopping the VM and the network.

We now catch CancellationError and proceed to gracefully shut down.

We only stop the VM if it's still running, as a VM that has been
stopped via the menu can't be stopped again.

* Gracefully shut down VM when Tart is quit via menu

Normally the quit action will result in AppKit calling exit(),
but we want to gracefully shut down the VM, so we use the same
path as for closing of the VM window, namely signal our own
process with SIGINT or SIGUSR1.

If that doesn't work we let AppKit terminate as before.

This fixes the "Warning: NSActivity <_NSActivityAssertion:
0x600001f785a0> was ended multiple times" warning seen on
the console when quitting Tart via the menu.

* Activate Tart after application finishes launching

This ensures that the VM window has been shown by the time we
activate, so that we consistently activate and bring the VM
window to the front.
2024-04-30 09:27:41 -04:00
.ci Lowercase `tart.app` (#751) 2024-03-11 12:23:12 -04:00
.github Added Code Owners (#328) 2022-11-17 22:57:12 -05:00
Resources Fix the --insecure flag issue by disabling ATS in Info.plist (#760) 2024-03-19 03:42:14 -04:00
Sources/tart Gracefully stop vm on tart stop (#808) 2024-04-30 09:27:41 -04:00
Tests/TartTests Fixed Swift Warning (#787) 2024-04-11 19:53:10 +04:00
benchmark Introduce Golang-based benchmarking utility (#769) 2024-03-27 18:45:01 +04:00
docs Document how to mount the shared directory on Linux at boot time (#793) 2024-04-17 23:34:01 -04:00
integration-tests integration-tests: test_run() with --no-graphics (#757) 2024-03-12 15:12:02 +04:00
scripts [docs] lint to Cirrus Runners site (#789) 2024-04-12 21:33:15 +04:00
.cirrus.yml Fixed Swift Warning (#787) 2024-04-11 19:53:10 +04:00
.editorconfig Update dependencies and styles (#12) 2022-03-24 18:54:49 +03:00
.gitignore Move FAQ to documentation website (#383) 2023-01-18 11:58:21 -05:00
.goreleaser.yml Generate shell completions by calling tart.app executable (#775) 2024-04-03 01:22:52 +02:00
.swiftformat Reformat code idents and introduce the SwiftFormat linter (#339) 2022-11-29 15:56:13 +00:00
CONTRIBUTING.md Add CONTRIBUTING.md? (#575) 2023-08-03 13:10:34 -04:00
LICENSE Relicensed under Fair Source License (#415) 2023-02-28 12:22:25 -05:00
Package.resolved tart pull: retry VM pull with exponential backoff (#788) 2024-04-12 21:32:03 +04:00
Package.swift tart pull: retry VM pull with exponential backoff (#788) 2024-04-12 21:32:03 +04:00
README.md Some SEO optimizations (#720) 2024-01-24 12:15:06 -05:00
gon.hcl Build x86 binary (#716) 2024-01-26 13:09:05 +00:00
mkdocs.yml [docs] lint to Cirrus Runners site (#789) 2024-04-12 21:33:15 +04:00

README.md

Tart is a virtualization toolset to build, run and manage macOS and Linux virtual machines (VMs) on Apple Silicon. Built by CI engineers for your automation needs. Here are some highlights of Tart:

  • Tart uses Apple's own Virtualization.Framework for near-native performance.
  • Push/Pull virtual machines from any OCI-compatible container registry.
  • Use Tart Packer Plugin to automate VM creation.
  • Easily integrates with any CI system.

Tart powers Cirrus Runners service — a drop-in replacement for the standard GitHub-hosted runners, offering 2-3 times better performance for a fraction of the price.

Many companies are using Tart in their internal setups. Here are a few of them:

Note: If your company or project is using Tart please consider adding yourself to the list above.

Usage

Try running a Tart VM on your Apple Silicon device running macOS 13.0 (Ventura) or later (will download a 25 GB image):

brew install cirruslabs/cli/tart
tart clone ghcr.io/cirruslabs/macos-sonoma-base:latest sonoma-base
tart run sonoma-base

Please check the official documentation for more information and/or feel free to use discussions for remaining questions.