Skip to content

Commit

Permalink
Simplify ruby setup per latest CircleCI docs at https://circleci.com/…
Browse files Browse the repository at this point in the history
  • Loading branch information
ZevEisenberg committed Dec 25, 2023
1 parent d0a7abc commit f84ac60
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
24 changes: 10 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
version: 2.1

orbs:
macos: circleci/macos@2

jobs:
swift-package:
executor: xcode-14
Expand Down Expand Up @@ -57,28 +60,21 @@ 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"
- run: bundle install

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 >>

Expand Down
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.6

0 comments on commit f84ac60

Please sign in to comment.