Run Linux CI jobs on local runners when PM_LOCAL_RUNNER=on, and cancel superseded PR runs
UN
3h ago+10+10+01234567890123456789-2-2-0123456789
Part of moving the fleet's CI off GitHub's shared 20-job pool. In 48 h the fleet used about 60,800 runner wall-minutes, about 21 concurrent runs against GitHub's limit of 20.
- Linux jobs (2):
runs-onis an expression. With the repository variablePM_LOCAL_RUNNER=on(set), they run on the fleet's local, ephemeral runners ([self-hosted, pm-local]): each a fresh container that takes one job, capped in CPU, memory and pids, with no Docker socket and no host mounts. - Fork pull requests always use
ubuntu-latest, and workflows from outside contributors' fork PRs now need approval (all_external_contributors). - Concurrency: a new push to a pull request cancels that PR's earlier CI run. Pushes to main and manual runs never wait for or cancel each other.
- Fallback: setting the variable to
offputs every job back on GitHub-hosted runners. The controller does this by itself if no LAN host is reachable for 10 minutes.
Required check names are unchanged. Pilot: unbraind/pm-memory#73.
Summary by Sourcery
Enable optional local execution for Linux CI jobs and prevent outdated pull request runs from consuming runner capacity.
New Features:
- Allow Linux CI jobs to run on fleet-local ephemeral runners when enabled, while keeping fork pull requests on GitHub-hosted runners.
Enhancements:
- Cancel superseded pull request CI runs while keeping main-branch and manual runs independent.
- Retain GitHub-hosted runners as the fallback when local execution is disabled or unavailable.
Summary by cubic
Offloads the two Linux CI jobs to the fleet's local ephemeral runners when the PM_LOCAL_RUNNER repository variable is on, and cancels superseded pull request runs so CI no longer saturates GitHub's 20-job pool.
- Jobs run on
[self-hosted, pm-local]containers (fresh, resource-capped, no Docker socket, no host mounts); fork PRs always stay onubuntu-latest. - Setting
PM_LOCAL_RUNNERtooff(or leaving it unset) keeps everything on GitHub-hosted runners. - A new push to a pull request cancels that PR's earlier run; pushes to main and manual runs never wait for or cancel each other.
- Required check names are unchanged; pilot in unbraind/pm-memory#73.