Xcode bot takes so long to integrate

I create a CI server and use the Xcode bot to create my project. I have one question why the bot takes so long to integrate (more than 30 minutes). It seems that the Xcode bot should check all the source code for each integration. Even my normal build from scratch after a cleanup project takes only about 15 minutes. The second integration is only faster than the first time. I wonder what happens when the Xcode bot integrates. Is it checking the new source code for each integration, or just updating the old source? why does it take so long?

+4
source share
1 answer

I had a similar problem. It turned out that the source code for the directory name was extracted, damaged on the CI server. I created Xcode Bot from a project located in a directory MyProject - iOS, this information was passed to a bot that did not handle spaces correctly.

If you look at the log, you will see that the directory name went to MyProject%20-%20iOS, and then back to 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/ 

To fix the problem, I had to remove the bot, change the repository directory name from MyProject - iOSto MyProjectand create a bot from scratch.

0
source

Source: https://habr.com/ru/post/1542601/


All Articles