Skip to content

Python 3.13 + Maintenance #70

Python 3.13 + Maintenance

Python 3.13 + Maintenance #70

Workflow file for this run

name: Build
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
- master
tags:
- '*'
pull_request:
branches:
- main
- master
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build SDist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
upload_all:
needs: [build_wheels, make_sdist]
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
doc_lint_cov:
name: Documentation, Linting and Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
# Update according to NEP-29
python-version: '3.10'
cache: 'pip'
- name: Install package
run: |
pip install -v .[all]
- name: Build documentation
run: |
sphinx-build -W -b html docs/ _build/html
- name: Lint documentation
run: |
doc8
- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: Documentation
path: _build/html
- name: Code style and tests
run: |
pytest --pyargs uarray
- name: mypy
run: |
mypy uarray
- name: Run clang-format style check for C/C++ code.
uses: jidicula/[email protected]
with:
clang-format-version: '13'
check-path: 'uarray'
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
directory: 'coverage/coverage*.xml'
env_vars: OS,PYTHON
fail_ci_if_error: false
verbose: true
pypy3:
name: Tests for PyPy3
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 'pypy-3.10'
cache: 'pip'
- name: Install package
run: |
pip install -v .[tests]
- name: Run tests
run: |
pytest --pyargs uarray
scipy_fft:
name: Run SciPy FFT tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
# Update according to NEP-29
python-version: '3.10'
cache: 'pip'
- name: Install package
run: |
pip install -v .[tests]
pip install scipy==1.7.2
- name: SciPy tests
run: |
import scipy.fft
assert scipy.fft.test()
shell: python