Title: GitHub Actions macOS jobs slow? Use your own Mac
URL: https://codemany.com/problems/github-actions-macos-slow
Description: GitHub Actions macOS jobs are slow and cost more per minute. See why macos-latest jobs queue and start cold, and how your own Apple silicon Mac fixes it.
All pages as Markdown: https://codemany.com/llms.txt

---

[Home](https://codemany.com/) › [Problems](https://codemany.com/problems)

# Why GitHub Actions macOS jobs are slow

GitHub Actions macOS jobs are slow because hosted Macs are scarce, start cold, and set up Xcode and simulators each run. Your own Apple silicon Mac skips most of that, since Xcode, tools and caches are already on it.

## The short answer

A GitHub Actions macOS job pays three costs. It may wait for a free Mac. It starts on an empty machine. And each minute costs more than a Linux minute. You can trim each one in your workflow. Or you can move the job to a Mac you own.

## Why hosted macOS runners are slow

GitHub macOS runners are virtual Macs. Each job gets a new one, and it is wiped after. There are fewer of them than Linux runners, so jobs can queue. A job on GitHub Actions `macos-latest` also starts with nothing from your last run. Every package, pod and Swift package comes down again.

Hosted Macs also have few cores. The standard one has 3 cores (M1). A big Swift project can use more than that, so builds crawl.

## Xcode install and simulator boot time

The hosted image has several Xcode versions on it. Picking one, resolving packages and booting a simulator all take time. Each run pays that again. Add this step to see what a job gets:

```
- name: Show Xcode and simulators
  run: |
    xcodebuild -version
    xcrun simctl list runtimes
```

## macOS minutes cost more

On GitHub's list prices, a macOS minute is $0.062 (3-core M1). A Linux minute is $0.006 (2-core). So a macOS minute costs about ten times more. Prices change, so check [GitHub's pricing docs](https://docs.github.com/en/billing/reference/actions-runner-pricing).

It adds up fast. Say your team runs 20 builds a day, 15 minutes each. That is 9,000 macOS minutes a month. At $0.062 a minute, that is $558 a month, before free minutes. Slow builds cost twice: in time and in money.

## Quick fixes in your workflow

1. Cache Swift packages and build output:
   ```
   - uses: actions/cache@v4
     with:
       path: |
         .build
         ~/Library/Developer/Xcode/DerivedData
       key: spm-${{ runner.os }}-${{ hashFiles('**/Package.resolved') }}
   ```
2. Run lint, docs and other jobs that don't need a Mac on `ubuntu-latest`.
3. Cancel old runs on the same branch with a `concurrency` group.
4. Pin an image, such as `macos-15`, so a new image can't surprise you.

## Run macOS jobs on your own Mac

Codemany turns your Apple silicon Mac into a runner for your GitHub Actions macOS jobs. Install it, sign in with GitHub and pick your repos. Then change one line:

```
runs-on: [self-hosted, codemany, xcode]
```

GitHub still schedules the jobs and shows the logs. Jobs you leave on `macos-latest` keep running on GitHub, so you can move one at a time.

Jobs use the Xcode, simulators and tools already on your Mac. Each job gets a fresh single-use runner. You pay $20 a month for 2 machines, not by the minute ([pricing](https://codemany.com/pricing)). You need Apple silicon and macOS 14 or later. Intel Macs are not supported.

Jobs run as your user. So only run workflows you trust. Setup takes a few minutes: see the [Mac runner guide](https://codemany.com/docs/guides/mac-runner), [iOS and Xcode builds](https://codemany.com/docs/guides/ios-xcode) and [Mac runners](https://codemany.com/features/mac-runners). Speed tests are on the [benchmarks page](https://codemany.com/benchmarks).

## Questions

### Why do macOS jobs wait so long to start?

Hosted macOS capacity is limited, so jobs can queue.

### Does my own Mac need a fresh install for CI?

No. Jobs use the Xcode and tools already on it.

### Is it safe?

Mac jobs run as your user, so only run workflows you trust.

## Related

Read next: [Mac runner guide](https://codemany.com/docs/guides/mac-runner), [iOS and Xcode builds](https://codemany.com/docs/guides/ios-xcode), [Mac runners](https://codemany.com/features/mac-runners) and [benchmarks](https://codemany.com/benchmarks).

[Start a 14-day trial](https://codemany.com/pricing) $20 a month for 2 machines. No card needed.
