This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-github-actions | ||
on: [push] | ||
jobs: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python: ["cp38-*", "cp39-*", "cp310-*", "cp311-*"] # "cp37-*" disabled for now | ||
target: ["x86_64", "aarch64", "universal2", "AMD64", x64, x86] | ||
exclude: | ||
# no universal2 on ubuntu, no aarch64 on windows | ||
- os: ubuntu-latest | ||
target: universal2 | ||
- os: macos-latest | ||
target: aarch64 | ||
# no py 3.7 for universal2 (only x86_64 supported) | ||
- os: macos-latest | ||
python: "cp37-*" | ||
target: universal2 | ||
# AMD64 only on windows | ||
- os: ubuntu-latest | ||
target: AMD64 | ||
- os: macos-latest | ||
target: AMD64 | ||
# windows only on AMD64 | ||
- os: windows-latest | ||
target: x86_64 | ||
- os: windows-latest | ||
target: aarch64 | ||
- os: windows-latest | ||
target: universal2 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
architecture: ${{ matrix.target }} | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Build wheels - ${{ matrix.target }} | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
args: --release --out dist -m rust/Cargo.toml | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheels | ||
path: ./dist/*.whl |