Drop support for macOS ARM64 due to lack of access to hardware

This commit is contained in:
Wilson Lin 2022-08-09 13:47:38 +10:00
parent 73744cca70
commit 29e7b1c187
7 changed files with 9 additions and 35 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 `<svg>` tags.
- Drop support for macOS ARM64 due to lack of GitHub Actions runners.
## 0.9.2

View File

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