use only workflows for wheels #1
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
# Runs CI tests and generates wheels on the following platforms: | |
# | |
# * Linux (py2 and py3) | |
# * macOS (py2 and py3) | |
# * Windows (py3, py2 is done by appveyor) | |
# | |
# Useful URLs: | |
# * https://github.com/pypa/cibuildwheel | |
# * https://github.com/actions/checkout | |
# * https://github.com/actions/setup-python | |
# * https://github.com/actions/upload-artifact | |
on: [push, pull_request] | |
name: build | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.sha || '' }} | |
cancel-in-progress: true | |
jobs: | |
# Linux + macOS + Windows Python 3 | |
py3: | |
name: py3-${{ matrix.os }}-${{ startsWith(matrix.os, 'windows') && matrix.archs || 'all' }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
archs: "x86_64 i686" | |
- os: macos-12 | |
archs: "x86_64 arm64" | |
- os: windows-2019 | |
archs: "AMD64" | |
- os: windows-2019 | |
archs: "x86" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.10 | |
- name: Create wheels + run tests | |
uses: pypa/cibuildwheel@v2.16.2 | |
env: | |
CIBW_ARCHS: "${{ matrix.archs }}" | |
CIBW_PRERELEASE_PYTHONS: True | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: wheelhouse | |
check-dist: | |
needs: [py3] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- uses: actions/download-artifact@v3 | |
with: | |
name: wheels | |
path: wheelhouse | |
- run: | | |
python scripts/internal/print_hashes.py wheelhouse/ | |
pipx run twine check --strict wheelhouse/* | |
pipx run abi3audit --verbose --strict wheelhouse/*-abi3-*.whl |