NDM*_*DEV 8 continuous-integration build ios cocoapods circleci
我正在开发的iOS应用程序使用CircleCI进行自动测试和更多CI操作.我们确实让它在CircleCI上编译并运行,但编译时间大约需要9分钟.我需要以某种方式减少编译时间.我想了几个选择:
YML代码的一部分:
# Specify the Xcode version to use
macos:
xcode: "9.2.0"
shell: /bin/bash --login -eo pipefail
steps:
- checkout
- run: git submodule sync
- run: git submodule update --init --remote
- run:
name: Set Ruby Version
command: echo "ruby-2.4" > ~/.ruby-version
- restore_cache:
key: 1-gems-{{ checksum "Gemfile.lock" }}
- run: bundle check || bundle install --path vendor/bundle
- save_cache:
key: 1-gems-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- restore_cache:
key: 1-pods-{{ checksum "Podfile.lock" }}
- run:
name: Install CocoaPods
command: |
curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
bundle exec pod install
- save_cache:
key: 1-pods-{{ checksum "Podfile.lock" }}
paths:
- ./Pods
# Build the app
- run:
name: Build app
command: |
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
bundle exec fastlane match adhoc
bundle exec fastlane adhoc
# uploading app to testobject
- run:
name: Upload app
command: |
curl -u user -X POST https://testobject.com:443/api/storage/upload -H "Content-Type: application/octet-stream" --data-binary @./builds/app.ipa
Run Code Online (Sandbox Code Playgroud)
pod文件:
pod 'OpenCV2' // Problem transforming to framework as it is too large for github
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Fabric', '~> 1.7.2'
pod 'Crashlytics', '~> 3.9.3'
pod 'Apollo' // MATBE this can be a framework too
pod 'SwiftyJSON' // This can be a framework
pod 'RealmSwift', // This can be a framework
pod 'Kingfisher', '~> 4.0'
pod 'Hero'
pod 'MaterialComponents/TextFields'
pod 'MaterialComponents/AppBar'
pod 'Material', '~> 2.0'
Run Code Online (Sandbox Code Playgroud)
有关如何减少构建时间的任何建议?
| 归档时间: |
|
| 查看次数: |
1235 次 |
| 最近记录: |