是否可以复制 xcode 派生数据缓存? [英] Is it possible to copy an xcode derived data cache?

查看:24
本文介绍了是否可以复制 xcode 派生数据缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用 Travis CI (travis-ci.com) 构建一个 xcode iOS 项目,我们的项目编译时间相当长(本地 5 分钟,travis CI 15 分钟).

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).

为了减少编译时间,我们尝试使用 xcodebuild 参数 -derivedDataPath 缓存 DerivedData 内容,然后使用 travis 缓存(https://docs.travis-ci.com/user/caching/) 复制那个数据回来了.

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.

问题是 xcode 似乎忽略了这个缓存数据.有谁知道强制 xcode 使用 -derivedDataPath 中的缓存数据的方法?

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?

推荐答案

Apple 回复了这个解决方案,我还没有测试过.

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

Apple Developer Relations 12 月 20 日工程有以下内容给您的反馈:

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

文件修改时间将导致的预期行为重建.然而,在 Travis-CI 中,可能不是修改时间,而是导致派生数据的设备 inode 更改被认为是过时的.尝试设置:

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:

默认写入 com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges-bool 是

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

或者在 xcodebuild 命令行上传递:

Or pass it on the xcodebuild command-line:

IgnoreFileSystemDeviceInodeChanges=1 xcodebuild ...

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.

这篇关于是否可以复制 xcode 派生数据缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆