add multiarch #3
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 | |
on: [push, pull_request] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} - ${{ matrix.arch }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-13, macos-14] | |
arch: [x86_64, aarch64] # Use 'aarch64' for Linux ARM builds, 'x86_64' for AMD/Intel | |
exclude: | |
- os: windows-latest | |
arch: aarch64 # Windows doesn't support aarch64 | |
steps: | |
- uses: actions/checkout@v4 | |
# Set up Python environment | |
- uses: actions/setup-python@v5 | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.20.0 | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_ARCHS: ${{ matrix.arch }} # Use aarch64 for ARM on Linux | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl |