Skip to content
Latchkey

macOS Jobs Migration Strategy for Latchkey

macOS minutes are billed at a steep multiplier. The fastest win is to stop running on macOS anything that does not truly need it.

macOS runners cost several times more per minute than Linux. The right strategy is surgical: move all Linux-capable jobs to Latchkey for the ~69% cut, keep only genuine Apple-toolchain work on macOS, and minimize those minutes.

Strategy

  1. Audit which jobs actually require macOS (Xcode, codesigning, Apple SDKs) vs run there by habit.
  2. Move every Linux-capable job (lint, unit tests, JS/Go/Rust builds) to Latchkey Linux runners.
  3. Keep only true Apple-toolchain jobs on macOS, and split them so only the macOS-required steps run there.
  4. Cache aggressively on the remaining macOS jobs to cut their minutes.
  5. Track the macOS minute count before/after to confirm the drop.

Before and after

Before: .github/workflows/ci.yml
jobs:
  test:
    runs-on: macos-latest   # expensive - even for Linux-capable work
    steps:
      - uses: actions/checkout@v4
      - run: npm ci && npm test

Split the work

After: .github/workflows/ci.yml
jobs:
  test:
    runs-on: latchkey-small   # Linux-capable -> cheap Latchkey
    steps:
      - uses: actions/checkout@v4
      - run: npm ci && npm test
  ios-build:
    runs-on: macos-latest    # only the Apple-toolchain step stays
    steps:
      - uses: actions/checkout@v4
      - run: xcodebuild -scheme App build

Gotchas

  • Do not force Apple-toolchain work onto Linux - keep genuine macOS jobs on macOS.
  • Watch the matrix: an os: [ubuntu, macos] matrix can be doubling Linux work onto macOS needlessly.
  • Codesigning and notarization must stay on macOS; isolate them into their own small job.

What you gain

Most pipelines have far more Linux-capable work than they realize. Moving that to Latchkey cuts ~69% off the bulk of your minutes and shrinks the costly macOS surface to only what truly needs Apple hardware.

Key takeaways

  • macOS minutes are the priciest - minimize them.
  • Move all Linux-capable jobs to Latchkey now.
  • Isolate genuine Apple-toolchain steps into small macOS jobs.

Related guides

See what you would save - Latchkey managed runners with self-healing. Start free →