How we sped up Android and iOS builds by 68% on CI
Article Summary
Duolingo's engineers were stuck waiting 50 minutes for every CI build. That's hundreds of hours wasted every week across the team.
The Test and Release Infrastructure team tackled this head-on, cutting Android and iOS build times by 68% through systematic experimentation. They tested everything from hardware upgrades to caching strategies, documenting what worked and what flopped.
Key Takeaways
- Upgraded to AWS r7a instances for Android (21% faster) and M2 Macs for iOS (60% faster)
- Gradle remote S3 caching eliminated redundant compilations, saving 25% on Android builds
- Switching from KAPT to KSP plus Kotlin upgrades delivered another 30% improvement
- SwiftPM dependency caching shaved 4 minutes off every iOS build
- Pipeline parallelization reduced Android serial execution time by 20%
Critical Insight
Build times dropped from 50 minutes to under 16 minutes, making developers noticeably happier and shipping faster.