Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to copy an xcode derived data cache?

Tags:

xcode

We're using Travis CI (travis-ci.com) to build an xcode iOS project and our project compile time is quite lengthy (5 minutes locally and 15 minutes on travis CI).

To alleviate the compile time we have attempted to cache the DerivedData contents using xcodebuild argument -derivedDataPath and then use the travis cache (https://docs.travis-ci.com/user/caching/) to copy that data back.

The problem is that xcode seems to ignore this cached data. Does anyone know a way to force xcode to use the cache data inside the -derivedDataPath?

like image 856
amleszk Avatar asked Oct 16 '22 09:10

amleszk


1 Answers

Apple replied with this solution, i have not yet tested it.

Apple Developer Relations Dec 20 Engineering has the following feedback for you:

It is expected behavior that file modification times will cause rebuilds. In Travis-CI, however, it may not be the modification times, but rather the device inode changes that are causing the derived data to be considered out of date. Try setting:

defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES

Or pass it on the xcodebuild command-line:

IgnoreFileSystemDeviceInodeChanges=1 xcodebuild …

We are now closing this bug report.

If you have questions or comments about the resolution, please update your bug report with that information so we can respond.

like image 53
amleszk Avatar answered Oct 21 '22 03:10

amleszk