From 29e7b1c18705cbb534c2d8cabe11f66731524ac0 Mon Sep 17 00:00:00 2001 From: Wilson Lin Date: Tue, 9 Aug 2022 13:47:38 +1000 Subject: [PATCH] Drop support for macOS ARM64 due to lack of access to hardware --- .github/workflows/cli.yml | 7 +------ .github/workflows/deno.yml | 1 - .github/workflows/nodejs.yml | 4 +--- .github/workflows/python.yml | 25 ++++--------------------- .github/workflows/wasm.yml | 1 - CHANGELOG.md | 1 + README.md | 5 ++--- 7 files changed, 9 insertions(+), 35 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 68a4f6c..8af5547 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, self-hosted-macos-arm64] + os: [macos-11.0, ubuntu-18.04, windows-2019, self-hosted-linux-arm64] include: - os: macos-11.0 ARCH: macos-x86_64 @@ -29,10 +29,6 @@ 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 @@ -47,7 +43,6 @@ 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 diff --git a/.github/workflows/deno.yml b/.github/workflows/deno.yml index 2ec2ccb..31dd5e1 100644 --- a/.github/workflows/deno.yml +++ b/.github/workflows/deno.yml @@ -18,7 +18,6 @@ jobs: run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Set up Rust - if: runner.name != 'macos-arm64' uses: actions-rs/toolchain@v1 with: toolchain: stable diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 0ca76b8..f97f05f 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.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, self-hosted-macos-arm64] + os: [macos-11.0, ubuntu-18.04, windows-2019, self-hosted-linux-arm64] steps: - uses: actions/checkout@v1 @@ -21,13 +21,11 @@ jobs: run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Set up Node.js - if: runner.name != 'macos-arm64' uses: actions/setup-node@master with: node-version: 17.x - name: Set up Rust - if: runner.name != 'macos-arm64' uses: actions-rs/toolchain@v1 with: toolchain: stable diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 759497e..c2befb0 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -12,13 +12,13 @@ jobs: strategy: matrix: variant: [main, onepass] - os: [macos-11.0, ubuntu-18.04, windows-2019, self-hosted-linux-arm64, self-hosted-macos-arm64] + os: [macos-11.0, ubuntu-18.04, windows-2019, self-hosted-linux-arm64] python: [3.8, 3.9, '3.10'] steps: - uses: actions/checkout@v1 - name: Set up Python (x64) - if: runner.name != 'linux-arm64' && runner.name != 'macos-arm64' + if: runner.name != 'linux-arm64' uses: actions/setup-python@v1 with: python-version: ${{ matrix.python }} @@ -31,14 +31,8 @@ jobs: eval "$(pyenv init --path)" pyenv install -s ${{ matrix.python }}:latest pyenv global $(pyenv versions --bare | grep -F '${{ matrix.python }}.') - - name: Set up Python (macOS ARM64) - if: runner.name == 'macos-arm64' - run: | - brew unlink python - brew link python@${{ matrix.python }} - name: Set up Rust - if: runner.name != 'macos-arm64' uses: actions-rs/toolchain@v1 with: toolchain: stable @@ -54,7 +48,7 @@ jobs: run: cargo build --release - name: Install Python build tools (macOS x64) - if: runner.os == 'macOS' && runner.name != 'macos-arm64' + if: runner.os == 'macOS' run: sudo pip install --upgrade maturin setuptools wheel twine - name: Install Python build tools (Linux x64, Windows x64) if: runner.os != 'macOS' && runner.name != 'linux-arm64' @@ -66,9 +60,6 @@ jobs: export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init --path)" pip3 install --upgrade maturin setuptools wheel twine - - name: Install Python build tools (macOS ARM64) - if: runner.name == 'macos-arm64' - run: /opt/homebrew/bin/pip3 install --upgrade maturin setuptools wheel twine - name: Pack and publish package shell: bash @@ -84,15 +75,7 @@ jobs: export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init --path)" fi - if [[ "${{ runner.name }}" == macos-arm64 ]]; then - pathToPython="/opt/homebrew/bin/python3" - # Ensure correct maturin and twine are used. - export PATH="/opt/homebrew/bin:$PATH" - else - pathToPython="$(which python)" - fi - # On macOS ARM64 this may emit a warning like "Couldn't find the symbol `PyInit_minify_html` 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 "$(which python)" if [[ "$GITHUB_REF" == refs/tags/v* ]]; then # For idempotency, ignore any existing built wheels that have already been successfully uploaded. twine upload --skip-existing target/wheels/* diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index 080392b..e1aab7d 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -18,7 +18,6 @@ jobs: run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Set up Rust - if: runner.name != 'macos-arm64' uses: actions-rs/toolchain@v1 with: toolchain: stable diff --git a/CHANGELOG.md b/CHANGELOG.md index 7701391..4e48768 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Fix parallel minification in CLI mode, where some inputs were ignored. - Output file names as they're processed in parallel mode from the CLI. - Allow self-closing `` tags. +- Drop support for macOS ARM64 due to lack of GitHub Actions runners. ## 0.9.2 diff --git a/README.md b/README.md index 69d44c3..051611c 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,6 @@ Precompiled binaries are available for Linux, macOS, and Windows. [Linux x64](https://wilsonl.in/minify-html/bin/0.9.2-linux-x86_64) | [Linux ARM64](https://wilsonl.in/minify-html/bin/0.9.2-linux-arm64) | [macOS x64](https://wilsonl.in/minify-html/bin/0.9.2-macos-x86_64) | -[macOS ARM64](https://wilsonl.in/minify-html/bin/0.9.2-macos-arm64) | [Windows x64](https://wilsonl.in/minify-html/bin/0.9.2-windows-x86_64.exe) ### Use @@ -103,7 +102,7 @@ All [`Cfg` fields](https://docs.rs/minify-html/latest/minify_html/struct.Cfg.htm - Package: [@minify-html/node](https://www.npmjs.com/package/@minify-html/node) - Binding: [Neon](https://github.com/neon-bindings/neon) -- Platforms: Linux (ARM64 and x64), macOS (ARM64 and x64), Windows (x64); Node.js 8.6.0 and higher +- Platforms: Linux (ARM64 and x64), macOS (x64), Windows (x64); Node.js 8.6.0 and higher ### Get @@ -177,7 +176,7 @@ All [`Cfg` fields](https://docs.rs/minify-html/latest/minify_html/struct.Cfg.htm - Package: [minify-html](https://pypi.org/project/minify-html) - Binding: [PyO3](https://github.com/PyO3/pyo3) -- Platforms: Linux (ARM64 and x64), macOS (ARM64 and x64), Windows (x64); Python 3.8 to 3.10 +- Platforms: Linux (ARM64 and x64), macOS (x64), Windows (x64); Python 3.8 to 3.10 ### Get