macOS jobs are 60% of your bill. What are your options?
IntermediateScenarioSpeed, Caching & Cost
Answer
Situation read → macOS minutes have a 10x multiplier in private repos.
What I'd do →
- Run macOS only where required (iOS build and signing), not for lint or unit tests that can run on Linux.
- Run the full macOS matrix on
mainand nightly, a single leg on PRs. - Cache CocoaPods, SPM and DerivedData.
- Path filter so backend changes do not trigger iOS pipelines.
- Evaluate self-hosted Mac minis or a cloud Mac provider for very high volume, including maintenance cost.
Why → Most savings come from not running macOS at all for jobs that do not need it.
Interview tip → Quote the multipliers: Linux 1x, Windows 2x, macOS 10x.
More on Speed, Caching & Cost
`npm ci` takes 4 minutes on every run. Fix it.BeginnerDocker builds take 12 minutes even when only one line of code changed. Speed them up.IntermediateThe repo hits the 10 GB cache limit daily and hit rates are poor. What do you change?IntermediateA job sometimes hangs and burns 6 hours. How do you stop it happening again?BeginnerYour PR matrix is 3 OS times 4 versions (12 jobs). How do you cut cost without losing coverage?AdvancedTest suite takes 30 minutes on one runner. How do you parallelize it in Actions?Intermediate