Skip to content

fix: correct release workflow and download recipe #168

fix: correct release workflow and download recipe

fix: correct release workflow and download recipe #168

Workflow file for this run

name: main
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
branches:
- master
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
identifiers:
name: Identifiers
# GitHub needs to know where .cicd/workflows/identifiers.yml lives at parse time,
# and submodules aren't included in that context! thus the following does NOT work:
# uses: ./.cicd/workflows/identifiers.yml
# we MUST reference the remote repo directly:
uses: wamp-proto/wamp-cicd/.github/workflows/identifiers.yml@main
# IMPORTANT: we still need .cicd as a Git submodule in the using repo though!
# because e.g. identifiers.yml wants to access scripts/sanitize.sh !
check:
name: Code Quality
needs: identifiers
runs-on: ubuntu-24.04
env:
BASE_REPO: ${{ needs.identifiers.outputs.base_repo }}
BASE_BRANCH: ${{ needs.identifiers.outputs.base_branch }}
PR_NUMBER: ${{ needs.identifiers.outputs.pr_number }}
PR_REPO: ${{ needs.identifiers.outputs.pr_repo }}
PR_BRANCH: ${{ needs.identifiers.outputs.pr_branch }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Set up Python 3.11
run: uv python install 3.11
- name: Install just
uses: extractions/setup-just@v3
- name: Install ty (Astral type checker)
run: uv tool install ty
- name: Create venv and install dev dependencies
run: |
just create cpy311
just install-dev cpy311
- name: Run code quality checks
run: just check cpy311
test:
name: Test Suite
needs: identifiers
runs-on: ${{ matrix.os }}
env:
BASE_REPO: ${{ needs.identifiers.outputs.base_repo }}
BASE_BRANCH: ${{ needs.identifiers.outputs.base_branch }}
PR_NUMBER: ${{ needs.identifiers.outputs.pr_number }}
PR_REPO: ${{ needs.identifiers.outputs.pr_repo }}
PR_BRANCH: ${{ needs.identifiers.outputs.pr_branch }}
strategy:
matrix:
os: [ubuntu-24.04]
# Note: pypy311 excluded because zlmdb v25.10.1 lacks PyPy wheels on PyPI
env: ['cpy311', 'cpy312', 'cpy313', 'cpy314']
continue-on-error: false
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install just
uses: extractions/setup-just@v3
- name: Create venv and install dependencies
run: |
just create ${{ matrix.env }}
just install-dev ${{ matrix.env }}
- name: Run tests
run: just test ${{ matrix.env }}
docs:
name: Documentation
needs: identifiers
runs-on: ubuntu-24.04
env:
BASE_REPO: ${{ needs.identifiers.outputs.base_repo }}
BASE_BRANCH: ${{ needs.identifiers.outputs.base_branch }}
PR_NUMBER: ${{ needs.identifiers.outputs.pr_number }}
PR_REPO: ${{ needs.identifiers.outputs.pr_repo }}
PR_BRANCH: ${{ needs.identifiers.outputs.pr_branch }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Set up Python 3.11
run: uv python install 3.11
- name: Install just
uses: extractions/setup-just@v3
- name: Create venv and install dependencies
run: |
just create cpy311
just install-dev cpy311
just install-docs cpy311
- name: Build documentation
run: just docs cpy311
# Build distribution packages (sdist + wheel)
# Artifacts are uploaded with checksums for chain-of-custody verification
build:
name: Build Distribution
needs: [identifiers, check, test]
runs-on: ubuntu-24.04
env:
BASE_REPO: ${{ needs.identifiers.outputs.base_repo }}
BASE_BRANCH: ${{ needs.identifiers.outputs.base_branch }}
PR_NUMBER: ${{ needs.identifiers.outputs.pr_number }}
PR_REPO: ${{ needs.identifiers.outputs.pr_repo }}
PR_BRANCH: ${{ needs.identifiers.outputs.pr_branch }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Set up Python 3.11
run: uv python install 3.11
- name: Install just
uses: extractions/setup-just@v3
- name: Create venv and install build tools
run: |
just create cpy311
just install-build-tools cpy311
- name: Build distribution packages
run: just dist cpy311
- name: Verify packages (twine check)
run: just verify-dist cpy311
- name: List built packages
run: |
echo "Built packages:"
ls -lh dist/
- name: Smoke test wheel installation
run: |
echo "======================================================================"
echo "==> Smoke Testing Wheel Installation"
echo "======================================================================"
WHEEL=$(ls dist/*.whl 2>/dev/null | head -1)
if [ -z "$WHEEL" ]; then
echo "❌ No wheel found in dist/"
exit 1
fi
just test-wheel-install "$WHEEL"
echo "======================================================================"
echo "✅ Wheel smoke test PASSED"
echo "======================================================================"
- name: Smoke test sdist installation
run: |
echo "======================================================================"
echo "==> Smoke Testing Source Distribution Installation"
echo "======================================================================"
SDIST=$(ls dist/*.tar.gz 2>/dev/null | head -1)
if [ -z "$SDIST" ]; then
echo "❌ No sdist found in dist/"
exit 1
fi
just test-sdist-install "$SDIST"
echo "======================================================================"
echo "✅ Source distribution smoke test PASSED"
echo "======================================================================"
- name: Upload distribution artifacts (verified)
uses: wamp-proto/wamp-cicd/actions/upload-artifact-verified@main
with:
name: dist-packages
path: dist/
retention-days: 14