Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

Background ● Currently ~5 apps ○ bazel query 'kind(ios_application, //...)' ● Total size of apps ○ 100% Swift, 0% Objective-C ○ App code: 8k files, ~550 kloc ○ Test code: 1k files, ~100 kloc ○ Generated code: many files, ~300 kloc ● Commit activity ○ ~50 commits per day ○ ~80 committers per month

Slide 3

Slide 3 text

● Mac Minis (~100) for Xcode specific jobs, many Linux containers (AWS) ● On premises for Macs (maintained by us), Cloud for containers ● Macs are manually maintained (OS and software, no VMs) ● Xcode upgrades are done very soon after each release ● Less than 8 minutes PR to merge times CI Build Infrastructure

Slide 4

Slide 4 text

CI Automation & Resource Management ● Buildkite for Macs, Jenkins for Linux ● Parallel execution ● Only build / test changes based on bazel query ● Build cache is populated from CI only

Slide 5

Slide 5 text

● Daily alphas ● Weekly release trains ● Beta and release builds shipped automatically from release branches ● Mostly automated with App Store Connect API Release management

Slide 6

Slide 6 text

Repositories ● Git / GitHub everywhere ● iOS monorepo, Lyft in general is hybrid ● Mainly trunk based, some feature release branches ● Main challenges ○ Polyrepos ○ Feature branches

Slide 7

Slide 7 text

Build Dependency Management ● Dependency managers ○ Cocoapods, Carthage, Buck ○ ✅ Bazel, Custom ○ ❄ SPM, Make ● How many libs/dependencies does the main app(s) have ○ ~20 external deps included as precompiled static frameworks ○ ~600 internal “module” deps per app ● How are internal and external dependencies used ○ External deps have a review process and are kept to a minimum ○ External deps are not yet in Bazel, we have an in-house tool for this ● Main challenges ○ The custom stuff means has meant implementing some support in Bazel ○ Xcode integration with bazel

Slide 8

Slide 8 text

Build System ● Build tools ○ Buck, Gradle ○ ✅ Bazel ○ Xcode/xcodebuild, Custom ● Build cache ○ Currently, Google RBE ● Main challenges ○ Bazel isn’t resilient to cache instability ○ IDE integration ○ Need to spin up custom remote execution service

Slide 9

Slide 9 text

Local IDE experience ● Still supporting legacy xcodebuild projects ○ Hopefully removed by EOY ○ Can still generate smaller projects that only include all transitive dependencies ● Added focused mode for much smaller projects ○ Takes <10s to generate project ○ Supports indexing (lyft/index-import), debugging, testing, most Xcode features ○ Builds use remote cache, and are debuggable locally! ○ Disabled CarbonBlack endpoint detection sped up builds by up to 50%

Slide 10

Slide 10 text

Testing Infra ● Test types ○ XCTest + XCUITest ● Test metrics ○ 5k unit tests, runs in multiple jobs on CI ○ Very few UI tests, non blocking, run in ~10 minutes async ● Devices / VM / Simulators testing? ○ All simulator testing on bare metal Mac Minis ● Tests runner/driver ○ Bazel / xctestrun (xcodebuild) / xctestrunner (xcodebuild) ● Main challenges ○ Async test flakiness ○ Simulator flakiness

Slide 11

Slide 11 text

2019 Progress ● Moved to in house Mac Minis ● Moved to bazel ● Got bazel working in Xcode

Slide 12

Slide 12 text

No content