Udate github actions #46
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 & Test | |
on: | |
schedule: | |
- cron: '0 1 * * 4' # Runs every Thursday at 1 AM (UTC) | |
pull_request: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# macos-13 is an intel runner, macos-14 is apple silicon | |
os: [ubuntu-latest, windows-latest, macos-13, macos-14] | |
python-version: ["3.10", "3.11", "3.12", "3.13"] | |
include: | |
# Linux builds | |
- os: ubuntu-latest | |
architectures: "x86_64 aarch64" | |
# Windows builds (x86_64 only) | |
- os: windows-latest | |
architectures: "AMD64" | |
# macOS Intel | |
- os: macos-13 | |
architectures: "x86_64 arm64" | |
# macOS Apple silicon | |
- os: macos-14 | |
architectures: "arm64" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_BUILD: cp{310,311,312,313}-* | |
CIBW_ARCHS_LINUX: ${{ matrix.architectures }} | |
CIBW_ARCHS_MACOS: ${{ matrix.architectures }} | |
CIBW_ARCHS_WINDOWS: ${{ matrix.architectures }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-${{ matrix.os }} | |
path: ./wheelhouse/*.whl |