Repository navigation
ci: GitHub-hosted + self-hosted runners (fastest wins), term-guard via curl/jq, image smoke RC-only - #430
ci: GitHub-hosted + self-hosted runners (fastest wins), term-guard via curl/jq, image smoke RC-only#430jencryzthers wants to merge 9 commits into
Conversation
…the vm-sudo runner
…xt, CodeQL advanced setup
…equests Self-hosted runners have no gh CLI. term-guard fetches the pull request diff and up to three pages of commits with curl and jq, using GITHUB_TOKEN, and fails if either tool is missing. The image build and boot smoke is a full-suite check. Pull requests no longer start it. It runs on release candidate branches, version tags, manual dispatch, and main when an image input changes. Co-authored-by: Jean-Christophe Proulx <j.christophe@devjc.net>
…date Jobs may use a self-hosted runner or a GitHub-hosted label. ubuntu-latest is the Linux default for term-guard, the image boot smoke, and the runner guard. The label check no longer fails on ubuntu-latest. The image build stays off pull requests. It runs on release candidate branches, version tags, and manual dispatch. Co-authored-by: Jean-Christophe Proulx <j.christophe@devjc.net>
Linux jobs waiting on self-hosted runners, including jobs that need sudo, now use ubuntu-latest. Windows and macOS jobs keep their self-hosted labels. Repository guards are unchanged. Co-authored-by: Jean-Christophe Proulx <j.christophe@devjc.net>
Linux and sudo jobs use ubuntu-latest, Windows windows-latest, macOS and iOS macos-latest, and Linux ARM64 ubuntu-24.04-arm. CodeQL swift uses macos-latest. The runner guard fails on any self-hosted label. Repository guards stay. Co-authored-by: Jean-Christophe Proulx <j.christophe@devjc.net>
|
Superseded. This pull request stays open and is not merged. The same work is split into smaller pull requests off main:
Not split out of this pull request:
|
|
Closing this draft. Cryptic confirmed the split, and the small pull requests that replace it are open:
Term-guard (curl + jq, GitHub-hosted) is #439, opened separately. The CLA workflow change on this branch was only the fork guard, so there is no CLA pull request. The release-candidate-only image smoke change is not part of this split. |
Keep #430 repository guards, GitHub-hosted runners, and image smoke off pull requests. Take main's Windows Vitest/Electron/voice-bench fixes, CRLF runner-guard reads, hosted-label allowlist, CodeQL upload-only-when-true, and the hardened term-guard curl fetch. Co-authored-by: Jean-Christophe Proulx <j.christophe@devjc.net>
|
Fusion de Intention gardée de #430 : runners GitHub-hosted, garde de dépôt sur chaque job, smoke image hors des pull requests, term-guard en curl/jq. Correctifs de Fichiers en conflit et résolution
Les tests produit Windows de #438 (Electron, Local VM, voice-bench, plugins) sont entrés sans conflit. PreuveFixtures négatives (chacune exit 1, message attendu) :
Fixtures positives exit 0 : Le banc vocal synthétique CIBranche poussée : |
Policy: no job runs on a GitHub-hosted runner. This moves all 39 hosted jobs on main to self-hosted labels and adds a guard so none come back.
Guard
scripts/check-runner-labels.mjsscans.github/workflows/*.ymland fails on anyruns-onthat usesubuntu-*,windows-*,macos-*,*-latest, a matrix/expression resolving to those, or that lacksself-hosted..github/workflows/runner-guard.ymlruns it on[self-hosted, linux, x64]for PRs touching workflows, pushes to main and the merge queue. It passes on this branch.Label sets
[self-hosted, linux, x64][self-hosted, linux, x64, ephrunner.vm-sudo][self-hosted, macOS, ARM64, ephrunner.mac][self-hosted, windows, x64, ephrunner.vm-windows][self-hosted, linux, ARM64]Jobs on
ephrunner.vm-sudo,ephrunner.mac,ephrunner.vm-windowsand ARM64 stay queued until those runners exist. That is accepted.Jobs moved
ci.yml
linux/windows/macos, mapped inruns-onto the label sets aboverelease.yml: prepare, ci, assemble -> Linux; linux -> Linux vm-sudo; mac -> macOS; windows -> Windows (all only run from the release workflow, push of package.json on main or dispatch, unchanged)
Other workflows
Gating changes (Windows/macOS only on release or manual dispatch)
scripts/ci-scope.mjs:platforms=trueand the Linux+Windows+macOS vitest matrix only forworkflow_dispatch. Pull requests, main pushes and merge groups now run Linux only, and windows-cua, electron-smokes, ios and the Windows packaged-server leg are skipped (the CI gate already accepts them skipped whenplatforms=false).workflow_dispatchonly.if: github.event_name == 'workflow_dispatch'(the PR-triggered Linux build still runs).if: github.event_name == 'workflow_dispatch'(was every non-PR event).workflow_dispatchonly, so PRs don't wait on an ARM64 runner that doesn't exist.Unmapped / notes
process.arch == "arm64", so it needs a real ARM64 Linux runner; there is no such label yet. It is labeled[self-hosted, linux, ARM64]and gated to manual runs.scripts/ci-scope.test.ts,scripts/ci-workflow.test.ts(new matrix keys, gating and labels);scripts/testing/update-shard-weights.mjsreadsvitest (windows, shard N/4)job names.Repository guard
if:starts with(!startsWith(github.event_name, 'pull_request') || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name != 'workflow_run' || github.event.workflow_run.head_repository.full_name == github.repository). The first clause coverspull_requestandpull_request_target(head repository must be this one); the second coversworkflow_run(the triggering run's head repository must be this one).github.event.comment.author_associationin OWNER/MEMBER/COLLABORATOR.env:, never${{ }}insiderun:.pull_request_target/workflow_runworkflows never check out the pull request head and never persist checkout credentials.scripts/check-runner-labels.mjsenforces all of the above plus self-hosted labels;scripts/check-runner-labels.test.mjsruns it against fixtures inscripts/testing/runner-guard-fixtures/.runner-guard.ymlruns both.workflow_runfor runs whose head is in another repository, are skipped, including term-guard and the CLA check.all_external_contributors.CodeQL
Advanced setup in
.github/workflows/codeql.yml: javascript-typescript, actions and python on[self-hosted, linux, x64]; swift on[self-hosted, macOS, ARM64, ephrunner.mac], manual only. Both guarded. Results upload unless the repository variableCODEQL_ADVANCED_UPLOADisfalse; default setup must be turned off in repository settings for uploads to be accepted (not changed here).Preuve
Negative fixtures (each exits 1 with the expected message):
GitHub-hosted label(s) ubuntu-latestruns-on resolves through a matrix/expression without self-hostedjob a lacks the leading repository guardpull_request_target)job a lacks the leading repository guardpull_request_target/workflow_run must not check out pull request codeissue_comment)runs on a comment trigger without the actor guard${{ github.event.pull_request.title }}inrun:)run: expands event text with ${{ }}; pass it through env: and quote itworkflow_run, no head repository check)job a lacks the leading repository guardPositive fixtures exit 0:
good(pull_request_target + issue_comment, guarded, title via env) andworkflow-run-good(workflow_run with the head repository check).All workflow and fixture files parse as YAML.