Skip to content

Commit 14f864a

Browse files
committed
Fix hosted release gate setup
1 parent 8954429 commit 14f864a

4 files changed

Lines changed: 35 additions & 34 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ jobs:
531531
python3-pyatspi \
532532
python3-setuptools \
533533
python3-venv \
534+
patchelf \
534535
wireplumber
535536
536537
- name: Build source environment and run live UI smoke

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ jobs:
266266
python3-pyatspi \
267267
python3-setuptools \
268268
python3-venv \
269+
patchelf \
269270
wireplumber
270271
271272
- name: Build source environment and run live UI smoke
@@ -338,40 +339,8 @@ jobs:
338339
ref: ${{ inputs.target }}
339340
fetch-depth: 0
340341

341-
- name: Install release preflight dependencies
342-
run: |
343-
sudo apt-get update
344-
sudo apt-get install -y \
345-
appstream \
346-
build-essential \
347-
dbus-user-session \
348-
desktop-file-utils \
349-
gir1.2-adw-1 \
350-
gir1.2-gtk-4.0 \
351-
git \
352-
gnome-shell \
353-
gobject-introspection \
354-
libebur128-1 \
355-
libgirepository1.0-dev \
356-
libglib2.0-dev \
357-
libpipewire-0.3-dev \
358-
libspa-0.2-modules \
359-
meson \
360-
ninja-build \
361-
pipewire \
362-
pkg-config \
363-
python3 \
364-
python3-cairo \
365-
python3-dev \
366-
python3-gi \
367-
python3-numpy \
368-
python3-pip \
369-
python3-setuptools \
370-
python3-venv \
371-
wireplumber
372-
373342
- name: Run release preflight
374-
run: docker/run-release-preflight.sh
343+
run: tools/run_release_preflight_container.sh
375344

376345
build:
377346
name: Build release artifacts

‎tests/test_github_workflows.py‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def test_release_workflow_blocks_publish_on_release_preflight() -> None:
4949
release_yml = workflow_text("release.yml")
5050

5151
assert "preflight:" in release_yml
52-
assert "docker/run-release-preflight.sh" in release_yml
52+
assert "tools/run_release_preflight_container.sh" in release_yml
5353
assert "preflight" in release_yml.partition("build:")[2].partition("runs-on:")[0]
5454

5555

@@ -61,3 +61,14 @@ def test_ci_scope_treats_release_workflow_and_release_gate_tools_as_tested_chang
6161
assert "tools/release_runtime_gate.py" in ci_yml
6262
assert "live_ui_runtime_smoke" in ci_yml
6363
assert "tools/run_live_ui_runtime_smoke_ci.sh" in ci_yml
64+
65+
66+
def test_live_ui_runtime_smoke_uses_host_gir_build_environment() -> None:
67+
release_yml = workflow_text("release.yml")
68+
ci_yml = workflow_text("ci.yml")
69+
script = (ROOT / "tools/run_live_ui_runtime_smoke_ci.sh").read_text(encoding="utf-8")
70+
71+
assert "patchelf" in release_yml
72+
assert "patchelf" in ci_yml
73+
assert "pipewire-gobject" in script
74+
assert "--no-build-isolation" in script

‎tools/run_live_ui_runtime_smoke_ci.sh‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,29 @@ timeout="${MINI_EQ_LIVE_UI_TIMEOUT:-35}"
66
cycles="${MINI_EQ_LIVE_UI_CYCLES:-3}"
77
audio_duration="${MINI_EQ_LIVE_UI_AUDIO_DURATION:-180}"
88

9+
repo_root="$(git rev-parse --show-toplevel)"
10+
cd "$repo_root"
11+
912
rm -rf "$venv"
1013
python3 -m venv --system-site-packages "$venv"
14+
PATH="$venv/bin:$PATH"
15+
export PATH
1116
"$venv/bin/python" -m pip install --upgrade pip
17+
pwg_requirement="$("$venv/bin/python" - <<'PY'
18+
import tomllib
19+
from pathlib import Path
20+
21+
project = tomllib.loads(Path("pyproject.toml").read_text(encoding="utf-8"))["project"]
22+
for dependency in project["dependencies"]:
23+
if dependency.lower().startswith("pipewire-gobject"):
24+
print(dependency)
25+
break
26+
else:
27+
raise SystemExit("pyproject.toml does not declare a pipewire-gobject dependency")
28+
PY
29+
)"
30+
"$venv/bin/python" -m pip install "meson-python>=0.18" "meson>=1.2" ninja packaging
31+
"$venv/bin/python" -m pip install --no-build-isolation "$pwg_requirement"
1232
"$venv/bin/python" -m pip install -e '.[dev]'
1333
"$venv/bin/python" tools/check_live_ui_runtime.py \
1434
--timeout "$timeout" \

0 commit comments

Comments
 (0)