Udate github actions #41
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: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
# Template from: https://github.com/pypa/cibuildwheel/blob/main/examples/github-with-qemu.yml | ||
jobs: | ||
build_wheels: | ||
name: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.python }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
strategy: | ||
matrix: | ||
# macos-13 is an intel runner, macos-14 is apple silicon | ||
os: [ubuntu-latest, windows-latest, macos-13, macos-14] | ||
python: [cp310, cp311, cp312, cp313] | ||
matrix: | ||
# macos-13 is an intel runner, macos-14 is apple silicon | ||
#os: [ubuntu-latest, macos-13, macos-14, windows-latest] | ||
python: [cp310, cp311, cp312, cp313] | ||
os: [] # defined below | ||
arch: [] | ||
#arch: [x86_64, aarch64, AMD64, arm64] | ||
# Included archs: | ||
# Ubuntu: x86_64, aarch64 | ||
# macos-13: x86_64, arm64 | ||
# macos-13: arm64 | ||
# Windows: AMD64 | ||
include: | ||
- os: ubuntu-latest | ||
arch: x86_64 | ||
- os: ubuntu-latest | ||
arch: aarch64 | ||
- os: macos-13 | ||
arch: x86_64 | ||
- os: macos-14 | ||
arch: arm64 | ||
- os: windows-latest | ||
arch: AMD64 | ||
# exclude: | ||
# - os: ubuntu-latest | ||
# arch: AMD64 | ||
# - os: ubuntu-latest | ||
# arch: arm64 | ||
# - os: macos-12 | ||
# arch: aarch64 | ||
# - os: macos-12 | ||
# arch: AMD64 | ||
# - os: windows-latest | ||
# arch: x86_64 | ||
# - os: windows-latest | ||
# arch: aarch64 | ||
# - os: windows-latest | ||
# arch: arm64 | ||
fail-fast: false | ||
steps: | ||
- name: Set up QEMU | ||
if: matrix.arch == 'aarch64' | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: arm64 | ||
- uses: actions/checkout@v3 | ||
- name: Build and test wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BEFORE_TEST: "pip install -r requirements-dev.txt" | ||
CIBW_TEST_COMMAND: "pytest {project}/tests" | ||
CIBW_ARCHS: ${{ matrix.arch }} | ||
CIBW_BUILD: "${{ matrix.python }}*" | ||
CIBW_SKIP: "*musllinux*" | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./wheelhouse/*.whl | ||
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] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
if: runner.os == 'Linux' | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: all | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
# configure cibuildwheel to build native archs ('auto'), and some | ||
# emulated ones | ||
CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
path: ./wheelhouse/*.whl |