Please consider caching developer tool dependencies in Xcode Cloud workflows

Number:rdar://FB9139368 Date Originated:2021-06-08
Status:Open Resolved:
Product:Xcode Product Version:
Classification:Suggestion Reproducible:
As a maintainer of a complex iOS project, we rely on numerous third party developer tools in order to bootstrap the development environment prior to building or running the actual iOS project itself. 

As an example, there are many dependency managers outside of the app itself that we rely on to do this:

- Homebrew for other dependency managers
- rbenv & ruby-build for a Ruby installation
- Bundler for gems such as fastlane and CocoaPods
- Mint for Swift Package executable tools such as XcodeGen, SwiftLint and R.swift 

As a best practice for many of these tools, it is not practical to check the compiled binaries or cloned dependencies into the iOS project repo. Instead we just hold lockfiles and other files to pin versioning and then run a bootstrap script to update any dependencies on the machine when required. 

Since the temporary workflow environments Xcode Cloud come installed with only Xcode and Homebrew, for our script we could invoke our bootstrap script and install all of these dependencies in order to generate a complete Xcode Project that can then go onto building our app, but this would come with a significant increase in build times that would simply not be acceptable on every single run of a workflow.

For Xcode Cloud to be a viable solution for projects with complex tooling dependencies, we need a way to cache some of this setup. Other platforms such as GitHub Actions offer similar functionality that allow you to define given paths and triggers for cache invalidation and it would be great if Xcode Cloud could also offer the same.

Thanks again for the work on the platform, I hope that one day I can use it for our project!


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!