continuous integration with xcode 5 - apple inc. › videos › wwdc › 2013 › 412... ·...

148
These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 412 Continuous Integration with Xcode 5 Andrew Nesbitt Software Engineering Manager, OS X Server

Upload: others

Post on 09-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

These are confidential sessions—please refrain from streaming, blogging, or taking pictures

Session 412

Continuous Integration with Xcode 5

Andrew NesbittSoftware Engineering Manager, OS X Server

Building Better Apps

Building Better AppsUsing continuous integration

Introduction

• Why continuous integration?■ Terminology refresher

• Explore the Xcode service■ Configuring OS X Server■ Bots in Xcode 5■ Web App and Scoreboard

• Best practices

Why Continuous Integration?

Why Continuous Integration?

• Testing on multiple OS versions and hardware models

Why Continuous Integration?

• Testing on multiple OS versions and hardware models• Build, analyze, and test your project often

Why Continuous Integration?

• Testing on multiple OS versions and hardware models• Build, analyze, and test your project often• Catch problems quickly and automatically

Why Continuous Integration?

• Testing on multiple OS versions and hardware models• Build, analyze, and test your project often• Catch problems quickly and automatically• Let a server do the heavy-lifting

Why Continuous Integration?

• Testing on multiple OS versions and hardware models• Build, analyze, and test your project often• Catch problems quickly and automatically• Let a server do the heavy-lifting• Gather build and test history for your project

Why Continuous Integration?

• Testing on multiple OS versions and hardware models• Build, analyze, and test your project often• Catch problems quickly and automatically• Let a server do the heavy-lifting• Gather build and test history for your project• Easily distribute builds to your team

Terminology

Terminology

SchemeRecipe for building

your project

Terminology

SchemeRecipe for building

your project

SHARED

Terminology

SchemeRecipe for building

your project

SHARED

BotAnalyze, build,

test, and archive on a schedule

Terminology

IntegrationA single run

of a bot

SchemeRecipe for building

your project

SHARED

BotAnalyze, build,

test, and archive on a schedule

Bot

Bot

Bot

Bot

• Defines what to build

Bot

• Defines what to build■ Project and SCM information

Bot

• Defines what to build■ Project and SCM information

• When to build it

Bot

• Defines what to build■ Project and SCM information

• When to build it■ Periodic, on-commit, or manual

Bot

• Defines what to build■ Project and SCM information

• When to build it■ Periodic, on-commit, or manual

• How to build it

Bot

• Defines what to build■ Project and SCM information

• When to build it■ Periodic, on-commit, or manual

• How to build it■ Shared scheme

Bot

• Defines what to build■ Project and SCM information

• When to build it■ Periodic, on-commit, or manual

• How to build it■ Shared scheme■ Static analysis

Bot

• Defines what to build■ Project and SCM information

• When to build it■ Periodic, on-commit, or manual

• How to build it■ Shared scheme■ Static analysis■ Testing and devices

Bot

• Defines what to build■ Project and SCM information

• When to build it■ Periodic, on-commit, or manual

• How to build it■ Shared scheme■ Static analysis■ Testing and devices■ Archives

Bot

• Defines what to build■ Project and SCM information

• When to build it■ Periodic, on-commit, or manual

• How to build it■ Shared scheme■ Static analysis■ Testing and devices■ Archives

• Notifications

OS X ServerPreview

Xcode5.0

OS X ServerPreview

Xcode5.0

OS X ServerPreview

OS X Server

OS X Server

• Easy install from the Mac App Store

OS X Server

• Easy install from the Mac App Store• Simple setup

OS X Server

• Easy install from the Mac App Store• Simple setup• Brand new UI

OS X Server

• Easy install from the Mac App Store• Simple setup• Brand new UI

OS X Server

• Easy install from the Mac App Store• Simple setup• Brand new UI• New Xcode service

Xcode Service

• Bonjour discovery

Xcode Service

• Bonjour discovery• Easily create and manage bots that build Mac and iOS projects

Xcode Service

• Bonjour discovery• Easily create and manage bots that build Mac and iOS projects

■ Access settings (bot creators and viewers)

Xcode Service

• Bonjour discovery• Easily create and manage bots that build Mac and iOS projects

■ Access settings (bot creators and viewers)■ Join your server to your development team

Xcode Service

• Bonjour discovery• Easily create and manage bots that build Mac and iOS projects

■ Access settings (bot creators and viewers)■ Join your server to your development team

• Devices

Xcode Service

• Bonjour discovery• Easily create and manage bots that build Mac and iOS projects

■ Access settings (bot creators and viewers)■ Join your server to your development team

• Devices■ Add/Remove devices from your team

Xcode Service

• Bonjour discovery• Easily create and manage bots that build Mac and iOS projects

■ Access settings (bot creators and viewers)■ Join your server to your development team

• Devices■ Add/Remove devices from your team■ Run tests on multiple iOS devices

Xcode Service

• Bonjour discovery• Easily create and manage bots that build Mac and iOS projects

■ Access settings (bot creators and viewers)■ Join your server to your development team

• Devices■ Add/Remove devices from your team■ Run tests on multiple iOS devices

• Hosted Git repositories

Xcode Service

• Bonjour discovery• Easily create and manage bots that build Mac and iOS projects

■ Access settings (bot creators and viewers)■ Join your server to your development team

• Devices■ Add/Remove devices from your team■ Run tests on multiple iOS devices

• Hosted Git repositories• Connect to remote SVN or Git repositories

PreviewOS X Server

Xcode5.0

PreviewOS X Server

Xcode 5

Xcode 5

• New account preferences

Xcode 5

• New account preferences• Create and edit bots in Xcode

Xcode 5

• New account preferences• Create and edit bots in Xcode• Beautiful reports for build and test history

Xcode 5

• New account preferences• Create and edit bots in Xcode• Beautiful reports for build and test history

■ Assistant editor support

Xcode 5

• New account preferences• Create and edit bots in Xcode• Beautiful reports for build and test history

■ Assistant editor support■ Dig into errors, issues, and warnings

Xcode 5

• New account preferences• Create and edit bots in Xcode• Beautiful reports for build and test history

■ Assistant editor support■ Dig into errors, issues, and warnings

■ View test results across multiple devices and over time

Xcode 5

• New account preferences• Create and edit bots in Xcode• Beautiful reports for build and test history

■ Assistant editor support■ Dig into errors, issues, and warnings

■ View test results across multiple devices and over time■ Commit history and logs

Xcode 5

• New account preferences• Create and edit bots in Xcode• Beautiful reports for build and test history

■ Assistant editor support■ Dig into errors, issues, and warnings

■ View test results across multiple devices and over time■ Commit history and logs■ View and download archives of your project

Xcode 5

• New account preferences• Create and edit bots in Xcode• Beautiful reports for build and test history

■ Assistant editor support■ Dig into errors, issues, and warnings

■ View test results across multiple devices and over time■ Commit history and logs■ View and download archives of your project

• Source control integration

DemoContinuous integration in Xcode 5

Brent ShankSoftware Engineer, Xcode

Web Application

Web Application

• A view of your project outside Xcode

Web Application

• A view of your project outside Xcode• See all bots on your server

Web Application

• A view of your project outside Xcode• See all bots on your server• Add and edit bots on the web

Web Application

• A view of your project outside Xcode• See all bots on your server• Add and edit bots on the web• Same reports as Xcode

Web Application

• A view of your project outside Xcode• See all bots on your server• Add and edit bots on the web• Same reports as Xcode• Archives view

Web Application

• A view of your project outside Xcode• See all bots on your server• Add and edit bots on the web• Same reports as Xcode• Archives view

■ Archive and product downloading

Web Application

• A view of your project outside Xcode• See all bots on your server• Add and edit bots on the web• Same reports as Xcode• Archives view

■ Archive and product downloading■ Flagged builds

Web Application

• A view of your project outside Xcode• See all bots on your server• Add and edit bots on the web• Same reports as Xcode• Archives view

■ Archive and product downloading■ Flagged builds■ Build pruning

Web Application

• A view of your project outside Xcode• See all bots on your server• Add and edit bots on the web• Same reports as Xcode• Archives view

■ Archive and product downloading■ Flagged builds■ Build pruning■ iOS product installation on the web

Web Application

• A view of your project outside Xcode• See all bots on your server• Add and edit bots on the web• Same reports as Xcode• Archives view

■ Archive and product downloading■ Flagged builds■ Build pruning■ iOS product installation on the web

• Scoreboard

DemoWeb App and Scoreboard

Best Practices

• Structure your code in workspaces

Best Practices

• Structure your code in workspaces• Use role accounts for remote repositories

Best Practices

• Structure your code in workspaces• Use role accounts for remote repositories• Suggested bots

Best Practices

Best Practices

Best Practices

On commitBuild, test, and run static analysis for

every source change

Best Practices

On commitBuild, test, and run static analysis for

every source change

NightlyBuild your project

at 3am

Best Practices

Per branchCreate a new bot

per branch

On commitBuild, test, and run static analysis for

every source change

NightlyBuild your project

at 3am

How to Get It

How to Get It

• Go to developer.apple.com today

How to Get It

• Go to developer.apple.com today■ OS X 10.9 Mavericks

How to Get It

• Go to developer.apple.com today■ OS X 10.9 Mavericks■ OS X Server preview

How to Get It

• Go to developer.apple.com today■ OS X 10.9 Mavericks■ OS X Server preview■ Xcode 5 preview

How to Get It

• Go to developer.apple.com today■ OS X 10.9 Mavericks■ OS X Server preview■ Xcode 5 preview

• Join your existing ADC teams if you are a team agent/admin

How to Get It

• Go to developer.apple.com today■ OS X 10.9 Mavericks■ OS X Server preview■ Xcode 5 preview

• Join your existing ADC teams if you are a team agent/admin• Bring your existing devices

Summary

• Use the Xcode service to build better apps■ Configure in minutes■ Checkout and build your project automatically■ Catch build issues and errors; run static analysis regularly■ Run tests on multiple devices

• Keep history around for your projects• Easily distribute builds to your team• Integrated tightly with Xcode• Web UI and Scoreboard

Understanding Source Control in Xcode Pacific HeightsFriday 10:15AM

Related Sessions

Testing in Xcode 5 Pacific HeightsThursday 9:00AM

Xcode and Continuous Integration Lab Tools Lab AThursday 9:00AM

Continuous Integration Lab Tools Lab ATuesday 4:30PM

Xcode Lab Tools Lab AFriday 9:00AM

Labs