Cache and build on the same machine

Hello, I managed to get my build cache on DerivedData working with steps of:

  1. Cache-pull
  2. Recursive Touch
  3. Cache-push.

By following this

However, this works when the build triggered on the same machine. I realised that if you build on different machine on Bitrise, the cache won’t take any effect and my build will be rebuilt from clean state.

Is there any way to trigger a build on the same machine when cache is exist?
Am I doing something wrong with the bitrise workflow, so it won’t get rebuilt on the same machine?

Hy @hendychrst

the xcode archive should be after recursive touch to use the cached derivedData folder. :upside_down_face:

Also just to clarify, a machine is created and assigned to your build as soon as it starts and destroyed right after, there is no way to sustain or re-use the build machines.

Yeah, just confirmed it seems this trick only works until Xcode 10.1.
When I moved my stack into Xcode 10.2.1 it won’t work.

Thanks for confirming this! As mentioned on Intercom, we’re looking into it! :slight_smile:

We have this step deprecated as it will not work with newer versions of Xcode, and also it was not reliable in daily development.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.