Publish Toolkit benchmarks on Pages runner after main CI

This commit is contained in:
2026-10-18 21:50:25 -06:00
parent a77cd3a682
commit d0ecaea174
3 changed files with 19 additions and 6 deletions
+3
View File
@@ -1,6 +1,9 @@
name: public-benchmark-pages
on:
workflow_run:
workflows: [build-test-release]
types: [completed]
workflow_dispatch:
concurrency:
-6
View File
@@ -195,12 +195,6 @@ jobs:
with:
name: alkane-toolkit-benchmark-site-preview
path: bench-site/index.html
- name: Publish public benchmark page
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
BENCH_PAGES_DEPLOY_KEY: ${{ secrets.BENCH_PAGES_DEPLOY_KEY }}
run: python3 ci/publish-bench-pages.py toolkit
- name: Package artifact
if: steps.ver.outputs.release == 'true'
id: pkg
+16
View File
@@ -27,6 +27,22 @@ def main() -> int:
if job.get("container", {}).get("image") != IMAGE:
print(f"{path.name}: {name} has a different runner image", file=sys.stderr)
return 1
pages = yaml.load(
(ROOT / ".gitea/workflows/bench-pages.yml").read_text(),
Loader=yaml.BaseLoader,
)
if (pages["on"]["workflow_run"]["workflows"] != ["build-test-release"]
or pages["jobs"]["publish"].get("runs-on") != "alkane-pages"):
print("Benchmark Pages must follow main CI on the Pages runner", file=sys.stderr)
return 1
release = yaml.load(
(ROOT / ".gitea/workflows/release.yml").read_text(),
Loader=yaml.BaseLoader,
)
if any("ci/publish-bench-pages.py" in step.get("run", "")
for step in release["jobs"]["release"]["steps"]):
print("Main release must not publish Pages from GARM", file=sys.stderr)
return 1
print("Toolkit runner image pins: PASS")
return 0