ios - XCode 机器人需要很长时间才能集成

标签 ios xcode build continuous-integration xcode-bots

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

最佳答案

我遇到了类似的问题。结果是 checkout 的目录名源代码在 CI 服务器上损坏了。我从位于 MyProject - iOS 目录中的一个项目创建了 Xcode Bot,此信息被传送到未正确处理空格的 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 并从头开始创建机器人。

关于ios - XCode 机器人需要很长时间才能集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23948014/

相关文章:

ios - 如何将自定义搜索范围过滤到 Xcode (8) 中的特定工作区?

ios - 如何在 Swift 中将对象数组发送到服务器?

unit-testing - 在 Mesos 上运行 make check 时,其中一项测试失败,现在怎么办?

ios - Xcode png图片导入及代码实现

ios - 获得最高可用的 AVCaptureSessionPreset

iOS7 tableview自定义单元格图像内存

build - 从Bamboo REST API获取应用程序的构建统计信息

ios - React-native iOS : Cocoapods could not find compatible version for pod "Firebase/CoreOnly" ,"Google-Maps-iOS-Utils" & "GoogleMaps"

iOS 谷歌标签管理器在启动时崩溃 'NSParseErrorException',原因 : 'Last tag: 116 should be 124'

linux - 如何为busybox中的每个小程序构建ELF文件?