Skip to content

Commit

Permalink
Install Ruby via ASDF
Browse files Browse the repository at this point in the history
  • Loading branch information
otherguy committed Apr 22, 2024
1 parent 1126125 commit 28d856a
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ version: 2.1
orbs:
ruby: circleci/[email protected]
sonarcloud: sonarsource/[email protected]
asdf: rynkowsg/[email protected]

# Pipeline parameters
parameters:
Expand All @@ -32,7 +33,6 @@ executors:
macos: # macOS executor running Xcode
macos:
xcode: 15.3.0 # Xcode 15.3 (15E204a), macOS Sonoma14.3.1
resource_class: macos.m1.large.gen1

jobs:

Expand Down Expand Up @@ -78,26 +78,35 @@ jobs:
type: string
default: "3.3.0"
executor: << parameters.os >>
environment:
RUBY_VERSION: << parameters.ruby-version >>
steps:
# Install dependencies based on the OS
- when:
condition:
equal: [ "docker", "<< parameters.os >>" ]
steps:
- run:
name: Install ImageMagick and libvips
command: sudo apt-get update && sudo apt-get -y --no-install-recommends install imagemagick libvips42
name: Install ImageMagick, libvips and libffi
command: |
sudo apt-get update
sudo apt-get -y --no-install-recommends install openssl imagemagick libvips42 libffi-dev
- asdf/install
- when:
condition:
equal: [ "macos", "<< parameters.os >>" ]
steps:
- run:
name: Install ImageMagick and libvips
command: brew install imagemagick vips

name: Install ImageMagick, libvips and libffi
command: |
brew install openssl@3 imagemagick vips asdf libffi
# Install requested Ruby version
- ruby/install:
version: "<< parameters.ruby-version >>"
- run:
name: Install Ruby << parameters.ruby-version >>
command: |
asdf plugin-add ruby
asdf install ruby << parameters.ruby-version >>
asdf global ruby << parameters.ruby-version >>
# Check out code
- checkout
# Install dependencies using bundler
Expand Down

0 comments on commit 28d856a

Please sign in to comment.