Continuous Integration for Xcode projects?
Asked Answered
D

9

57

After using Hudson for continuous integration with a prior project, I want to set up a continuous integration server for the iPhone projects I'm working on now. After doing some research it looks like there aren't any CI engines designed specifically for Xcode, but one guy has had success using Cruise Control combined with the xcodebuild CLI tool. Has anyone here tried this? Are there any CI engines that work well with Xcode projects?

I'm probably going to give Cruise Control a try. I'll post an answer with my findings.

Durstin answered 17/10, 2008 at 17:10 Comment(2)
The link in comment above no logner worksKarisa
@yegor256 is it really possible to run Docker with Xcode? I didn't found base image with OS X at Docker Hub :(Atencio
D
37

I'm successfully using Hudson on the mac with xcodebuild. With the release of the 3.0 iPhone sdk you have compete control over the target, configuration and sdk that the project is to be built against.

It's as simple as creating a build step in hudson and telling xcodebuild to build the project:

xcodebuild -target "myAppAppStore" -configuration "DistributionAppStore" -sdk iphoneos2.1

The upfront work has paid off for me as my builds just work without any additional thought. I've written a detailed description on my blog if anyone is interested.

iPhone app distribution made easy

Divert answered 25/7, 2009 at 18:43 Comment(0)
D
14

Resurrecting this thread. I didn't find a satisfactory solution to getting automated XCode builds with unit tests on a build server so I did some investigating and coding. The result is this blog post explaining it all and this Ruby script that converts OCUnit output from xcodebuild to the XML format that JUnit uses for test reports. The build server I picked was Hudson.

Update 3/2 2012: I have updated this to use some custom shell scripts for building and running. Available here. It's good not only for continuous integration, but also building from command line on your own machine.

Duality answered 31/1, 2010 at 18:29 Comment(0)
R
10

Adium is using buildbot with Xcode quite effectively. We wrote a simple makefile that calls xcodebuild with the proper targets and configurations, but I'm pretty sure that's optional.

Recor answered 17/10, 2008 at 17:39 Comment(1)
Adium rocks! (uh... sorry for the off-topic comment. couldn't resist the opportunity to show some appreciation)Hydrocortisone
F
10

Apple just release (June 10th, 2013) for OSX Mavericks(OS X 10.9) a new continuous integration platform which is the most integrated continuous integration solution that I have seen before. It is available from developer.apple.com, here in this page has the details:

https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/xcode_guide-continuous_integration/

I recommend to see the wwdc 2013 presentation on the topic.

Flytrap answered 13/6, 2013 at 21:1 Comment(1)
This is great! Xcode finally getting some proper Testing toolsHumanitarian
V
9

I've used CruiseControl with Xcode (similiar to what Pragmatic Automation suggested) and had reasonable success. I'm also very familiar with CruiseControl and it's relatively horrific configuration format setup.

I've also used BuildBot to good effect, but found that it's strengths didn't really match my needs (distributed slaves building and reporting across multiple different systems). Configurating buildbot setups can be an art in and of itself, although it's not difficult. It's all essentially writing scripts in python.

Since Hudson has become available, I'd recommend it as an avenue for running continuous integration. It has a web based interface (CruiseControl's primary deficiency in my mind) and is very flexible in the various systems that it supports. You can invoke command line driven builds quite easily and very obviously. That said, I haven't set up an instance using Hudson and Xcode, where I have for the other systems, so this is partially speculation on my part.

Vala answered 20/10, 2008 at 18:49 Comment(0)
S
5

I think you should be still able to use Hudson. Hudson is very flexible and allows you also to use shell scripts for building: Shell Scripts and Windows Batch Commands

Just enter there xcodebuild. Take a look at the xcodebuild man page to see the options of xcodebuild.

Sideband answered 18/10, 2008 at 14:30 Comment(0)
C
5

If you don't mind living on the cutting edge I've just committed an xcode builder for CruiseControl.

Caritacaritas answered 27/11, 2008 at 11:30 Comment(0)
S
2

Jenkins seems to work well for some people. (Although, I have never used any CI server before. )

https://wiki.jenkins-ci.org/display/JENKINS/Xcode+Plugin

Scuffle answered 7/6, 2012 at 17:3 Comment(0)
B
1

Jenkins works fine. You can Either build your xcode project by writing your own shell script then let Jenkins run it, or you can also use xcode plugin.

But you have to be aware of the authority problem. With little tweaks in Jenkins configurations, you'll be able to manage your CI server in very little time.

Benzofuran answered 21/8, 2012 at 2:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.