Use native aarch64 manylinux container for ARM64 wheel builds #738
This file contains hidden or 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, pull_request] | |
| permissions: read-all | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| architecture: [x86, x64] | |
| exclude: | |
| - os: ubuntu-latest | |
| architecture: x86 | |
| - os: macos-latest | |
| architecture: x86 | |
| - os: macos-latest | |
| python: 3.10 | |
| name: ${{ matrix.os }} Py ${{ matrix.python }} ${{ matrix.architecture }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: false | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| architecture: ${{ matrix.architecture }} | |
| - name: Install dependencies | |
| if: "startsWith(matrix.os, 'ubuntu')" | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -qq swig libpcsclite-dev libudev-dev | |
| - name: Install the project | |
| run: uv sync --all-extras | |
| - name: Run pre-commit | |
| if: "!startsWith(matrix.python, 'pypy') && matrix.architecture != 'x86'" | |
| shell: bash | |
| run: | | |
| uv tool install pre-commit | |
| echo $(python --version) | grep -q "Python 3.10" && export SKIP=pyright | |
| pre-commit run --all-files | |
| - name: Run unit tests | |
| run: uv run pytest --no-device | |
| sdist: | |
| runs-on: ubuntu-latest | |
| name: Build source distribution | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build sdist | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| command: sdist | |
| args: --out dist | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: fido2-sdist | |
| path: dist/*.tar.gz | |
| wheels: | |
| runs-on: ${{ matrix.os }} | |
| name: Wheels - ${{ matrix.os }} ${{ matrix.target }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64 | |
| container: quay.io/pypa/manylinux_2_28_x86_64 | |
| - os: ubuntu-22.04-arm | |
| target: aarch64 | |
| container: quay.io/pypa/manylinux_2_28_aarch64 | |
| - os: macos-latest | |
| target: universal2-apple-darwin | |
| python-versions: "3.10\n3.11\n3.12\n3.13\n3.14" | |
| - os: windows-latest | |
| target: x64 | |
| python-versions: "3.10\n3.11\n3.12\n3.13\n3.14" | |
| - os: windows-11-arm | |
| target: aarch64 | |
| interpreter: 3.11 3.12 3.13 3.14 | |
| python-versions: "3.11\n3.12\n3.13\n3.14" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| if: matrix.python-versions | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-versions }} | |
| - name: Install dependencies | |
| if: "startsWith(matrix.os, 'ubuntu')" | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -qq libpcsclite-dev libudev-dev | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: --release --out dist ${{ matrix.interpreter && format('--interpreter {0}', matrix.interpreter) || '--find-interpreter' }} | |
| manylinux: manylinux_2_28 | |
| container: ${{ matrix.container }} | |
| before-script-linux: ${{ matrix.container && 'dnf install -y pcsc-lite-devel systemd-devel' || '' }} | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: fido2-wheels-${{ matrix.os }}-${{ matrix.target }} | |
| path: dist/*.whl | |
| docs: | |
| runs-on: ubuntu-latest | |
| name: Build sphinx documentation | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: false | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.14 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -qq swig libpcsclite-dev libudev-dev | |
| - name: Build sphinx documentation | |
| run: uv run make -C docs/ html | |
| - name: Upload documentation | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: python-fido2-docs | |
| path: docs/_build/html |