How much time do caching save?

I build a React Native app for both iOS and Android, and these builds take around 13 mins on iOS and 15 mins on Android.
Before getting my hands dirty in caching a bunch of stuff I thought I’d first ask how much time I can expect to save.
My main time-sinks on each platform are

Android

  • npm install | 120 sec
  • RN bundle | 190 sec
  • gradle-runner@1.5.2 | 523 sec

iOS

  • npm install | 125 sec
  • RN bundle iOS | 198 sec
  • xcode-archive@1.10.1 | 353 sec

Should I cache all kinds of builds or only test builds to keep release builds “stable”?
Thanks!

It’s a hard question, as it always depends on the actual project.

A note: the current Cache steps usually have a hard time with node_modules due to the huge number of small files, but might worth a try, every project is different. Might also worth a note that the Cache steps are of course open source too, and you’re free to use the Cache API any way you like.

Based on your numbers above caching might help, but we’re yet to dig into ReactNative projects a bit more, to experiment with caching as well as adding scanner support for RN (so that it’s recognized automatically when you register the repo and get a good base workflow generated, just like what we have for native iOS, Android, Xamarin, macOS apps right now). It’s at the top of our list, so improvements are coming :wink:

1 Like