Bump python from 3.12 to 3.13 #584
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: Python | |
on: | |
pull_request: | |
branches: main | |
release: | |
types: published | |
jobs: | |
wheels: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.79.0 | |
default: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: build wheels | |
run: | | |
python -m pip install cffi maturin | |
maturin build --features python --release | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}-${{ matrix.python-version }}-wheel | |
path: target/wheels | |
twine: | |
needs: wheels | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
- name: check | |
run: | | |
mkdir wheelhouse/ | |
mv ./*-wheel*/*.whl wheelhouse/ | |
ls wheelhouse | |
pip install twine | |
twine check wheelhouse/*.whl | |
- name: upload | |
if: github.event_name == 'release' | |
run: twine upload -u __token__ -p ${{ secrets.PYPI_TOKEN }} wheelhouse/*.whl | |
test: | |
if: github.event_name != 'release' | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: maturin | |
run: | | |
pip install maturin | |
maturin build --features python --release --out . | |
pip install --find-links=. polymers | |
- name: pytest | |
run: | | |
pip install pytest | |
pytest --verbose . | |
- name: pycodestyle | |
run: | | |
pip install pycodestyle | |
pycodestyle --verbose . | |
- name: pylint | |
run: | | |
pip install pylint | |
pylint --verbose src | |
- name: clippy | |
run: cargo clippy --color always --features python --release -- -D warnings |