Skip to content

Release v0.2.2

Release v0.2.2 #76

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Test And Build
permissions:
contents: read
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
release:
types:
- published
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
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: |
python -m pip install pdm
python -m pdm install
python -m pdm install -dG dev
- name: Test with pytest
run: |
python -m pdm run pytest tests --cov --cov-report xml:cov.xml
- name: Check with mypy
run: |
python -m pdm run mypy slhdsa --disallow-untyped-defs
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./cov.xml
build_optimized:
name: Build optimized wheels on ${{ matrix.os }}
needs: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-14]
steps:
- uses: actions/checkout@v5
- name: Build wheels
uses: pypa/cibuildwheel@v3.1.4
- uses: actions/upload-artifact@v4
with:
name: slhdsa-optimized-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_unoptimized:
name: Build unoptimized wheels
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install pdm
python -m pdm install --prod
- name: Build
run: |
python -m pdm build
env:
SLHDSA_BUILD_OPTIMIZED: "0"
- uses: actions/upload-artifact@v4
with:
name: slhdsa-unoptimized-wheels-${{ strategy.job-index }}
path: ./dist/*.whl
- uses: actions/upload-artifact@v4
with:
name: slhdsa-sdist-${{ strategy.job-index }}
path: ./dist/*.tar.gz
upload_pypi:
needs: [build_optimized, build_unoptimized]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v5
with:
pattern: slhdsa-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1