Use composite action to reduce copy & paste.
This commit is contained in:
卜部昌平 2023-06-29 17:02:49 +09:00
Родитель e8d629ed76
Коммит 34bf2d5085
3 изменённых файлов: 20 добавлений и 9 удалений

17
.github/actions/setup/macos/action.yml поставляемый Normal file
Просмотреть файл

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

7
.github/workflows/check_dependencies.yml поставляемый
Просмотреть файл

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

5
.github/workflows/macos.yml поставляемый
Просмотреть файл

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