feat(ci): add runner selection (build-matrix + array runs-on) - #8
Merged
Conversation
monsieurleberre
enabled auto-merge (squash)
June 6, 2026 15:02
peaceful-bot
approved these changes
Jun 6, 2026
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-open
Deferred: input validation for the array-string
runs-onongo-ci/terraform-ci/build-and-test— a malformed value already fails the run loudly (thefromJSONtemplate error), the value comes from the trusted caller's own workflow file, and adding a validation job to each workflow would put an extra check in every caller's graph. Disproportionate to the risk.Summary
Adds runner-selection capability to the public reusable CI workflows so org repos can move CI onto self-hosted runners (e.g. the Hetzner pool) and support cross-platform matrices, added additively — every existing
@v1caller behaves identically.Changes
csharp-ci.yaml/scala-ci.yaml: new optionalbuild-matrixinput (JSON array of{ name, runner, coverage }shards) that fully replacesos-listwhen set. A newnormalizejob runsscripts/normalize-ci-matrix.shto compute the effective matrix, feedingbuild-and-testviastrategy.matrix.include;runs-on: ${{ matrix.runner }}accepts a string or an array of labels; coverage-gated steps switch fromif: matrix.os == 'ubuntu-latest'toif: ${{ matrix.coverage }}.scripts/normalize-ci-matrix.sh(new, tested): mapsbuild-matrixoros-listto one effective matrix JSON. Theos-listpath reproduces today's behaviour bit-for-bit. Fails loud with a::error::annotation on a malformed matrix (>1 coverage shard, missing/emptyname/runner, non-booleancoverage, non-array, invalid JSON, empty result).go-ci.yaml/terraform-ci.yaml:runs-onnow also accepts a JSON array string (e.g.'["self-hosted", "hetzner"]') in addition to a plain label.build-and-test.yaml: newruns-oninput (empty-safe — it also runs onpush/pull_requestwhereinputsis empty); also wires the new test into the shell-test step.Back-compat
Callers passing only
os-list(or nothing) get an identicalbuild-and-testjob graph and identical coverage behaviour. The one visible graph change is an addednormalize matrixcheck oncsharp-ci/scala-cicallers.Testing
test/normalize-ci-matrix_test.sh— 28 cases (back-compat, precedence, all fail-loud paths,::error::annotations). Runs in CI viabuild-and-test.yaml.actionlintv1.7.7 clean on all workflows;shellcheckclean on the new script + test; existingroute-nuget-push_test.shstill green.