summaryrefslogtreecommitdiff
path: root/.github/actions/setup/macos/action.yml
blob: 5da7c6d44cfb2c786da6e3f908e142ae18d0f282 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Setup macOS environment
description: >-
  Installs necessary packages via Homebrew.

inputs: {} # nothing?

outputs: {} # nothing?

runs:
  using: composite

  steps:
    - name: brew
      shell: bash
      run: |
        brew install --quiet jemalloc gmp libffi openssl@3 zlib autoconf automake libtool

    - name: Set ENV
      shell: bash
      run: |
        dir_config() {
          local args=() lib var="$1"; shift
          for lib in "$@"; do
            args+="--with-${lib%@*}-dir=$(brew --prefix $lib)"
          done
          echo "$var=${args[*]}" >> $GITHUB_ENV
        }
        dir_config ruby_configure_args gmp
        dir_config CONFIGURE_ARGS openssl@3