ikieEngineeringGet started
All posts

CIGitHub ActionsDeveloper tools

We moved CI to one Mac Studio

Once PR pushes passed 100 a day, GitHub Actions burned about 2,900 minutes in a single day. We moved every job to four runners on one Mac Studio, took GitHub-hosted runner usage to zero, and ran into a few things while sharing that machine with iOS builds and simulators.

한국어

ikie is built by a small team working alongside many Claude Code sessions. Each session opens PRs, so PR pushes passed 100 a day. On October 16, 2026 alone, 582 workflow runs and 1,382 jobs ran on GitHub-hosted runners. Counted the way GitHub bills, with each job rounded up to the minute, that came to about 2,900 minutes.

Meanwhile we had a Mac Studio that stays on anyway, for iOS builds and simulators. So we moved all of CI onto that Mac. No jobs run on GitHub-hosted runners today.

First, run less

Before moving anything, we cut how much runs.

  • Merges to main run only the build. Tests already ran on the PR, and anything that breaks after merging is caught by main's build and the next PR.
  • Screenshot comparison (screens) no longer runs on main either.
  • The job that comments on each PR with what changed in our code graph (the ontology) ran separately and took about 2 minutes per PR. It now runs inside the build job.

Moving to one Mac

We started four runners on the same Mac and moved tests and builds to runs-on: [self-hosted, ikie-ci]. On the Mac, we deliberately use what's left over between jobs.

  • We keep node_modules (1 GB, 40,000 files) instead of deleting it. Deleting and reinstalling cost about 45 seconds per job. If the hash of the Node version and the lockfile matches, npm ci is skipped.
  • Caches live on the Mac's disk and are copied out with APFS clones (cp -c). A clone points at the same blocks instead of copying the data, so it's nearly free.
  • Lint, type checks and the ontology check run in the background while next build runs.

We kept the test sharding we used on GitHub-hosted runners (three shards balanced by measured per-file times) so we can go back one day. On a single Mac, not splitting turned out faster. Three shards took 70–107 seconds each, while one job took 51 seconds. Each shard repeated the same setup, and they fought over the same cores. The required check went from test (1)(2)(3) to a single test.

Sharing one machine

Most of what we hit after the move came down to "who else is using this computer?"

  • Development sessions run on the same Mac. The Mac's load average once climbed to 260–430, mostly from sessions on the Mac running the full check before pushing. Now sessions run only the checks that touch what changed (check:quick) and leave the full run to CI.
  • iOS builds come first. Runners run at a lower priority than iOS builds (nice 10), which is why the test timeout is a generous 120 seconds.
  • Test files share modules. Test files that don't replace modules with fakes (vi.mock) now share modules without isolation. The full test run went from 145 to 121 seconds, and CPU time dropped about 16%.

Screenshots with a browser in Docker

Screenshot tests compare pixels with saved images. Font rendering differs by operating system, so a browser on macOS won't match images taken on Linux. So the app (Next) runs on the Mac, and only the browser runs in Docker, from the Linux Playwright image, connected remotely. The test database is Postgres in Docker too.

This had a few bumps as well. Docker's default credential store hung image pulls when running under the runner service, so we switched to a configuration without credentials. When Docker Desktop was off, the job waited three minutes before failing. Now it fails immediately with the reason. On a busy runner, a sheet was sometimes captured before its details loaded, so the test now waits for them before taking the picture.

How long things take now

Show the numbers
JobMedian
Tests (including lock wait)106 s
PR build104 s
main build75 s
Screenshots148 s
Median time per job on October 17.

No job has run on GitHub-hosted runners since midday on October 17.

There are trade-offs we accepted. If the Mac sleeps or shuts down, checks don't pass; they wait. For a long absence, one PR switching runs-on back to GitHub-hosted runners is enough, which is why we kept the sharding. And since the machine is shared, CI runs up to about twice as slow when the Mac is busy.

What we learned

Moving CI was less about swapping runners and more about deciding who uses one computer, and when. One test run at a time, iOS builds first, sessions check only what changed. And keeping what's left between jobs, installed packages and caches, turned out to be the biggest win GitHub-hosted runners could never give us.

The ikie teamikie is a calendar for your events and to-dos in one place. Here we write about the problems we run into while building it, and how we solve them.