From 51f689e0091c587bac3609d45406ef38add5e354 Mon Sep 17 00:00:00 2001 From: Zev Eisenberg Date: Mon, 25 Dec 2023 16:38:20 -0500 Subject: [PATCH] Simplify ruby setup per latest CircleCI docs at https://circleci.com/docs/testing-ios/. --- .circleci/config.yml | 23 +++++++++-------------- .ruby-version | 1 + 2 files changed, 10 insertions(+), 14 deletions(-) create mode 100644 .ruby-version diff --git a/.circleci/config.yml b/.circleci/config.yml index 93c80f12..4f341e27 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,8 @@ version: 2.1 +orbs: + macos: circleci/macos@2 + jobs: swift-package: executor: xcode-14 @@ -57,28 +60,20 @@ commands: description: "Shared setup" steps: - checkout - - restore-gems + - switch-ruby - restore-gems: - description: "Restore Ruby Gems" + switch-ruby: + description: "Switch Ruby" steps: - - run: - name: Set Ruby Version - command: echo "ruby-3.0.6" > ~/.ruby-version - - restore_cache: - key: 1-gems-{{ checksum "Gemfile.lock" }} - - run: bundle check || bundle config set --local path 'vendor/bundle' && bundle install - - save_cache: - key: 1-gems-{{ checksum "Gemfile.lock" }} - paths: - - vendor/bundle + - macos/switch-ruby: + version: "3.0.6" lint-pod: description: "Lints podspec with specified Swift version" parameters: swift-version: type: string - default: "5.0" + default: "5.8" steps: - run: bundle exec pod lib lint --swift-version=<< parameters.swift-version >> diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..818bd47a --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.0.6