Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ jobs:
target: macos-arm64
- os: macos-15-intel
target: macos-x86_64
- os: ubuntu-latest
# PyInstaller Linux binaries inherit the builder's glibc baseline.
# Keep releases compatible with older LTS distributions.
- os: ubuntu-22.04
target: linux-x86_64
- os: windows-latest
target: windows-x86_64
Expand Down
36 changes: 36 additions & 0 deletions tests/test_build_release_workflow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""Tests for release workflow compatibility-sensitive settings."""

from __future__ import annotations

from pathlib import Path


WORKFLOW = Path(__file__).resolve().parent.parent / ".github/workflows/build-release.yml"


def _matrix_entries() -> list[dict[str, str]]:
lines = WORKFLOW.read_text(encoding="utf-8").splitlines()
entries: list[dict[str, str]] = []
current: dict[str, str] | None = None

for raw_line in lines:
line = raw_line.strip()
if line.startswith("- os: "):
current = {"os": line.removeprefix("- os: ")}
entries.append(current)
elif current is not None and line.startswith("target: "):
current["target"] = line.removeprefix("target: ")

return entries


def _runner_for_target(target: str) -> str:
for entry in _matrix_entries():
if entry.get("target") == target:
return entry["os"]
msg = f"release matrix target not found: {target}"
raise AssertionError(msg)


def test_linux_release_binary_build_uses_older_glibc_baseline() -> None:
assert _runner_for_target("linux-x86_64") == "ubuntu-22.04"