XCode bot需要很长时间才能集成

时间:2014-05-30 05:58:46

标签: ios xcode build continuous-integration xcode-bots

我构建CI服务器并使用Xcode bot来构建我的项目。我有一个问题,为什么机器人需要很长时间才能整合(超过30分钟)。似乎Xcode bot必须检查所有源代码,以便为每个集成构建。清洁项目后,即使我从头开始正常构建也只需要大约15分钟。第二次集成比第一次更快。我想知道当Xcode机器人集成时会发生什么。它是检查每个集成的新源代码还是仅更新旧源代码?为什么需要这么多时间?

1 个答案:

答案 0 :(得分:0)

我有类似的问题。事实证明,CI服务器上检出的目录名源代码已损坏。我从位于MyProject - iOS目录中的项目创建了Xcode Bot,这些信息被传送到没有正确处理空间的机器人。

如果您查看日志,您会看到目录名已转义为MyProject%20-%20iOS,然后又转移到MyProject%2520-%2520iOS

Mar  2 10:56:01  [3230] <Info>: Will attempt to update checkout cache for bot
Mar  2 10:56:01  [3230] <Info>: Xcode Source Control Blueprint was valid.
Mar  2 10:56:01  [3230] <Info>: About to update/checkout:
    https://ciuser@code-ci.mycompany.com/MyProject Branch: develop into MyProject%20-%20iOS/ 
Mar  2 10:56:01  [3230] <Warning>: Could not load cached workspace: Error Domain=XCSIntegrationService Code=2 "The repositories have changed since the last integration. Falling back to a clean checkout." UserInfo={NSLocalizedDescription=The repositories have changed since the last integration. Falling back to a clean checkout.}
Mar  2 10:56:01  [3230] <Warning>: An error occurred updating existing checkout: Error Domain=XCSIntegrationService Code=2 "The repositories have changed since the last integration. Falling back to a clean checkout." UserInfo={NSLocalizedDescription=The repositories have changed since the last integration. Falling back to a clean checkout.}
Mar  2 11:04:31  [3230] <Info>: 0.40% Compressing objects: 4% done
Mar  2 11:10:26  [3230] <Info>: Counting objects: 69562, done.
Mar  2 11:10:26  [3230] <Info>: 13.57% Receiving objects: 1,7 MB done
[...cut...]
Mar  2 11:35:45  [3230] <Info>: Completed checkout of:
    https://ciuser@code-ci.mycompany.com/MyProject Branch: develop (@24cec9eca484405f7d2819f3652e34f67853b6fe) into MyProject%2520-%2520iOS/ 

要解决问题,我必须删除机器人,将存储库目录名从MyProject - iOS更改为MyProject,然后从头开始创建机器人。