Skip to content

Plugins architecture #1764

Plugins architecture

Plugins architecture #1764

# Build-only workflow - runs `make dist` to create sdist & wheel, no lint/tests
# Docs: https://docs.github.com/en/actions | PyPA build: https://pypi.org/project/build
name: Build Python Package
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-package:
runs-on: ubuntu-latest
# Build the package under multiple Python versions to catch ABI issues early
strategy:
matrix:
python-version: [ "3.10", "3.11", "3.12" ] # Extend as needed
steps:
# 1️⃣ Check out repository so Makefile & sources are available
- name: Checkout code
uses: actions/checkout@v4 # Standard checkout step
# 2️⃣ Set up the requested Python version from the runner tool-cache
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5 # Recommended approach for consistent PATH
with:
python-version: ${{ matrix.python-version }}
# 3️⃣ Install build front-end; Keep pip current; bootstrap venv
- name: Install build tool
run: |
python3 -m pip install --upgrade pip
python3 -m pip install build # PyPA-endorsed PEP 517 builder
- name: Bootstrap project venv
run: make venv
# 4️⃣ Invoke the Makefile 'dist' target (creates ./dist/*.whl & *.tar.gz)
- name: Build distributions
run: make dist # Uses the Makefile's `dist` rule
# 5️⃣ Install package quality tools
- name: Install package linters
run: |
python3 -m pip install twine check-manifest pyroma
# 6️⃣ Validate wheel/sdist metadata
- name: Check distribution metadata (twine)
run: twine check dist/*
# 7️⃣ Verify MANIFEST.in completeness
- name: Check manifest (check-manifest)
run: check-manifest
# 8️⃣ Assess package quality
- name: Check package quality (pyroma)
run: pyroma -d .
# 9️⃣ Upload built artifacts so they can be downloaded from the run page
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: python-package-${{ matrix.python-version }}
path: dist/*