Udate github actions #51
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: ${{ matrix.os }}-${{ matrix.architectures }}-py${{ matrix.python-version }} | |
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" | |
- os: ubuntu-latest | |
architectures: "aarch64" | |
# Windows builds (x86_64 only) | |
- os: windows-latest | |
architectures: "x86_64" | |
# macOS Intel | |
- os: macos-13 | |
architectures: "x86_64" | |
# macOS Apple silicon | |
- os: macos-14 | |
architectures: "arm64" | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- name: Build and test | |
uses: pypa/[email protected] | |
env: | |
# Build | |
CIBW_BEFORE_ALL: "pip install --upgrade pip && pip install -r requirements-dev.txt" | |
CIBW_BUILD: cp{310,311,312,313}-* | |
CIBW_ARCHS_LINUX: ${{ matrix.architectures }} | |
CIBW_ARCHS_MACOS: ${{ matrix.architectures }} | |
CIBW_ARCHS_WINDOWS: ${{ matrix.architectures }} | |
# Test | |
#CIBW_BEFORE_TEST: pip install -r requirements-dev.txt | |
CIBW_TEST_COMMAND: "PYTHONPATH=$(pwd) pytest {package}/tests" | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: ./wheelhouse/*.whl |