Guides
How to cut Xcode build times in CI
Xcode builds take twenty minutes on every run.
7 min read
Xcode builds take twenty minutes on every run.
Why it happens
DerivedData is discarded, so every run is a clean build including full type-checking.
How to fix it
- Persist DerivedData between runs — the single biggest win available
- Pin the Xcode version so the cache is not invalidated by an image update
- Find slow expressions with -Xfrontend -warn-long-expression-type-checking=200
- Split large modules so one change does not invalidate everything
- Use an M4 runner — Swift compilation is strongly single-thread sensitive
Your next build could be twice as fast, at half the price
Start free. Migrating away is the same one line, and we publish that diff too.
Related
How to speed up iOS simulator testsSimulator tests take half an hour.How to handle iOS code signing in CISigning works locally and fails intermittently in CI.How to notarise macOS apps in CINotarisation is slow and occasionally times out.Fixing macOS runner disk exhaustionJobs fail with no space left on device on macOS.