Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Lyft iOS tooling infrastructure summary 2022

Keith Smiley
September 28, 2022

Lyft iOS tooling infrastructure summary 2022

Keith Smiley

September 28, 2022

More Decks by Keith Smiley

Other Decks in Programming


  1. Scale Code • 9 apps • 100% Swift since 2015

    rewrite • ~1.5m lines of app code • ~600k lines of test code • Another ~1m lines of generated code • Split across ~2500 different modules People • ~140 committers per month • ~230 commits per week • ~2 tooling engineers
  2. Continuous Integration Hardware • 100 ~85 Intel / ~10 M1

    Mac Minis, many AWS Linux containers • Macs are Bare Metal, managed with ARD • Piloting AWS Mac Minis Software • Buildkite, generated pipelines for many parallel jobs • Xcode upgrades performed quickly, single version supported • Linux CI managed with k8s, runs linters, some Swift • macOS upgrades performed as needed for Xcode
  3. Build Speed CI (Build + Test) • P50: 15 min

    (~2x slower last year) • P95: 30 min (~2x slower last year) • Slowdown mostly due to more tests Local (Build) • Average* build**: ~40s (~1.5 faster than last year) • Still trying to push dev apps • All devs on M1 Max machines now
  4. Tooling • IDE: Xcode with custom XcodeGen based bazel integration

    • Build System: Bazel (now on Android too!) with rules_apple & rules_swift (since early 2019) • Dependency Management: Bazel + Artifactory with custom BUILD files • Caching / Limited remote exec: BuildBuddy • Testing: XCTest & XCUITest
  5. • LLD: ~2x faster than ld64 even after Xcode 14

    improvements • Crossplatform Rust: Low level shared libraries, replacement for C++ (🙊) in some cases • Natively supporting arm64 simulator: Surprising number of issues, Snapshot tests, OpenGL map SDKs, Bazel caching • Automated provisioning profile management: Using the App Store Connect API directly • Dead Code detection blocking PRs • Swift incremental support: Still too slow, >3x clean build times, faster in specific cases • M1s Recent Updates
  6. Pain Points & Plans • Builds times increasing: More dev

    apps • CI machines reaching EOL: Replacing with AWS • More longer running UI tests: Aggressive sharding • Increasing amount of cross platform code: Improve crossplatorm devx • Nearing the end of clear wins: ???
  7. • AWS Mac Minis: Get out of the business of

    hosting hardware • Swift LTO: Some existing bugs, potential nice app size win • Improved IDE experience: Moving to rules_xcodeproj • Unifying more devx between iOS and Android • Remote exec? Still backburner Future plans