1cc48993af
tests / macos-latest · py3.11 (push) Waiting to run
tests / macos-latest · py3.13 (push) Waiting to run
tests / windows-latest · py3.11 (push) Waiting to run
tests / windows-latest · py3.13 (push) Waiting to run
Build PCM package / build (push) Successful in 17s
tests / ubuntu-latest · py3.11 (push) Successful in 1m36s
tests / ubuntu-latest · py3.13 (push) Successful in 2m7s
tests / archlinux:latest (push) Successful in 3m0s
tests / debian:12 (push) Successful in 49s
tests / fedora:latest (push) Successful in 1m22s
tests / ubuntu:24.04 (push) Successful in 1m5s
tests / NixOS (FHS wrapper from docs/NIXOS.md) (push) Has been skipped
uv's cache moves into the workspace so it shares a filesystem with .venv and hardlinks instead of double-storing ~1.3 GB per job (the 'Failed to hardlink, falling back to full copy' warning was the tell before ENOSPC), and both matrices run max-parallel 1 so the host holds one dependency set at a time instead of six.
177 lines
7.2 KiB
YAML
177 lines
7.2 KiB
YAML
# Runs the full pytest suite (solver, raster, platform fallbacks)
|
|
# against real pip wheels on every platform row advertised in the
|
|
# README's "Platform support" table. What it cannot do is launch KiCad
|
|
# itself — the plugin-inside-KiCad integration stays field-tested.
|
|
#
|
|
# Gitea/Forgejo Actions syntax is GitHub-Actions-compatible; if the
|
|
# repo is ever mirrored to github.com, copy this file to
|
|
# .github/workflows/ (GitHub does not read .gitea/). The
|
|
# windows/macos and NixOS jobs need runners that only github.com
|
|
# provides for free, so they are gated on the server URL instead of
|
|
# queueing forever on a self-hosted instance; drop the `if:` lines if
|
|
# you register your own runners with those labels.
|
|
# Third-party actions pinned to commit SHAs, matching build-pcm.yml:
|
|
# mutable tags could be repointed at malicious code.
|
|
name: tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
UV_PYTHON: "3.12"
|
|
# Cache on the same filesystem as .venv so uv hardlinks instead of
|
|
# double-storing ~1.3 GB per job (PySide6 + scipy + matplotlib) —
|
|
# the runner host ran out of disk with the default cache location.
|
|
UV_CACHE_DIR: .uv-cache
|
|
# No test opens a window, but if one ever creates a figure the Qt
|
|
# backend must not try to reach a display on a headless runner.
|
|
QT_QPA_PLATFORM: offscreen
|
|
|
|
jobs:
|
|
linux:
|
|
name: ubuntu-latest · py${{ matrix.python }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
# Serialized: the runner host has limited disk; one dependency
|
|
# set at a time keeps peak usage at a single job's worth.
|
|
max-parallel: 1
|
|
matrix:
|
|
python: ["3.11", "3.13"]
|
|
env:
|
|
UV_PYTHON: ${{ matrix.python }}
|
|
steps:
|
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
- name: Qt runtime libraries (PySide6 wheels dlopen these)
|
|
run: >
|
|
sudo apt-get update -qq && sudo apt-get install -y -qq
|
|
libglib2.0-0 libgl1 libegl1 libopengl0 libfontconfig1
|
|
libfreetype6 libdbus-1-3 libxkbcommon0 libzstd1 libxcb1
|
|
libx11-6 libxext6 libxrender1 libsm6 libice6
|
|
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
|
|
- run: uv sync --frozen
|
|
- run: uv run python -c "import PySide6.QtWidgets"
|
|
- run: uv run pytest -q
|
|
|
|
distros:
|
|
name: ${{ matrix.distro }}
|
|
runs-on: ubuntu-latest
|
|
container: ${{ matrix.distro }}
|
|
strategy:
|
|
fail-fast: false
|
|
# See the linux job: serialized for the runner host's disk.
|
|
max-parallel: 1
|
|
matrix:
|
|
include:
|
|
# git in every list: the checkout below is plain git because
|
|
# actions/checkout is a JS action and act_runner (unlike
|
|
# GitHub's runners) injects no node into job containers -
|
|
# plain distro images crash it with "node: executable file
|
|
# not found in $PATH".
|
|
- distro: debian:12
|
|
setup: >
|
|
apt-get update -qq && apt-get install -y -qq
|
|
curl ca-certificates git
|
|
libglib2.0-0 libgl1 libegl1 libopengl0 libfontconfig1
|
|
libfreetype6 libdbus-1-3 libxkbcommon0 libzstd1 libxcb1
|
|
libx11-6 libxext6 libxrender1 libsm6 libice6
|
|
- distro: ubuntu:24.04
|
|
setup: >
|
|
apt-get update -qq && apt-get install -y -qq
|
|
curl ca-certificates git
|
|
libglib2.0-0 libgl1 libegl1 libopengl0 libfontconfig1
|
|
libfreetype6 libdbus-1-3 libxkbcommon0 libzstd1 libxcb1
|
|
libx11-6 libxext6 libxrender1 libsm6 libice6
|
|
- distro: fedora:latest
|
|
setup: >
|
|
dnf install -y -q
|
|
git-core
|
|
glib2 mesa-libGL mesa-libEGL libglvnd-opengl fontconfig
|
|
freetype dbus-libs libxkbcommon libzstd libxcb libX11
|
|
libXext libXrender libSM libICE
|
|
- distro: archlinux:latest
|
|
setup: >
|
|
pacman -Syu --noconfirm --needed
|
|
curl git
|
|
glib2 libglvnd fontconfig freetype2 dbus
|
|
libxkbcommon zstd libxcb libx11 libxext libxrender
|
|
libsm libice
|
|
steps:
|
|
- name: Distro Qt runtime libraries + git
|
|
run: ${{ matrix.setup }}
|
|
# Plain-git checkout: works in any container with git alone.
|
|
# (A private repo would need github.token on the URL.) Values
|
|
# arrive via env, not ${{ }} in the script: a template expansion
|
|
# inside `run:` would let a crafted PR branch name inject shell
|
|
# commands into the runner.
|
|
- name: Checkout
|
|
env:
|
|
SERVER_URL: ${{ github.server_url }}
|
|
REPO: ${{ github.repository }}
|
|
REF: ${{ github.ref }}
|
|
SHA: ${{ github.sha }}
|
|
run: |
|
|
case "$REF" in refs/heads/*|refs/tags/*|refs/pull/*) ;; *) echo "unexpected ref: $REF"; exit 1;; esac
|
|
case "$SHA" in *[!0-9a-f]*|"") echo "unexpected sha"; exit 1;; esac
|
|
git init -q .
|
|
git remote add origin "$SERVER_URL/$REPO.git"
|
|
git fetch -q --depth 50 origin "$REF"
|
|
git checkout -q "$SHA"
|
|
- name: Install uv
|
|
run: |
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
- run: uv sync --frozen
|
|
- run: uv run python -c "import PySide6.QtWidgets"
|
|
- run: uv run pytest -q
|
|
|
|
desktop:
|
|
name: ${{ matrix.os }} · py${{ matrix.python }}
|
|
# github.com only: no free Windows/macOS runners on self-hosted
|
|
# Gitea/Forgejo. Skipped (not queued) elsewhere.
|
|
if: github.server_url == 'https://github.com'
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, macos-latest]
|
|
python: ["3.11", "3.13"]
|
|
env:
|
|
UV_PYTHON: ${{ matrix.python }}
|
|
steps:
|
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
|
|
- run: uv sync --frozen
|
|
- run: uv run python -c "import PySide6.QtWidgets"
|
|
- run: uv run pytest -q
|
|
|
|
nixos:
|
|
name: NixOS (FHS wrapper from docs/NIXOS.md)
|
|
# Needs unprivileged user namespaces for bubblewrap, which the
|
|
# GitHub ubuntu VM allows but a docker-based act_runner does not.
|
|
if: github.server_url == 'https://github.com'
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
steps:
|
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
- uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
|
|
- name: Build the FHS environment (docs/NIXOS.md library set)
|
|
run: nix-build tools/ci-fhs.nix -o ci-fhs
|
|
- name: Run the suite inside the FHS env
|
|
# shellcheck disable=SC2016 -- $HOME/$PATH expand inside the
|
|
# FHS bash, not the runner shell; single quotes are the point.
|
|
run: |
|
|
# shellcheck disable=SC2016
|
|
./ci-fhs/bin/fill-resistance-ci -c '
|
|
set -e
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
export UV_PROJECT_ENVIRONMENT=/tmp/venv
|
|
uv sync --frozen
|
|
uv run python -c "import PySide6.QtWidgets"
|
|
uv run pytest -q
|
|
'
|