Skip to content

ci: fail over ubuntu sim/ut jobs to self-hosted when GitHub stalls#11

Closed
doraemonmj wants to merge 1 commit into
mainfrom
simci
Closed

ci: fail over ubuntu sim/ut jobs to self-hosted when GitHub stalls#11
doraemonmj wants to merge 1 commit into
mainfrom
simci

Conversation

@doraemonmj

Copy link
Copy Markdown
Owner

Add a GitHub-first, self-hosted fallback for the ubuntu-latest legs of ut, st-sim-a2a3 and st-sim-a5. Each *-ubuntu-fallback job mirrors its GitHub leg's result and only self-runs the tests when GitHub fails to schedule the primary within a timeout, so exactly one of the two runs the tests.

  • ci-wait-or-fallback.sh: poll sibling job status and decide mirror vs self-run (python3, no jq dependency).
  • ensure-gcc15.sh: alias an existing GCC 15 to g++-15/gcc-15 for sim builds.
  • ut self-run installs gtest from conda-forge (no sudo/apt on the runner).

Contains TEST-ONLY stall edits for the a2a3 leg to exercise the takeover path; revert them before relying on this in production.

@doraemonmj doraemonmj force-pushed the simci branch 2 times, most recently from 7454c0f to e546954 Compare July 6, 2026 08:05
When GitHub's hosted runner pool is congested, the ubuntu-latest CI legs
(ut / st-sim-a2a3 / st-sim-a5) can queue for a long time. Add a single
non-required, self-hosted ubuntu-fallback job that covers that rare stall
without changing how CI gates:

- The GitHub primaries stay the required checks and gate on their own results.
- ubuntu-fallback polls the three primaries in parallel and, per leg, DEFERS the
  moment GitHub starts running it (exiting in seconds, so the self-hosted slot is
  free in the common case) and only self-runs a leg GitHub never scheduled.
- On such a stall the required primary stays pending; a maintainer admin-merges
  using this job's green self-run.

Existing jobs are unchanged; this only adds the actions:read permission and the
new job. Decision logic lives in .github/scripts/ci-wait-or-fallback.sh
(DEFER / SELFRUN / RENAME_ERROR; python3, no jq).

Activation: register a self-hosted runner with a 'sim' label carrying GCC 15 /
gtest. The job is guarded to same-repo PRs and is non-required, so without such
a runner it stays queued but blocks nothing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant