iOS Build Infrastructure at Square

20
iOS Build + Test Infrastructure MICHAEL TAURASO Foundation Team

Transcript of iOS Build Infrastructure at Square

Page 1: iOS Build Infrastructure at Square

iOS Build + Test Infrastructure MICHAEL TAURASO

Foundation Team

Page 2: iOS Build Infrastructure at Square

What do we do?

Robots to Build and Test your App.Make

Page 3: iOS Build Infrastructure at Square

What do we do?

Robots to Build and Test your App.Magic

Page 4: iOS Build Infrastructure at Square

What do we do?

Developer Happiness

Page 5: iOS Build Infrastructure at Square

What do we do?

Find issues before shipping

Page 6: iOS Build Infrastructure at Square

Well Actually…

Servers

Configure machines

Get Xcode to behave

Software

Developers know what is being built

Self-service builds

Page 7: iOS Build Infrastructure at Square

ServersVirtualization is bad for builds :(

Our Hardware

Dual Core Mac Minis 16 GB RAM 256GB Solid State Drive $1,200 each

Page 8: iOS Build Infrastructure at Square

ServersDeploy Studio

Network boot Installs Xcode + SDKs Configuration for Xcode

Ansible

Checked in machine config Idempotent Hipster Puppet Easy to change + Add tools

Swarm for Jenkins

No web-configuration Tight with Jenkins version

Page 9: iOS Build Infrastructure at Square

Servers

Page 10: iOS Build Infrastructure at Square

Taming Xcode

10.10 ♥ 6Tame OS X First

Match latest versions with Xcode Never Sleep (caffeinate command) Always have a GUI Context

Tame Xcode

TCC Database Dev tools Security

Paranoia

Updates off SSH mostly off Spotlight off Bonjour off VNC off

Page 11: iOS Build Infrastructure at Square

Servers

Page 12: iOS Build Infrastructure at Square

Servers

“A challenge to an icon-obsessed culture.. increasingly interposing itself between

people and the physical world”

Page 13: iOS Build Infrastructure at Square

Software

What is CI + Release’s Interface to Developers?

Page 14: iOS Build Infrastructure at Square

SoftwareChecked in configuration defines what to build

Release Code builds the config

Page 15: iOS Build Infrastructure at Square

Software

Page 16: iOS Build Infrastructure at Square

Version everything

CocoaPods Bundler Know what you’re building with

Software

Often or Per-AppRarely

COMPONENT CHANGE

Page 17: iOS Build Infrastructure at Square

Software

Examine your iOS Signing files today https://github.com/emonti/pliney

xcodebuild will gleefully burn your toast.

Code Signing

Entitlements MobileProvision Certificates

Page 18: iOS Build Infrastructure at Square

SoftwareiOS Simulator

`xcrun simctl` Control the Simulator Make a new sim for every run Restart everything between runs

Page 19: iOS Build Infrastructure at Square

Statistics3x as many Tests run on every PR

Build Stability 85% -> 99.5%

Ask any Square iOS Developer about mobuild

Page 20: iOS Build Infrastructure at Square

[email protected]

@mtauraso