Skip to content

Build wheels

Build wheels #1

Workflow file for this run

name: Build wheels
on:
workflow_dispatch:
# push:
# pull_request:
# release:
jobs:
build_wheels:
name: Build wheels
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install pybind11 setuptools_scm
- name: Install cibuildwheel
run: |
pip install cibuildwheel
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: "pp* *-musllinux*"
CIBW_BEFORE_BUILD: "pip install pybind11 setuptools_scm"
CIBW_ENVIRONMENT: CMAKE_ARGS="-DPYBIND11_FINDPYTHON=ON"
CIBW_TEST_REQUIRES: "pytest"
CIBW_TEST_COMMAND: "pytest {project}/tests/test_for_build.py -v"
#CIBW_ARCHS: "auto64"
CIBW_ARCHS_MACOS: "universal2"
CIBW_ARCHS_LINUX: "x86_64"
CIBW_ARCHS_WINDOWS: "AMD64"
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-*"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl