Skip to content

Commit 8a3eca2

Browse files
ci-cxclaude
andcommitted
ci: run the secret-free post-merge Linux jobs on the GKE runner group
Move the Linux proof jobs of ci-post.yml, corpus-parity.yml and native-live.yml from the post-merge GCP VM fleet (and, for the two arm64 builds, the hosted ubuntu-24.04-arm runner) to the gke-runners group, one size label per job: gke-32cpu-64gb-amd64 build (Release) x4, sanitizers x4 8 jobs gke-16cpu-32gb-amd64 build-debug x2, kernel-only x2, native-live x2, corpus-parity 7 jobs gke-8cpu-16gb-amd64 preflight, preflight-slow, native-live-shards x4, corpus-parity-subset 7 jobs gke-16cpu-32gb-arm64 build-arm (Release, Debug) 2 jobs A run never asks for more than the group's 8 jobs per size label. The runner pod is non-root without sudo, so every moved job runs in a root job container (ubuntu:24.04 pinned by multi-arch index digest) whose first step installs the base toolchain (git, python3, build-essential, cmake, ninja ...); the existing dependency steps keep their package lists and only lose "sudo". Not moved: authz, changes and the aggregate jobs (hosted), ci.yml and corpus-parity-subset.yml (pull-request reachable), docs.yml, docs-post.yml, release.yml, promote-baseline.yml, release-ruleset-probe.yml (they hold credentials) and every macOS leg. scripts/ci_preflight.py pins each moved job to its exact label, the container block and the bootstrap step; it refuses the gke-runners group or a gke- label in any pull-request reachable workflow, a secret, id-token or environment on a job of the group or on a job that calls a workflow holding such jobs, sudo in a container job, a paid larger-runner label, and more than 8 jobs on one label (matrix, include/exclude and reusable-call expansion). actionlint knows the four labels. docs/ci.md is edited line for line and states that the jobs start only from the three workflows at refs/heads/main. docs/ci.md sentences replaced by the GKE routing text, named for the documentation-revert check by the commit that introduced each: - "Local reusable calls still cannot mix PR and post-merge verification fleets." (b0f4341) is replaced by "Local reusable calls cannot mix PR and GKE jobs." - "A full post run schedules 22 post-fleet jobs; the parity calls share one concurrency group." (8154993) is replaced by the 24-job GKE count per label. - "The amd64 post build shards use the post-merge GCP fleet; the two arm64 post cells run on hosted `ubuntu-24.04-arm`." (8154993) now reads GKE size labels. - "Credentialed work and the remaining full profiles retain their VM pins." (3ea5a0d) is replaced by the credentialed-docs pin sentence. - "The post fleet admits only push, schedule and dispatch on engine `main` and refuses all PR events." (3a0d150) is superseded by the GKE group-ref sentence. - "Post-fleet shards require `main` for dispatch; hosted arm64 keeps its fixed pin." (8154993) is replaced by "GKE jobs start only from ci-post.yml, corpus-parity.yml and native-live.yml at refs/heads/main". - "`HOSTED_JOB_RUNNERS` pins hosted jobs and post-fleet verification arrays; arm64 exceptions exclude PR callers." (8154993) now describes the exact GKE mappings. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
1 parent 6b33c47 commit 8a3eca2

8 files changed

Lines changed: 911 additions & 204 deletions

File tree

‎.github/actionlint.yaml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@ self-hosted-runner:
77
- pf-gcp-pr
88
- pf-gcp-post
99
- pf-gcp-main
10+
- gke-32cpu-64gb-amd64
11+
- gke-16cpu-32gb-amd64
12+
- gke-8cpu-16gb-amd64
13+
- gke-16cpu-32gb-arm64
1014
- pf-ci-x64
1115
- pf-ci-x64-16

‎.github/workflows/ci-post.yml‎

Lines changed: 86 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ env:
3232
PINEFORGE_REQUIRE_RELEASE_TAGS: "1"
3333

3434
# The canon authz gate admits our events before any checkout.
35-
# Light jobs and per-leg aggregates use hosted ubuntu-24.04; amd64 CTest shards use
36-
# the post-merge GCP fleet, and arm64 keeps ubuntu-24.04-arm.
37-
# Preflight remains on the post-merge fleet. scripts/ci_preflight.py pins routing.
35+
# Light jobs and per-leg aggregates use hosted ubuntu-24.04; Linux proof jobs use
36+
# the gke-runners group with separate amd64 and arm64 size labels.
37+
# Preflight and proof jobs use pinned root containers; preflight pins routing.
3838
# Each verification sizes its parallelism to the runner that took it.
3939
# scripts/ci_preflight.py pins every runner and shard count. GitHub's platform
4040
# maximum remains the only job time limit; docs/ci.md records the policy.
@@ -157,13 +157,22 @@ jobs:
157157
preflight:
158158
needs: [authz, changes]
159159
if: ${{ always() && needs.authz.result == 'success' }}
160-
runs-on: ["self-hosted","pf-gcp-post"]
160+
runs-on:
161+
group: gke-runners
162+
labels: gke-8cpu-16gb-amd64
163+
container:
164+
image: ubuntu:24.04@sha256:24737cef17f4e22b1977df7d9a05e77c4e28b7da5b8911f8d8ccda136bf3573c
165+
options: --user root
161166
env:
162167
PF_CI_LABELS: '["self-hosted","pf-ci","pf-ci-x64-16"]'
163168
PINEFORGE_VERIFIER_SLOW: ${{ needs.changes.result == 'success' && needs.changes.outputs.verifier_slow || 'true' }}
164169
# PRs run only source, documentation and policy checks. Build-driving
165170
# controls and dependency-heavy harness tests live in preflight-slow.
166171
steps:
172+
- name: Prepare the job container
173+
run: |
174+
apt-get update
175+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl git git-lfs jq unzip zip zstd xz-utils rsync tzdata python3 python3-venv python3-dev python3-pip build-essential cmake ninja-build pkg-config
167176
- name: Refuse an unauthorised run before anything else
168177
if: ${{ needs.authz.result != 'success' }}
169178
run: |
@@ -183,8 +192,8 @@ jobs:
183192
ACTIONLINT_SHA256: "8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8"
184193
run: |
185194
set -euo pipefail
186-
sudo apt-get update
187-
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y shellcheck
195+
apt-get update
196+
DEBIAN_FRONTEND=noninteractive apt-get install -y shellcheck
188197
tools_dir="$RUNNER_TEMP/pineforge-actionlint"
189198
mkdir -p "$tools_dir"
190199
archive="$tools_dir/actionlint.tar.gz"
@@ -211,8 +220,17 @@ jobs:
211220
preflight-slow:
212221
needs: [authz, changes]
213222
if: ${{ always() && needs.authz.result == 'success' }}
214-
runs-on: ["self-hosted","pf-gcp-post"]
223+
runs-on:
224+
group: gke-runners
225+
labels: gke-8cpu-16gb-amd64
226+
container:
227+
image: ubuntu:24.04@sha256:24737cef17f4e22b1977df7d9a05e77c4e28b7da5b8911f8d8ccda136bf3573c
228+
options: --user root
215229
steps:
230+
- name: Prepare the job container
231+
run: |
232+
apt-get update
233+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl git git-lfs jq unzip zip zstd xz-utils rsync tzdata python3 python3-venv python3-dev python3-pip build-essential cmake ninja-build pkg-config
216234
- name: Refuse an unauthorised run before anything else
217235
if: ${{ needs.authz.result != 'success' }}
218236
run: |
@@ -258,9 +276,18 @@ jobs:
258276
shard: [1, 2, 3, 4]
259277

260278
# Four shards divide roughly 15,300 measured CTest row-seconds.
261-
runs-on: ["self-hosted","pf-gcp-post"]
279+
runs-on:
280+
group: gke-runners
281+
labels: gke-32cpu-64gb-amd64
282+
container:
283+
image: ubuntu:24.04@sha256:24737cef17f4e22b1977df7d9a05e77c4e28b7da5b8911f8d8ccda136bf3573c
284+
options: --user root
262285

263286
steps:
287+
- name: Prepare the job container
288+
run: |
289+
apt-get update
290+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl git git-lfs jq unzip zip zstd xz-utils rsync tzdata python3 python3-venv python3-dev python3-pip build-essential cmake ninja-build pkg-config
264291
- name: Refuse an unauthorised run before anything else
265292
if: ${{ needs.authz.result != 'success' }}
266293
run: |
@@ -300,8 +327,8 @@ jobs:
300327
- name: Install dependencies (Linux)
301328
if: ${{ needs.authz.result == 'success' && runner.os == 'Linux' }}
302329
run: |
303-
sudo apt-get update
304-
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev tzdata-legacy ccache strace
330+
apt-get update
331+
DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev tzdata-legacy ccache strace
305332
306333
# PRs restore the newest compatible main cache via the default-branch
307334
# fallback. Only main writes this namespace, never a PR merge ref.
@@ -359,9 +386,18 @@ jobs:
359386
- os: ubuntu-24.04
360387
build_type: [Debug]
361388
shard: [1, 2]
362-
runs-on: ["self-hosted","pf-gcp-post"]
389+
runs-on:
390+
group: gke-runners
391+
labels: gke-16cpu-32gb-amd64
392+
container:
393+
image: ubuntu:24.04@sha256:24737cef17f4e22b1977df7d9a05e77c4e28b7da5b8911f8d8ccda136bf3573c
394+
options: --user root
363395

364396
steps:
397+
- name: Prepare the job container
398+
run: |
399+
apt-get update
400+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl git git-lfs jq unzip zip zstd xz-utils rsync tzdata python3 python3-venv python3-dev python3-pip build-essential cmake ninja-build pkg-config
365401
- name: Refuse an unauthorised run before anything else
366402
if: ${{ needs.authz.result != 'success' }}
367403
run: |
@@ -397,8 +433,8 @@ jobs:
397433
- name: Install dependencies (Linux)
398434
if: ${{ needs.authz.result == 'success' && runner.os == 'Linux' }}
399435
run: |
400-
sudo apt-get update
401-
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev tzdata-legacy ccache strace
436+
apt-get update
437+
DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev tzdata-legacy ccache strace
402438
403439
# Every shard restores the same key; only shard 1 publishes it.
404440
- name: Restore ccache
@@ -476,7 +512,7 @@ jobs:
476512
printf '%s\n' "shards: $SHARD_RESULT"
477513
[[ "$SHARD_RESULT" == "success" ]]
478514
479-
# Hosted arm64 cells run the same verification steps as the amd64 post fleet.
515+
# GKE arm64 cells run the same verification steps as the amd64 post jobs.
480516
build-arm:
481517
name: build (ubuntu-24.04-arm, ${{ matrix.build_type }})
482518
needs: [authz, changes]
@@ -485,9 +521,18 @@ jobs:
485521
fail-fast: false
486522
matrix:
487523
build_type: [Release, Debug]
488-
runs-on: ubuntu-24.04-arm
524+
runs-on:
525+
group: gke-runners
526+
labels: gke-16cpu-32gb-arm64
527+
container:
528+
image: ubuntu:24.04@sha256:24737cef17f4e22b1977df7d9a05e77c4e28b7da5b8911f8d8ccda136bf3573c
529+
options: --user root
489530

490531
steps:
532+
- name: Prepare the job container
533+
run: |
534+
apt-get update
535+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl git git-lfs jq unzip zip zstd xz-utils rsync tzdata python3 python3-venv python3-dev python3-pip build-essential cmake ninja-build pkg-config
491536
- name: Refuse an unauthorised run before anything else
492537
if: ${{ needs.authz.result != 'success' }}
493538
run: |
@@ -527,8 +572,8 @@ jobs:
527572
- name: Install dependencies (Linux)
528573
if: ${{ needs.authz.result == 'success' && runner.os == 'Linux' }}
529574
run: |
530-
sudo apt-get update
531-
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev tzdata-legacy ccache strace
575+
apt-get update
576+
DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev tzdata-legacy ccache strace
532577
533578
# PRs restore the newest compatible main cache via the default-branch
534579
# fallback. Only main writes this namespace, never a PR merge ref.
@@ -589,11 +634,20 @@ jobs:
589634
fail-fast: false
590635
matrix:
591636
shard: [1, 2, 3, 4]
592-
runs-on: ["self-hosted","pf-gcp-post"]
637+
runs-on:
638+
group: gke-runners
639+
labels: gke-32cpu-64gb-amd64
640+
container:
641+
image: ubuntu:24.04@sha256:24737cef17f4e22b1977df7d9a05e77c4e28b7da5b8911f8d8ccda136bf3573c
642+
options: --user root
593643
env:
594644
ASAN_OPTIONS: detect_leaks=1:halt_on_error=1:abort_on_error=1
595645
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
596646
steps:
647+
- name: Prepare the job container
648+
run: |
649+
apt-get update
650+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl git git-lfs jq unzip zip zstd xz-utils rsync tzdata python3 python3-venv python3-dev python3-pip build-essential cmake ninja-build pkg-config
597651
- name: Refuse an unauthorised run before anything else
598652
if: ${{ needs.authz.result != 'success' }}
599653
run: |
@@ -622,8 +676,8 @@ jobs:
622676
- name: Install dependencies
623677
if: ${{ needs.authz.result == 'success' }}
624678
run: |
625-
sudo apt-get update
626-
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev tzdata-legacy ccache
679+
apt-get update
680+
DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev tzdata-legacy ccache
627681
628682
- name: Restore ccache
629683
id: ccache-restore
@@ -691,8 +745,17 @@ jobs:
691745
fail-fast: false
692746
matrix:
693747
shard: [1, 2]
694-
runs-on: ["self-hosted","pf-gcp-post"]
748+
runs-on:
749+
group: gke-runners
750+
labels: gke-16cpu-32gb-amd64
751+
container:
752+
image: ubuntu:24.04@sha256:24737cef17f4e22b1977df7d9a05e77c4e28b7da5b8911f8d8ccda136bf3573c
753+
options: --user root
695754
steps:
755+
- name: Prepare the job container
756+
run: |
757+
apt-get update
758+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl git git-lfs jq unzip zip zstd xz-utils rsync tzdata python3 python3-venv python3-dev python3-pip build-essential cmake ninja-build pkg-config
696759
- name: Refuse an unauthorised run before anything else
697760
if: ${{ needs.authz.result != 'success' }}
698761
run: |
@@ -721,8 +784,8 @@ jobs:
721784
- name: Install dependencies
722785
if: ${{ needs.authz.result == 'success' }}
723786
run: |
724-
sudo apt-get update
725-
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y cmake ninja-build libeigen3-dev tzdata-legacy libsqlite3-dev libssl-dev zlib1g-dev ccache
787+
apt-get update
788+
DEBIAN_FRONTEND=noninteractive apt-get install -y cmake ninja-build libeigen3-dev tzdata-legacy libsqlite3-dev libssl-dev zlib1g-dev ccache
726789
727790
- name: Restore ccache
728791
id: ccache-restore

‎.github/workflows/corpus-parity.yml‎

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ env:
6868
# pin is almost entirely cache hits.
6969
CCACHE_MAXSIZE: 2G
7070

71-
# Both parity jobs follow canon authz on pf-gcp-post, with no hosted fallback.
71+
# Both parity jobs follow canon authz on gke-runners in pinned root containers.
7272
# The build uses every core of the runner.
7373
# scripts/ci_preflight.py pins runners and limits.
7474
jobs:
@@ -140,13 +140,22 @@ jobs:
140140
corpus-parity:
141141
needs: [authz]
142142
if: inputs.mode != 'subset' && github.event_name != 'pull_request'
143-
runs-on: ["self-hosted","pf-gcp-post"]
143+
runs-on:
144+
group: gke-runners
145+
labels: gke-16cpu-32gb-amd64
146+
container:
147+
image: ubuntu:24.04@sha256:24737cef17f4e22b1977df7d9a05e77c4e28b7da5b8911f8d8ccda136bf3573c
148+
options: --user root
144149
env:
145150
PF_CI_LABELS: '["self-hosted","pf-ci","pf-ci-x64-16"]'
146151
# 16.3-26.2 min on the standard runner; 360 minutes is the platform maximum,
147152
# the only hang catcher (owner rule,
148153
# 2026-10-12: no bound of our own may fail a run for slowness).
149154
steps:
155+
- name: Prepare the job container
156+
run: |
157+
apt-get update
158+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl git git-lfs jq unzip zip zstd xz-utils rsync tzdata python3 python3-venv python3-dev python3-pip build-essential cmake ninja-build pkg-config
150159
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
151160
with:
152161
fetch-depth: 1
@@ -158,8 +167,8 @@ jobs:
158167

159168
- name: Install dependencies
160169
run: |
161-
sudo apt-get update
162-
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev ccache git-lfs
170+
apt-get update
171+
DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev ccache git-lfs
163172
164173
# Separate from the parity script so the gitlink and the Git-LFS chart
165174
# feed are visible as their own step: the corpus ships ONE full-history
@@ -219,12 +228,21 @@ jobs:
219228
corpus-parity-subset:
220229
needs: [authz]
221230
if: inputs.mode == 'subset'
222-
runs-on: ["self-hosted","pf-gcp-post"]
231+
runs-on:
232+
group: gke-runners
233+
labels: gke-8cpu-16gb-amd64
234+
container:
235+
image: ubuntu:24.04@sha256:24737cef17f4e22b1977df7d9a05e77c4e28b7da5b8911f8d8ccda136bf3573c
236+
options: --user root
223237
env:
224238
PF_CI_LABELS: '["self-hosted","pf-ci","pf-ci-x64-16"]'
225239
# 1.8-4.7 min on the standard runner; 360 minutes is the platform
226240
# maximum, the only hang catcher (owner rule, 2026-10-12).
227241
steps:
242+
- name: Prepare the job container
243+
run: |
244+
apt-get update
245+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl git git-lfs jq unzip zip zstd xz-utils rsync tzdata python3 python3-venv python3-dev python3-pip build-essential cmake ninja-build pkg-config
228246
# Credentials stay persisted, exactly as the nightly job above: the
229247
# submodule clone and `git lfs pull` below go out over https and the
230248
# nightly is the configuration that is known to work for them.
@@ -239,8 +257,8 @@ jobs:
239257

240258
- name: Install dependencies
241259
run: |
242-
sudo apt-get update
243-
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev ccache git-lfs
260+
apt-get update
261+
DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev ccache git-lfs
244262
245263
- name: Resolve the recorded corpus gitlink
246264
id: pin

0 commit comments

Comments
 (0)