cache pods and bundle

This commit is contained in:
Paul Zabelin
2019-01-21 21:20:31 -08:00
parent 1290f156b6
commit 8d3abce39b
2 changed files with 19 additions and 7 deletions

View File

@@ -8,17 +8,26 @@ jobs:
DESTINATION: 'platform=iOS Simulator,name=iPhone XS'
steps:
- checkout
- run: xcrun simctl boot "iPhone XS" # Warm up Simulator, see https://circleci.com/blog/xcodebuild-exit-code-65-what-it-is-and-how-to-solve-for-ios-and-macos-builds/
- run: open '/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app'
- run:
name: Install Gems
command: bundle install
- run: gem install bundler
- 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: 2-pods-{{ checksum "Podfile.lock" }}
- run:
name: Install CocoaPods
command: pushd Example && pod install
command: pod install --project-directory Example
- run:
name: Build and run tests
command: xcodebuild -workspace PerspectiveTransform.xcworkspace -scheme Example test -destination "$DESTINATION" | xcpretty -r junit
command: xcodebuild -workspace Example/PerspectiveTransform.xcworkspace -scheme Example test -destination "$DESTINATION" | xcpretty -r junit
- save_cache:
key: 1-pods-{{ checksum "Podfile.lock" }}
paths:
- Example/Pods
- store_test_results:
path: build/reports
- store_artifacts:

View File

@@ -75,3 +75,6 @@ env:
- XCODE_DESNITATION='platform=iOS Simulator,name=iPhone SE' CACHE_NAME=iOS
- XCODE_DESNITATION='platform=iOS Simulator,name=iPhone 8 Plus' CACHE_NAME=iOS
- XCODE_DESNITATION='platform=iOS Simulator,name=iPhone 8' CACHE_NAME=iOS
branches:
except:
- circleci