From 017a0eb22c43f17bf553fe4c9dffc6af848e09f0 Mon Sep 17 00:00:00 2001 From: noah Date: Sun, 18 Oct 2026 19:47:34 -0600 Subject: [PATCH 1/5] Trigger CI badges after workflow completion --- .gitea/workflows/ci-badge.yml | 5 +++-- ci/last-attempt-badge.py | 4 ++-- ci/test-last-attempt-badge.py | 14 ++++++++++---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/ci-badge.yml b/.gitea/workflows/ci-badge.yml index d8680fb..b068a21 100644 --- a/.gitea/workflows/ci-badge.yml +++ b/.gitea/workflows/ci-badge.yml @@ -1,8 +1,9 @@ name: completed-ci-badge on: - schedule: - - cron: '*/15 * * * *' + workflow_run: + workflows: [main-release-gate, next-build] + types: [completed] workflow_dispatch: concurrency: diff --git a/ci/last-attempt-badge.py b/ci/last-attempt-badge.py index 118d610..94b2e5b 100644 --- a/ci/last-attempt-badge.py +++ b/ci/last-attempt-badge.py @@ -55,8 +55,8 @@ def publish(api: str, repo: str, branch: str, data: bytes, token: str) -> None: def main() -> None: - if os.environ["GITHUB_EVENT_NAME"] not in ("schedule", "workflow_dispatch"): - raise RuntimeError("badge publisher must run on a timer or manual dispatch") + if os.environ["GITHUB_EVENT_NAME"] not in ("workflow_run", "workflow_dispatch"): + raise RuntimeError("badge publisher must follow CI completion or manual dispatch") if os.environ["GITHUB_REF"] != "refs/heads/main": raise RuntimeError("badge publisher must use the main branch") repo = os.environ["GITHUB_REPOSITORY"] diff --git a/ci/test-last-attempt-badge.py b/ci/test-last-attempt-badge.py index c051984..120be81 100644 --- a/ci/test-last-attempt-badge.py +++ b/ci/test-last-attempt-badge.py @@ -36,7 +36,7 @@ assert b">fail" in svg assert b"#d1242f" in svg assert b">pass" in module.badge("next", "success", 108) environment = { - "GITHUB_EVENT_NAME": "schedule", + "GITHUB_EVENT_NAME": "workflow_run", "GITHUB_REF": "refs/heads/main", "GITHUB_REPOSITORY": "owner/repo", "GITHUB_API_URL": "https://example.invalid/api/v1", @@ -49,13 +49,19 @@ with patch.dict(os.environ, environment), \ module.main() assert latest.call_count == 2 assert [call.args[2] for call in published.call_args_list] == ["main", "next"] -with patch.dict(os.environ, {**environment, "GITHUB_EVENT_NAME": "workflow_run"}): +with patch.dict(os.environ, {**environment, "GITHUB_EVENT_NAME": "workflow_dispatch"}), \ + patch.object(module, "latest_completed", side_effect=[(201, "success"), + (202, "failure")]), \ + patch.object(module, "publish") as published: + module.main() + assert published.call_count == 2 +with patch.dict(os.environ, {**environment, "GITHUB_EVENT_NAME": "schedule"}): try: module.main() except RuntimeError as error: - assert "timer or manual dispatch" in str(error) + assert "CI completion or manual dispatch" in str(error) else: - raise AssertionError("workflow_run event entered badge publisher") + raise AssertionError("scheduled event entered badge publisher") for invalid in ("", "/main.svg", "../main.svg", "badges//main.svg"): try: publish_file("https://example.invalid/api/v1", "owner/repo", invalid, -- 2.54.0 From 17e73f246abbf570ed6322757a5fe71aeabf5e34 Mon Sep 17 00:00:00 2001 From: noah Date: Sun, 18 Oct 2026 19:56:11 -0600 Subject: [PATCH 2/5] Route short OS checks to Alkane fast runner --- .gitea/workflows/ci-badge.yml | 2 +- .gitea/workflows/next.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci-badge.yml b/.gitea/workflows/ci-badge.yml index b068a21..497da04 100644 --- a/.gitea/workflows/ci-badge.yml +++ b/.gitea/workflows/ci-badge.yml @@ -12,7 +12,7 @@ concurrency: jobs: publish: - runs-on: alkane-ci + runs-on: alkane-fast permissions: actions: read contents: write diff --git a/.gitea/workflows/next.yml b/.gitea/workflows/next.yml index 1309859..1b7b789 100644 --- a/.gitea/workflows/next.yml +++ b/.gitea/workflows/next.yml @@ -10,9 +10,10 @@ concurrency: jobs: build: - runs-on: alkane-ci + runs-on: alkane-fast env: CARGO_TARGET_DIR: target + CARGO_BUILD_JOBS: 2 steps: - uses: actions/checkout@v4 with: -- 2.54.0 From 9d705ec44f09bbe8e3e23d1e205770f0552d720e Mon Sep 17 00:00:00 2001 From: noah Date: Sun, 18 Oct 2026 19:57:10 -0600 Subject: [PATCH 3/5] Add fast OS source check for pull requests --- .gitea/workflows/fast-pr.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .gitea/workflows/fast-pr.yml diff --git a/.gitea/workflows/fast-pr.yml b/.gitea/workflows/fast-pr.yml new file mode 100644 index 0000000..b507e6f --- /dev/null +++ b/.gitea/workflows/fast-pr.yml @@ -0,0 +1,26 @@ +name: source-pr + +on: + pull_request: + branches: [main, next] + workflow_dispatch: + +concurrency: + group: alkane-os-source-pr-${{ github.ref }} + cancel-in-progress: true + +jobs: + source: + runs-on: alkane-fast + env: + CARGO_TARGET_DIR: target + CARGO_BUILD_JOBS: 2 + steps: + - uses: actions/checkout@v4 + - name: Check source + run: | + cargo fmt --check + cargo test --locked + - name: Clean generated source check + if: always() + run: python3 ci/cleanup-generated.py -- 2.54.0 From d496742500fe3d82759de92a36c56cf4f4396624 Mon Sep 17 00:00:00 2001 From: noah Date: Sun, 18 Oct 2026 19:58:02 -0600 Subject: [PATCH 4/5] Install Rust formatting component in fast OS check --- .gitea/workflows/fast-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/fast-pr.yml b/.gitea/workflows/fast-pr.yml index b507e6f..ed5c9af 100644 --- a/.gitea/workflows/fast-pr.yml +++ b/.gitea/workflows/fast-pr.yml @@ -19,6 +19,7 @@ jobs: - uses: actions/checkout@v4 - name: Check source run: | + rustup component add rustfmt cargo fmt --check cargo test --locked - name: Clean generated source check -- 2.54.0 From e19cc7a66bd556102a5f3e8a82793af87b14c3d2 Mon Sep 17 00:00:00 2001 From: noah Date: Sun, 18 Oct 2026 20:03:45 -0600 Subject: [PATCH 5/5] Publish OS benchmark Pages after main CI --- .gitea/workflows/bench-pages.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/bench-pages.yml b/.gitea/workflows/bench-pages.yml index f68fefa..7fb608e 100644 --- a/.gitea/workflows/bench-pages.yml +++ b/.gitea/workflows/bench-pages.yml @@ -1,8 +1,9 @@ name: public-benchmark-pages on: - schedule: - - cron: '*/15 * * * *' + workflow_run: + workflows: [main-release-gate] + types: [completed] workflow_dispatch: concurrency: -- 2.54.0