Stop letting the explicit compile step overstate its coverage. The old py_compile globs only touched top-level modules, so syntax errors in nested packages could slip past make check and release-check.\n\nAdd a shared compile-check recipe in Makefile that runs python -m compileall -q src tests, and have both check and release-check use it so the local verification paths stay aligned. Update the GitHub Actions compile step and the matching runtime validation evidence doc to describe the same recursive compile contract.\n\nValidate with python3 -m compileall -q src tests, make check, and make release-check.
135 lines
4.1 KiB
YAML
135 lines
4.1 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
unit-matrix:
|
|
name: Unit Matrix (${{ matrix.python-version }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12"]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install Ubuntu runtime dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
gobject-introspection \
|
|
libcairo2-dev \
|
|
libgirepository1.0-dev \
|
|
libportaudio2 \
|
|
pkg-config \
|
|
python3-gi \
|
|
python3-xlib \
|
|
gir1.2-gtk-3.0 \
|
|
gir1.2-ayatanaappindicator3-0.1 \
|
|
libayatana-appindicator3-1
|
|
- name: Create project environment
|
|
run: |
|
|
python -m venv .venv
|
|
. .venv/bin/activate
|
|
python -m pip install --upgrade pip
|
|
python -m pip install uv build
|
|
uv sync --active --frozen
|
|
echo "${GITHUB_WORKSPACE}/.venv/bin" >> "${GITHUB_PATH}"
|
|
- name: Run compile check
|
|
run: python -m compileall -q src tests
|
|
- name: Run unit and package-logic test suite
|
|
run: python -m unittest discover -s tests -p 'test_*.py'
|
|
|
|
portable-ubuntu-smoke:
|
|
name: Portable Ubuntu Smoke
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
- name: Install Ubuntu runtime dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
gobject-introspection \
|
|
libcairo2-dev \
|
|
libgirepository1.0-dev \
|
|
libportaudio2 \
|
|
pkg-config \
|
|
python3-gi \
|
|
python3-xlib \
|
|
gir1.2-gtk-3.0 \
|
|
gir1.2-ayatanaappindicator3-0.1 \
|
|
libayatana-appindicator3-1 \
|
|
xvfb
|
|
- name: Create project environment
|
|
run: |
|
|
python -m venv .venv
|
|
. .venv/bin/activate
|
|
python -m pip install --upgrade pip
|
|
python -m pip install uv build
|
|
uv sync --active --frozen
|
|
echo "${GITHUB_WORKSPACE}/.venv/bin" >> "${GITHUB_PATH}"
|
|
- name: Run portable install and doctor smoke with distro python
|
|
env:
|
|
AMAN_CI_SYSTEM_PYTHON: /usr/bin/python3
|
|
run: bash ./scripts/ci_portable_smoke.sh
|
|
- name: Upload portable smoke logs
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: aman-portable-smoke-logs
|
|
path: build/ci-smoke
|
|
|
|
package-artifacts:
|
|
name: Package Artifacts
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- unit-matrix
|
|
- portable-ubuntu-smoke
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
- name: Install Ubuntu runtime dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
gobject-introspection \
|
|
libcairo2-dev \
|
|
libgirepository1.0-dev \
|
|
libportaudio2 \
|
|
pkg-config \
|
|
python3-gi \
|
|
python3-xlib \
|
|
gir1.2-gtk-3.0 \
|
|
gir1.2-ayatanaappindicator3-0.1 \
|
|
libayatana-appindicator3-1
|
|
- name: Create project environment
|
|
run: |
|
|
python -m venv .venv
|
|
. .venv/bin/activate
|
|
python -m pip install --upgrade pip
|
|
python -m pip install uv build
|
|
uv sync --active --frozen
|
|
echo "${GITHUB_WORKSPACE}/.venv/bin" >> "${GITHUB_PATH}"
|
|
- name: Prepare release candidate artifacts
|
|
run: make release-prep
|
|
- name: Upload packaging artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: aman-artifacts
|
|
path: |
|
|
dist/*.whl
|
|
dist/*.tar.gz
|
|
dist/*.sha256
|
|
dist/SHA256SUMS
|
|
dist/*.deb
|
|
dist/arch/PKGBUILD
|
|
dist/arch/*.tar.gz
|