Test wheels after they are built. Upgrade actions/upload-artifacts to… #29
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: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: [3.9] | |
#if: startsWith(github.event.head_commit.message, 'Release') | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install cffi cibuildwheel wheel | |
- name: Build and test wheels | |
env: | |
CIBW_ARCHS: "auto64" | |
CIBW_SKIP: "cp36-* cp37-* pp37-* pp310-* cp312-*" | |
CIBW_TEST_REQUIRES: cffi pytest | |
CIBW_TEST_COMMAND: "pytest {project}/tests" | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
- name: Save Wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl |