From 9dc1bb07c9957c7020d893db7face548bbaddea3 Mon Sep 17 00:00:00 2001 From: Wilson Lin Date: Fri, 12 Nov 2021 17:14:22 +1100 Subject: [PATCH] Build CLI for macOS ARM64 --- .github/workflows/cli.yml | 8 +++++++- .github/workflows/python.yml | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 1cd7c98..7051c84 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: 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: - os: macos-11.0 ARCH: macos-x86_64 @@ -29,6 +29,10 @@ jobs: ARCH: linux-arm64 MIME: application/octet-stream EXT: '' + - os: self-hosted-macos-arm64 + ARCH: macos-arm64 + MIME: application/octet-stream + EXT: '' steps: - uses: actions/checkout@v1 @@ -43,6 +47,7 @@ jobs: run: echo ::set-output name=FILE::${{ steps.version.outputs.VERSION }}-${{ matrix.ARCH }}${{ matrix.EXT }} - name: Set up Rust + if: runner.name != 'macos-arm64' uses: actions-rs/toolchain@v1 with: toolchain: stable @@ -54,6 +59,7 @@ jobs: run: .\.github\workflows\gcc.ps1 - name: Set up Go + if: runner.name != 'macos-arm64' uses: actions/setup-go@v2 with: go-version: '^1.14.0' diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 8525b26..25ce77b 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -103,6 +103,7 @@ jobs: else pathToPython="$(which python)" 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" if [[ "$GITHUB_REF" == refs/tags/v* ]]; then twine upload target/wheels/*