r/cicd • • Aug 10 '26

Built a local GitHub Actions runner because act has no real way to test macOS jobs in isolation ,wondering if that's a problem for anyone else

I keep hitting the same wall: push a change, wait for GitHub Actions, watch a macOS job fail on something that has nothing to do with my actual code. Tried act to catch this before pushing works great for Linux jobs, but macOS jobs get mapped onto a Linux container too, by default. There's a flag to opt out of Docker on macOS (-P macos-latest=-self-hosted), but all that does is run the job directly in your own terminal, with whatever's already installed and whatever state your machine happens to be in. Not isolated, not reproducible, and it doesn't help at all if you're not already on a Mac. So "passes locally" never really meant "passes."

So I've been building it myself. Linux jobs run in real Docker like you'd expect; macOS jobs actually boot a real, fresh macOS VM and run there, same as a real GitHub hosted runner gives you, not your own terminal state. The part I care about more than the macOSthing specifically when something still behaves differently locally than it would on real GitHub, it tells you instead ofquietly giving you a different result and calling it a pass.

Not posting a link yet, genuinely just trying to figure out if this is a real problem for other people before I sink more time into it, versus something I personally got burned by enough times to build a whole tool over. If you ship to macOS from CI: is this something you'd actually use, or is act's approximation good enough in practice?

0 Upvotes

10 comments sorted by

1

u/RealYethal Aug 16 '26

Run the local job in tart vm

1

u/DevForgeX Aug 16 '26

Yes ,booting the VM is the easy part, honestly. The real work is parsing your actual workflow file and running the real marketplace actions inside it ,a bare VM doesn't know any of that exists, you'd be hand translating steps every time the workflow changes.

1

u/RealYethal Aug 16 '26

No, just boot the vm and run act inside as local run

1

u/DevForgeX Aug 16 '26

Fair point on the VM, but a fresh Tart VM has nothing installed and act's -self-hosted mode doesn't install toolchains, it just assumes the host already has them. So you'd hit "not found" on Node/Go/whatever the second you boot a clean one. Ended up building real installers for that too.

1

u/RealYethal Aug 16 '26

Just install homebrew inside and run brew bundle on a Brewfile commited to the repo. Ensures your ci and local environment uses the same toolchains. Alternatively join the church of nix and start using e.g devenv.

1

u/DevForgeX Aug 19 '26

Fair, and if your workflow already installs via brew/nix, mirrorci(building) just runs that step as-is, no issue. But most real workflows use actions/setup-node@v4-style actions or just assume the tool's already on the image, not a Brewfile and a separately maintained Brewfile that drifts from what CI actually runs is its own way to get local/CI disagreeing again. That's kind of the exact problem I'm trying to avoid.

1

u/RealYethal Aug 19 '26

Yeah but the solution is to stop using actions/setup-whatever and use the same toolchain on ci as you do locally