Downloading CocoaPods specs from S3 instead of Git

We have recently enabled a feature that will allow CocoaPods to download the specs over HTTP instead of Git. This will considerably speed up the specs checkout step when running CocoaPods and therefore reduce the total build time for iOS builds.

The feature has been automatically enabled for all customers who use our inferred iOS dependency commands. If you are using iOS inference for the dependencies step, you will notice a new step, Fetch CocoaPods specs, in your build:

At this moment the feature is only available as an inferred step.

We maintain the service that downloads the specs from Git and makes them available over HTTP. The specs on our HTTP service are updated every 30 minutes.

Please add a comment here if you have any questions about this functionality.

2 Likes

One of my projects simply didnā€™t start to use the new step, even though Iā€™m using iOS inference for the dependencies step, can you help me to include this new step in my builds?

Hi Cesar, could you please reach out to support via the in-app support dialog? Weā€™ll take a look at that.

1 Like

Hi, our plan here is the Seed one, I think Iā€™m not able to reach out via in-app support =( Is it possible for you to message me or maybe help me through the forum?

Sorry for confusion.

Could you please post your circle.yml file here, removing all the confidential data that might be in it?

Also, could you please check if you are overriding inference commands in your projectā€™s settings in the CircleCI UI?

here is the circle.yml:

machine:
pre:
- sudo rm ā€˜/usr/local/bin/rakeā€™
- sudo rm ā€˜/usr/local/bin/rdocā€™
- sudo rm ā€˜/usr/local/bin/riā€™
- brew install ruby && brew link --overwrite ruby
xcode:
version: "8.0"
environment:
XCODE_SCHEME: "xxx"
XCODE_WORKSPACE: ā€œxxx/xxx.xcworkspaceā€

dependencies:
pre:
- sudo pip install transifex-client
- if [ true ]; then [[ ! -s ā€œ$(git rev-parse --git-dir)/shallowā€ ]] || git fetch --unshallow; fi
cache_directories:
- ā€œ~/.cocoapodsā€
- "Pods"
post:
- gem cleanup
- gem update fastlane

test:
override:
- echo ā€œthere are no tests yetā€

deployment:
staging: # just a label; label names are completely up to you
branch: /^(?!master$).*/ commands: - tx push -s - agvtool new-version -all (git rev-list --count HEAD)
- fastlane xxx1
production:
branch: master
commands:
- agvtool new-version -all $(git rev-list --count HEAD)
- fastlane xxx2

exactly now Iā€™m overriding the inference commands in the UI but simply because I needed to install cocoapods, but even in builds where there were nothing there I still had the problem in which this new step doesā€™nt appear even though in another project the step was added.

The faster downloads of CocoaPods specs from S3 are currently only available through the inference commands. Therefore if you override the inference commands in your circle.yml or in the project settings, the step will not be run.

Could you please try removing the override for the dependency commands in the project settings and see if the download step gets run then? Thanks.

I removed the override for the dependency commands in the project settings but the download step still doesā€™t not run. Do you have any other suggestions? Thanks!

Could you please try pushing a new commit to your project so that a build with new settings is generated?

Hi Alexey,

Me and Cesar work on the same team.
We just pushed a new commit but the build didnā€™t use the new inferred option.
Iā€™m not sure if itā€™s related, but the ā€œInstall CocoaPodsā€ step is not being inferred either.

Thanks for your help

I see, thank you for elaborating on that.

Do you have your Podfile and Podfile.lock checked into the repo? Is the Pods directory also checked in?

We have both Podfile and Podfile.lock checked in the repo.
The Pods folder is not checked in and it is listed on the the .gitignore

If your Podfile located in the root of the repo?

Could you please try rebuilding without cache? Part of the Pods directory might have been cached and that might be preventing the inferred dependency commands from running.

Thanks.

The Podfile is in the root of the repo.

I just tried rebuilding without cache but I got the same resultsā€¦

More ideas?

We found the problem.
There was a file committed inside the Pods folderā€¦
Thanks for the help and sorry for not noticing this before!

Any idea when this will be available outside of iOS inference? The inference step is picking up other things I donā€™t want to run so Iā€™m not able to use this, as far as I can tell.

It is now possible to use this feature without iOS inference. Please check out this post for an example. Thanks!