Git clone step takes more than 3 minutes, in my mahcine it takes only 1min, and 8s in circleci for the same repo.
Environment:
Where did the issue happen?
Xcode 9.2.x
Which build Step causes the issue and which version of the step?
git-clone
version: 4.0.5
Reproducibility
Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
Why it takes less on Circle CI? Because they cache your source code by default.
By default we don’t store your source code, the source code is only accessed on the build machine, and only in the way you specify it.
If you want us to store your source code you can configure the Build Cache to do so. You can find a related guide at: How to Cache the Source Code directory
Keep in mind that this means:
Everything in the source dir will be stored (in the cache), including artifacts / files generated into the source dir.
You will store a copy of the source code on our servers.
Another alternative might be to specify a Clone Depth for the Git Clone step, so that it won’t fetch the whole history every time.
Always depends on the setup - I’d suggest you to check the Cache:Push step’s log, it prints what things it caches and how long things take. To optimize the cache you should try to minimize the number of files cached in general.
If you’d need more help feel free to copy paste a related build’s bitrise.io URL (where you have the cache setup) and we’ll try to look into it ASAP
In the config you linked you have the Cache:Pull step after Git Clone. That won’t help with speeding up Git Clone at all, as right now it does a full clean git clone first and only after that it pulls the cache
If all you’d like to cache is the source code then I’d suggest you to have this step sequence:
I think the .git folder is not included in the cache by default? Would it be possible to set this up? We’re cloning a repo from Europe that takes 10 minutes (vs 30 sec when pulled from github in the US)…
Hi @teameh! The repo is not cached by default, though if you manually set up caching for that directory in the step options, I don’t believe we have any special filter in place to ignore the .git directory. If you could provide the build URL (app.bitrise.io/build/<build-slug>) where you’re experiencing the issue, I’d be happy to look into it.