diff --git a/.circleci/config.yml b/.circleci/config.yml index 787ae754..ee6433e2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: danger: executor: xcode-14 steps: - - setup + - setup-apple-silicon - run: name: Install xchtmlreport command: | @@ -57,18 +57,24 @@ jobs: swift-package: executor: xcode-14 steps: - - setup + - setup-apple-silicon - run: swift build - run: swift test lint-pod: executor: xcode-14 steps: - - setup + - setup-apple-silicon - lint-pod fastlane-tests: executor: xcode-14 + steps: + - setup-apple-silicon + - run: bundle exec fastlane test_all + + fastlane-tests-xcode-12: + executor: xcode-12 steps: - setup - run: bundle exec fastlane test_all @@ -126,14 +132,15 @@ executors: shell: /bin/bash --login -eo pipefail commands: - setup: - description: "Shared setup" + + setup-apple-silicon: + description: "Shared Apple Silicon setup" steps: - checkout - - restore-gems + - restore-gems-apple-silicon - restore-gems: - description: "Restore Ruby Gems" + restore-gems-apple-silicon: + description: "Restore Ruby Gems: Apple Silicon" steps: - run: name: Ruby Setup @@ -149,6 +156,26 @@ commands: paths: - vendor/bundle + setup: + description: "Shared setup" + steps: + - checkout + - restore-gems + + restore-gems: + description: "Restore Ruby Gems" + steps: + - run: + name: Set Ruby Version + command: echo "ruby-2.5" > ~/.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 + lint-pod: description: "Lints podspec with specified Swift version" parameters: @@ -178,6 +205,10 @@ workflows: filters: tags: only: /.*/ + - fastlane-tests-xcode-12: + filters: + tags: + only: /.*/ - lint-pod: filters: tags: @@ -193,8 +224,11 @@ workflows: - swift-package - fastlane-tests - fastlane-tests-xcode-13 + - fastlane-tests-xcode-12 - lint-pod - carthage-build + - setup-apple-silicon + - setup filters: tags: only: /\d+(\.\d+)*(-.*)*/