Skip to content

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

Add CI action to build python wheels for many platforms

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

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-latest,
]
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
# - run: rustup target add aarch64-apple-darwin
# if: matrix.os == 'macos-latest'
# - run: |
# rustup toolchain install stable-i686-pc-windows-msvc
# rustup target add i686-pc-windows-msvc
# # if: matrix.os == 'windows'
# - name: Check Rust versions
# run: |
# rustc --version
# which rustc
# cargo --version
# which cargo
# rustup --version
# which rustup
- 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