install specific python version in matrix #96
Workflow file for this run
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: tests | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install . | |
- name: Test with pytest | |
run: | | |
pip install -r requirements.txt | |
pytest tests | |
wheels: | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
needs: test | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Set up QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.19.1 | |
env: | |
CIBW_ARCHS_MACOS: x86_64 arm64 universal2 | |
CIBW_ARCHS_LINUX: auto aarch64 | |
CIBW_SKIP: pp38-macosx_* pp37-macosx_* pp37-win_* pp38-win_* pp38-manylinux_aarch64 pp37-manylinux_aarch64 pp37-manylinux_i686 pp38-manylinux_i686 *-musllinux_* *s390x *ppc64le pp310-win_* | |
- name: Build sdist | |
run: | | |
pip install numpy cython wheel setuptools | |
python setup.py sdist | |
- name: Publish wheels to PyPI | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
pip install twine | |
twine upload --skip-existing wheelhouse/*.whl | |
twine upload dist/* | |
continue-on-error: true |