Cache and build on the same machine

build-cache
#1

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 https://blog.bitrise.io/60-percent-faster-builds-force-xcode-use-caching

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?

0 Likes

#2

Hy @hendychrst

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

0 Likes

#3

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.

0 Likes

#5

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.

0 Likes

#6

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

0 Likes

#7

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