Build Wheels #83
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 Wheels | |
on: | |
push: | |
tags: "*" | |
workflow_dispatch: | |
jobs: | |
macos: | |
name: macOS Wheels (universal2) | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
architecture: x64 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
args: --release --target universal2-apple-darwin --out dist -m minijinja-py/Cargo.toml | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
linux: | |
name: Linux Wheels | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: [i686, x86_64, armv7l, aarch64] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Install dependencies | |
run: | | |
apt-get install gcc-i686-linux-gnu gcc-aarch64-linux-gnu gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
args: --release --out dist -m minijinja-py/Cargo.toml --interpreter "3.9" | |
manylinux: auto | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
windows: | |
name: Windows Wheels | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
target: [x64, x86] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
architecture: ${{ matrix.target }} | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
args: --release --out dist -m minijinja-py/Cargo.toml | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
sdist: | |
name: Source Distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build sdist | |
uses: PyO3/maturin-action@v1 | |
with: | |
command: sdist | |
args: --out dist -m minijinja-py/Cargo.toml | |
- name: Upload sdist | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist |