Skip to content

Build Check (no PyPI upload) #12

Build Check (no PyPI upload)

Build Check (no PyPI upload) #12

Workflow file for this run

# ci-check.yml
#
# GitHub Actions workflow to validate wheel and sdist builds across platforms and Python versions.
# This workflow matches ci.yml but skips the PyPI upload step.
# It is intended to verify that builds complete successfully before releasing.
# This workflow runs manually (via workflow_dispatch) and builds wheels for Linux, Windows, and macOS.
# It DOES NOT upload to PyPI — it only builds and uploads artifacts for inspection/testing.
#
# Recommended for use prior to release workflows (e.g. CI.yml).
name: Build Check (no PyPI upload)
on:
workflow_dispatch:
permissions:
contents: read
jobs:
# ----------------------------------------
# Build wheels for Linux
# ----------------------------------------
linux:
name: Build Linux Wheels
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
- runner: ubuntu-22.04
target: x86_64
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
args: --release --out dist --interpreter python
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.runner }}-${{ matrix.python-version }}
path: dist
# ----------------------------------------
# Build wheels for Windows
# ----------------------------------------
windows:
name: Build Windows Wheels
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
args: --release --out dist --interpreter python
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.python-version }}
path: dist
# ----------------------------------------
# Build wheels for macOS
# ----------------------------------------
macos:
name: Build macOS Wheels
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
args: --release --out dist --interpreter python
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.python-version }}
path: dist
# ----------------------------------------
# Build source distribution (sdist)
# ----------------------------------------
sdist:
name: Build Source Distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: sdist-artifact
path: dist
# ----------------------------------------
# Check build artifacts and provenance (no upload)
# ----------------------------------------
check:
name: Verify Build Artifacts Only
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' }}
needs: [linux, windows, macos, sdist]
permissions:
id-token: write # Required for OIDC-based publishing
steps:
- uses: actions/download-artifact@v4
with:
path: .
merge-multiple: true
- name: List distributions
run: ls -lh .