mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Unified action for installing macos deps (#7379)
* Add `install-macos-deps` action * Use new action
This commit is contained in:
1 parent
abfb51efc9
commit
f680f8a181
2 files changed
+53
-6
No files matched your search
@@ -0,0 +1,47 @@
|
||||
# This action installs a few dependencies necessary to build RustPython on macOS. By default it installs
|
||||
# autoconf, automake and libtool, but can be configured depending on which libraries are needed:
|
||||
#
|
||||
# ```
|
||||
# - uses: ./.github/actions/install-macos-deps
|
||||
# with:
|
||||
# openssl: true
|
||||
# libtool: false
|
||||
# ```
|
||||
#
|
||||
# See the `inputs` section for all options and their defaults. Note that you must checkout the
|
||||
# repository before you can use this action.
|
||||
#
|
||||
# This action will only install dependencies when the current operating system is macOS. It will do
|
||||
# nothing on any other OS (Linux, Windows).
|
||||
|
||||
name: Install macOS dependencies
|
||||
description: Installs the dependencies necessary to build RustPython on macOS.
|
||||
inputs:
|
||||
autoconf:
|
||||
description: Install autoconf (autoconf)
|
||||
required: false
|
||||
default: "true"
|
||||
automake:
|
||||
description: Install automake (automake)
|
||||
required: false
|
||||
default: "true"
|
||||
libtool:
|
||||
description: Install libtool (libtool)
|
||||
required: false
|
||||
default: "true"
|
||||
openssl:
|
||||
description: Install openssl (openssl@3)
|
||||
required: false
|
||||
default: "false"
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Install macOS dependencies
|
||||
shell: bash
|
||||
if: ${{ runner.os == 'macOS' }}
|
||||
run: >
|
||||
brew install
|
||||
${{ fromJSON(inputs.autoconf) && 'autoconf' || '' }}
|
||||
${{ fromJSON(inputs.automake) && 'automake' || '' }}
|
||||
${{ fromJSON(inputs.libtool) && 'libtool' || '' }}
|
||||
${{ fromJSON(inputs.openssl) && 'openssl@3' || '' }}
|
||||
@@ -135,9 +135,8 @@ jobs:
|
||||
components: clippy
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Set up the Mac environment
|
||||
run: brew install autoconf automake libtool
|
||||
if: runner.os == 'macOS'
|
||||
- name: Install macOS dependencies
|
||||
uses: ./.github/actions/install-macos-deps
|
||||
|
||||
- name: run clippy
|
||||
run: cargo clippy ${{ env.CARGO_ARGS }} --workspace --all-targets ${{ env.WORKSPACE_EXCLUDES }} -- -Dwarnings
|
||||
@@ -299,9 +298,10 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Set up the Mac environment
|
||||
run: brew install autoconf automake libtool openssl@3
|
||||
if: runner.os == 'macOS'
|
||||
- name: Install macOS dependencies
|
||||
uses: ./.github/actions/install-macos-deps
|
||||
with:
|
||||
openssl: true
|
||||
|
||||
- name: build rustpython
|
||||
run: cargo build --release --verbose --features=threading,jit ${{ env.CARGO_ARGS }}
|
||||
|
||||
Reference in new issue
Block a user