Hi,
I managed to get cocoapods to load from the cache, but am not sure how to check if the podfile.lock has changed and install pods if it has.
Is there a build in function for this in CircleCI or if not, how can it be done?
I have this config and have commented out the pod install. This loads from the cache and fastlane succeeds. If I uncomment this, restoring the cache doesnt have an effect as pods are installed anyway.
unit_tests:
macos:
xcode: "10.2.0"
environment:
FL_OUTPUT_DIR: output
FASTLANE_LANE: unit_tests
shell: /bin/bash --login -o pipefail
steps:
- checkout
- restore_cache:
keys:
- v1-gems-{{ checksum "Gemfile.lock" }}
- v1-gems-
- run:
name: Install gems
command: bundle install
environment:
BUNDLE_PATH: vendor/bundle
- save_cache:
key: v1-gems-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- restore_cache:
keys:
- v1-pods-{{ checksum "Podfile.lock" }}
- v1-pods-
#- run:
# name: Install pods
# command: pod install
- save_cache:
key: v1-pods-{{ checksum "Podfile.lock" }}
paths:
- ./Pods
- run:
name: Fastlane
command: bundle exec fastlane $FASTLANE_LANE
environment:
BUNDLE_PATH: vendor/bundle
- store_artifacts:
path: output
- store_test_results:
path: output/scan