Xcode 项目的持续集成?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/212999/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 02:56:06  来源:igfitidea点击:

Continuous Integration for Xcode projects?

iphonexcodecontinuous-integrationcruisecontrolxcodebuild

提问by Mike Akers

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?

在使用 Hudson 与之前的项目进行持续集成之后,我想为我现在正在处理的 iPhone 项目设置一个持续集成服务器。在做了一些研究之后,似乎没有专门为 Xcode 设计的 CI 引擎,但是有人成功地将 Cruise Control 与 xcodebuild CLI 工具结合使用。这里有人试过这个吗?是否有任何与 Xcode 项目配合良好的 CI 引擎?

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

我可能会尝试一下 Cruise Control。我会根据我的发现发布答案。

采纳答案by Silentcode

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.

我在 mac 上通过 xcodebuild 成功地使用了 Hudson。随着 3.0 iPhone sdk 的发布,您可以对构建项目的目标、配置和 sdk 进行竞争控制。

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

就像在 hudson 中创建构建步骤并告诉 xcodebuild 构建项目一样简单:

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

iPhone 应用程序分发变得简单

回答by Ciryon

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 postexplaining it all and this Ruby scriptthat converts OCUnit output from xcodebuild to the XML format that JUnit uses for test reports. The build server I picked was Hudson.

复活这个线程。我没有找到一个令人满意的解决方案来在构建服务器上通过单元测试获得自动化的 XCode 构建,所以我做了一些调查和编码。结果是这篇博文解释了这一切,这个 Ruby 脚本将 OCUnit 输出从 xcodebuild 转换为 JUnit 用于测试报告的 XML 格式。我选择的构建服务器是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.

2012 年 3 月 2 日更新:我已将其更新为使用一些自定义 shell 脚本来构建和运行。在这里可用。它不仅适用于持续集成,也适用于在您自己的机器上从命令行构建。

回答by Colin Barrett

Adium is using buildbotwith 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.

Adium非常有效地将buildbot与 Xcode 结合使用。我们编写了一个简单的 makefile,它使用适当的目标和配置调用 xcodebuild,但我很确定这是可选的。

回答by Rafael Gorski

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:

Apple 刚刚(2013 年 6 月 10 日)为 OSX Mavericks(OS X 10.9) 发布了一个新的持续集成平台,这是我之前见过的集成度最高的持续集成解决方案。它可从 developer.apple.com 获得,在此页面中有详细信息:

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

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

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

我建议查看有关该主题的 WWDC 2013 演示文稿。

回答by heckj

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.

我已经将 CruiseControl 与 Xcode(类似于 Pragmatic Automation 建议的内容)一起使用,并取得了合理的成功。我也非常熟悉 CruiseControl,它的配置格式设置相对可怕。

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.

我也使用 BuildBot 效果很好,但发现它的优势并不真正符合我的需求(分布式从属构建和跨多个不同系统的报告)。配置 buildbot 设置本身就是一门艺术,尽管这并不困难。基本上都是用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.

由于 Hudson 已经可用,我建议将其作为运行持续集成的途径。它有一个基于 Web 的界面(在我看来,CruiseControl 的主要缺陷)并且在它支持的各种系统中非常灵活。您可以非常轻松且非常明显地调用命令行驱动的构建。也就是说,我还没有使用 Hudson 和 Xcode 设置一个实例,我在其他系统上有这样的实例,所以这部分是我的推测。

回答by Jeffrey Fredrick

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

如果你不介意生活在最前沿,我刚刚为 CruiseControl提交了一个xcode 构建器

回答by catlan

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

我认为您应该仍然可以使用 Hudson。Hudson 非常灵活,还允许您使用 shell 脚本进行构建:Shell 脚本和 Windows 批处理命令

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

只需在那里输入 xcodebuild。查看 xcodebuild 手册页以查看 xcodebuild 的选项。

回答by bentford

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

詹金斯似乎对某些人有效。(虽然,我以前从未使用过任何 CI 服务器。)

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

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

回答by Tinolover

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.

詹金斯工作正常。您可以通过编写自己的 shell 脚本来构建您的 xcode 项目,然后让 Jenkins 运行它,或者您也可以使用 xcode 插件。

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.

但是你必须意识到权限问题。只需对 Jenkins 配置稍作调整,您就可以在很短的时间内管理您的 CI 服务器。