Skip to content

Add CI action to build python wheels for many platforms #21

Add CI action to build python wheels for many platforms

Add CI action to build python wheels for many platforms #21

Workflow file for this run

name: Build Python wheels
on:
push:
branches: [main]
tags: 'v*'
pull_request:
workflow_dispatch:
jobs:
build-python-wheels:
name: Build wheels on ${{ matrix.os }} with Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [
ubuntu-latest,
windows-latest,
macos-13, # latest non-beta version
] # see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
python-version: [
'3.10',
'3.11',
'3.12'
] # see https://devguide.python.org/versions/
steps:
- uses: actions/checkout@v4
- name: Set up rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install maturin
run: python -m pip install maturin
- name: Build wheels
run: |
cd lakers-python
maturin build --out wheelhouse
- uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.os }}-python-${{ matrix.python-version }}
path: ./lakers-python/wheelhouse/*.whl