Skip to content

Upgrade PySide6 multi-camera GUI #2

Upgrade PySide6 multi-camera GUI

Upgrade PySide6 multi-camera GUI #2

name: Build, validate & Release
on:
push:
tags: [ 'v*.*.*' ]
pull_request:
branches: [ main, master ]
types: [ labeled, opened, edited, synchronize, reopened ]
jobs:
test:
name: Test / smoke (matrix)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install Qt/OpenGL runtime deps (Ubuntu)
run: |
sudo apt-get update
sudo apt-get install -y \
libegl1 \
libgl1 \
libopengl0 \
libxkbcommon-x11-0 \
libxcb-cursor0
- name: Install tools
run: |
python -m pip install --upgrade pip
python -m pip install build twine wheel "packaging>=24.2"
- name: Build distributions (sdist + wheel)
run: python -m build
- name: Inspect dist
run: |
ls -lah dist/
echo "sdist contents (first ~200 entries):"
tar -tf dist/*.tar.gz | sed -n '1,200p'
- name: Twine metadata & README check
run: python -m twine check dist/*
- name: Install from wheel & smoke test
run: |
python -m pip install dist/*.whl
python - <<'PY'
import importlib
pkg_name = "dlclivegui"
m = importlib.import_module(pkg_name)
print("Imported:", m.__name__, "version:", getattr(m, "__version__", "n/a"))
PY
if ! command -v dlclivegui >/dev/null 2>&1; then
echo "CLI entry point 'dlclivegui' not found in PATH; skipping CLI smoke test."
else
if command -v dlclivegui >/dev/null 2>&1; then
echo "Running 'dlclivegui --help' smoke test..."
if ! dlclivegui --help >/dev/null 2>&1; then
echo "::error::'dlclivegui --help' failed; this indicates a problem with the installed CLI package."
exit 1
fi
build:
name: Build release artifacts (single)
runs-on: ubuntu-latest
needs: test
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Build distributions (sdist + wheel)
run: |
python -m pip install --upgrade pip
python -m pip install build twine wheel "packaging>=24.2"
python -m build
python -m twine check dist/*
- name: Upload dist artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*
if-no-files-found: error
publish:
name: Publish to PyPI (OIDC)
runs-on: ubuntu-latest
needs: build
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
environment: pypi
permissions:
id-token: write
steps:
- name: Download dist artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1