Codemagic IOS构建需要很长时间才能完成 [英] Codemagic IOS build takes a long time to complete
问题描述
我正在尝试在Codemagic上设置我的flutter应用程序,但是为IOS构建大约需要40〜50分钟,日志显示 compiling
文件 .c
和 .cc
,其中很多文件正在编译中.有没有办法使构建速度更快?我是否缺少某些配置?
I'm trying to setup my flutter app on Codemagic, but it takes about 40~50 minutes to build for IOS, the logs shows that is compiling
files .c
and .cc
, there are a lot of those files been compiling.
Is there a way to make the build faster? Am I missing some configuration?
推荐答案
您可以采取一些步骤来缩短构建时间:
There are some steps you can take in order to shorten your build time:
- 正如Mikhail所说,请确保您的build参数中没有-v.详细模式会影响构建时间;
- 查看您的依赖项,并确保您拥有的所有东西都是您需要的.太多无用的依赖项也可能会影响您的构建时间;
- 分别进行测试和构建.我们已经注意到,在进行测试时,构建"步骤有时还会花费更长的时间.因此,请使用测试创建单独的工作流程,并使用仅运行测试"
不幸的是,构建iOS可能需要这么长时间的其他原因不在我们的控制范围内,因此,苹果使构建iOS应用程序比Android和其他类型的限制要复杂得多.
Other reasons why building iOS can take such a long time are unfortunately out of our hands, hence Apple making building iOS apps much more complicated than Android and other type of restrictions.
这里还有一篇很好的文章,介绍了公司如何应对iOS的构建时间: https://medium.com/@SkyscannerEng/hate-to-wait-how-skyscanner-used-module-caching-to-cut-app-build-speed-in-half-e906da1c077e
Heres also a nice article about how companies battle the iOS build time: https://medium.com/@SkyscannerEng/hate-to-wait-how-skyscanner-used-module-caching-to-cut-app-build-speed-in-half-e906da1c077e
这篇关于Codemagic IOS构建需要很长时间才能完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!