Skip to content

Commit b24a031

Browse files
committed
Support Flathub test refs in runtime smoke
1 parent 752707b commit b24a031

3 files changed

Lines changed: 53 additions & 1 deletion

File tree

docs/flathub.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ Use this note when maintaining the Mini EQ Flathub package.
1414
- The manifest builds in project CI and installs the desktop file, AppStream
1515
metadata, icons, licenses, PipeWire filter-chain module, pipewire-gobject,
1616
NumPy, and libebur128.
17+
- PyGObject is supplied by the GNOME runtime's system Python/GI stack. Do not
18+
add it to `python3-dependencies.yaml`; that file is for bundled PyPI
19+
dependencies such as NumPy.
1720
- `flatpak-builder-lint manifest io.github.bhack.mini-eq.yaml` passes locally.
1821

1922
## Repository Split
@@ -67,6 +70,7 @@ packaging branch and open, submit, and merge the Flathub PR manually.
6770
tag or commit URL before publishing.
6871
6. Keep `python3-dependencies.yaml` unchanged unless Python dependencies
6972
changed. If dependencies changed, regenerate it and update both repositories.
73+
PyGObject is a runtime-provided GI binding, not a bundled PyPI dependency.
7074
7. Run the validation commands below.
7175
8. As the maintainer, open a pull request against the Flathub repository's
7276
`master` branch.
@@ -86,7 +90,12 @@ before merging.
8690
Use Flathub PR test builds for normal release handoff validation. Flathub starts
8791
a temporary test build for pull requests and the bot posts an installable bundle
8892
when the build is ready; test that build before merging runtime-sensitive
89-
changes.
93+
changes. The temporary build installs as the Flatpak `test` branch, so target
94+
that branch explicitly when running runtime smoke:
95+
96+
```bash
97+
python3 tools/check_flatpak_runtime.py --app-ref io.github.bhack.mini-eq//test
98+
```
9099

91100
Use the Flathub `beta` branch only for release-candidate or high-risk changes
92101
that need a user-installable Flatpak before the stable update. The Flathub
@@ -184,11 +193,19 @@ If a `repo/` is produced, run:
184193
flatpak run --command=flatpak-builder-lint org.flatpak.Builder repo repo
185194
```
186195

196+
Local repo lint can report screenshot mirroring errors when the generated repo
197+
does not include Flathub's mirrored screenshot refs. If those are the only repo
198+
lint errors, confirm the AppStream screenshot URLs point at an immutable tag or
199+
commit and are reachable; then treat the Flathub PR build's `Build ready`
200+
status as the authoritative screenshot-mirroring check.
201+
187202
## Packaging Notes
188203

189204
- Mini EQ is an upstream-maintained GTK/Libadwaita graphical application.
190205
- The app ID `io.github.bhack.mini-eq` matches the GitHub repository ownership.
191206
- The app requires `xdg-run/pipewire-0` to create and use PipeWire audio nodes.
207+
- PyGObject comes from `org.gnome.Platform`; bundling it from PyPI would risk
208+
mismatches with the runtime GLib, GTK, and GObject-Introspection stack.
192209
- The Flatpak bundles only the PipeWire filter-chain module and SPA builtin
193210
filter graph plugin needed inside the app process; it does not bundle or run
194211
a PipeWire daemon or session manager.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from __future__ import annotations
2+
3+
import pytest
4+
5+
from tools import check_flatpak_runtime
6+
7+
8+
@pytest.mark.parametrize(
9+
"app_ref",
10+
[
11+
"io.github.bhack.mini-eq//test",
12+
"app/io.github.bhack.mini-eq/aarch64/test",
13+
"app/io.github.bhack.mini-eq/x86_64/test",
14+
],
15+
)
16+
def test_flatpak_runtime_smoke_accepts_flathub_test_refs(app_ref: str) -> None:
17+
assert check_flatpak_runtime.flatpak_app_ref(app_ref) == app_ref
18+
assert check_flatpak_runtime.flatpak_run_command(app_ref, "--check-deps") == [
19+
"flatpak",
20+
"run",
21+
app_ref,
22+
"--check-deps",
23+
]

tools/check_flatpak_runtime.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,24 @@
1717
APP_ID = "io.github.bhack.mini-eq"
1818
DEFAULT_APP_REF = f"{APP_ID}//master"
1919
STABLE_APP_REF = f"{APP_ID}//stable"
20+
TEST_APP_REF = f"{APP_ID}//test"
2021
FULL_AARCH64_MASTER_REF = f"app/{APP_ID}/aarch64/master"
2122
FULL_AARCH64_STABLE_REF = f"app/{APP_ID}/aarch64/stable"
23+
FULL_AARCH64_TEST_REF = f"app/{APP_ID}/aarch64/test"
2224
FULL_X86_64_MASTER_REF = f"app/{APP_ID}/x86_64/master"
2325
FULL_X86_64_STABLE_REF = f"app/{APP_ID}/x86_64/stable"
26+
FULL_X86_64_TEST_REF = f"app/{APP_ID}/x86_64/test"
2427
FLATPAK_APP_REFS = (
2528
APP_ID,
2629
DEFAULT_APP_REF,
2730
STABLE_APP_REF,
31+
TEST_APP_REF,
2832
FULL_AARCH64_MASTER_REF,
2933
FULL_AARCH64_STABLE_REF,
34+
FULL_AARCH64_TEST_REF,
3035
FULL_X86_64_MASTER_REF,
3136
FULL_X86_64_STABLE_REF,
37+
FULL_X86_64_TEST_REF,
3238
)
3339
SMOKE_APPLICATION_NAME = "mini-eq-flatpak-smoke"
3440
SMOKE_MEDIA_ROLE = "MiniEQSmoke"
@@ -82,14 +88,20 @@ def flatpak_run_command(app_ref: str, *app_args: str) -> list[str]:
8288
return ["flatpak", "run", DEFAULT_APP_REF, *app_args]
8389
if app_ref == STABLE_APP_REF:
8490
return ["flatpak", "run", STABLE_APP_REF, *app_args]
91+
if app_ref == TEST_APP_REF:
92+
return ["flatpak", "run", TEST_APP_REF, *app_args]
8593
if app_ref == FULL_AARCH64_MASTER_REF:
8694
return ["flatpak", "run", FULL_AARCH64_MASTER_REF, *app_args]
8795
if app_ref == FULL_AARCH64_STABLE_REF:
8896
return ["flatpak", "run", FULL_AARCH64_STABLE_REF, *app_args]
97+
if app_ref == FULL_AARCH64_TEST_REF:
98+
return ["flatpak", "run", FULL_AARCH64_TEST_REF, *app_args]
8999
if app_ref == FULL_X86_64_MASTER_REF:
90100
return ["flatpak", "run", FULL_X86_64_MASTER_REF, *app_args]
91101
if app_ref == FULL_X86_64_STABLE_REF:
92102
return ["flatpak", "run", FULL_X86_64_STABLE_REF, *app_args]
103+
if app_ref == FULL_X86_64_TEST_REF:
104+
return ["flatpak", "run", FULL_X86_64_TEST_REF, *app_args]
93105
raise RuntimeError(f"unsupported Flatpak app ref: {app_ref}")
94106

95107

0 commit comments

Comments
 (0)