Build CLI for macOS ARM64
This commit is contained in:
parent
10f76c2c9e
commit
9dc1bb07c9
|
@ -11,7 +11,7 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-11.0, ubuntu-18.04, windows-2019, self-hosted-linux-arm64]
|
os: [macos-11.0, ubuntu-18.04, windows-2019, self-hosted-linux-arm64, self-hosted-macos-arm64]
|
||||||
include:
|
include:
|
||||||
- os: macos-11.0
|
- os: macos-11.0
|
||||||
ARCH: macos-x86_64
|
ARCH: macos-x86_64
|
||||||
|
@ -29,6 +29,10 @@ jobs:
|
||||||
ARCH: linux-arm64
|
ARCH: linux-arm64
|
||||||
MIME: application/octet-stream
|
MIME: application/octet-stream
|
||||||
EXT: ''
|
EXT: ''
|
||||||
|
- os: self-hosted-macos-arm64
|
||||||
|
ARCH: macos-arm64
|
||||||
|
MIME: application/octet-stream
|
||||||
|
EXT: ''
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
|
@ -43,6 +47,7 @@ jobs:
|
||||||
run: echo ::set-output name=FILE::${{ steps.version.outputs.VERSION }}-${{ matrix.ARCH }}${{ matrix.EXT }}
|
run: echo ::set-output name=FILE::${{ steps.version.outputs.VERSION }}-${{ matrix.ARCH }}${{ matrix.EXT }}
|
||||||
|
|
||||||
- name: Set up Rust
|
- name: Set up Rust
|
||||||
|
if: runner.name != 'macos-arm64'
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
@ -54,6 +59,7 @@ jobs:
|
||||||
run: .\.github\workflows\gcc.ps1
|
run: .\.github\workflows\gcc.ps1
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
|
if: runner.name != 'macos-arm64'
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: '^1.14.0'
|
go-version: '^1.14.0'
|
||||||
|
|
|
@ -103,6 +103,7 @@ jobs:
|
||||||
else
|
else
|
||||||
pathToPython="$(which python)"
|
pathToPython="$(which python)"
|
||||||
fi
|
fi
|
||||||
|
# On macOS ARM64 this may emit a warning like "Couldn't find the symbol `PyInit_minify_html_core` in the native library. Python will fail to import this module." Ignore this message.
|
||||||
maturin build --release --strip -i "$pathToPython"
|
maturin build --release --strip -i "$pathToPython"
|
||||||
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
|
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
|
||||||
twine upload target/wheels/*
|
twine upload target/wheels/*
|
||||||
|
|
Loading…
Reference in New Issue