$30 off During Our Annual Pro Sale. View Details »

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. View Slide

  2. Scale
    ● 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
    ● ~140 committers per month
    ● ~230 commits per week
    ● ~2 tooling engineers

    View Slide

  3. Continuous Integration
    ● 100 ~85 Intel / ~10 M1 Mac Minis, many AWS Linux containers
    ● Macs are Bare Metal, managed with ARD
    ● Piloting AWS Mac Minis
    ● 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

    View Slide

  4. 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

    View Slide

  5. View Slide

  6. 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

    View Slide

  7. ● 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

    View Slide

  8. 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: ???

    View Slide

  9. ● 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

    View Slide

  10. Questions?

    View Slide

  11. View Slide