зеркало из https://github.com/github/ruby.git
refactor extract brew
Use composite action to reduce copy & paste.
This commit is contained in:
Родитель
e8d629ed76
Коммит
34bf2d5085
|
@ -0,0 +1,17 @@
|
|||
name: Setup macOS environment
|
||||
description: >-
|
||||
Installs necessary packages via Homebrew.
|
||||
|
||||
inputs: {} # nothing?
|
||||
|
||||
outputs: {} # nothing?
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
|
||||
steps:
|
||||
- name: brew
|
||||
shell: bash
|
||||
run: |
|
||||
brew upgrade
|
||||
brew install gmp libffi openssl@1.1 zlib autoconf automake libtool readline
|
|
@ -38,11 +38,6 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
|
||||
steps:
|
||||
- name: Install libraries
|
||||
run: |
|
||||
brew upgrade
|
||||
brew install gmp libffi openssl@1.1 zlib autoconf automake libtool readline
|
||||
if: ${{ contains(matrix.os, 'macos') }}
|
||||
- name: git config
|
||||
run: |
|
||||
git config --global advice.detachedHead 0
|
||||
|
@ -50,6 +45,8 @@ jobs:
|
|||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
- uses: ./.github/actions/setup/ubuntu
|
||||
if: ${{ contains(matrix.os, 'ubuntu') }}
|
||||
- uses: ./.github/actions/setup/macos
|
||||
if: ${{ contains(matrix.os, 'macos') }}
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
||||
with:
|
||||
path: .downloaded-cache
|
||||
|
|
|
@ -57,10 +57,7 @@ jobs:
|
|||
path: src/.downloaded-cache
|
||||
key: downloaded-cache
|
||||
- name: Install libraries
|
||||
run: |
|
||||
brew upgrade
|
||||
brew install gmp libffi openssl@1.1 zlib autoconf automake libtool readline
|
||||
working-directory: src
|
||||
uses: ./src/.github/actions/setup/macos
|
||||
- name: Set ENV
|
||||
run: |
|
||||
echo "MAKEFLAGS=-j$((1 + $(sysctl -n hw.activecpu)))" >> $GITHUB_ENV
|
||||
|
|
Загрузка…
Ссылка в новой задаче