Skip to content

ci: run GOROOT for go-test-compat pull requests - #2424

Open
cpunion wants to merge 3 commits into
xgo-dev:mainfrom
cpunion:codex/goroot-label-trigger-20260826
Open

ci: run GOROOT for go-test-compat pull requests#2424
cpunion wants to merge 3 commits into
xgo-dev:mainfrom
cpunion:codex/goroot-label-trigger-20260826

Conversation

@cpunion

@cpunion cpunion commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Run the existing GOROOT matrix as opt-in pull-request checks when a PR has the existing go-test-compat label.

  • adding go-test-compat starts the matrix automatically;
  • pushing another commit or reopening the PR reruns the matrix while the label remains present;
  • adding an unrelated label does not restart an already labeled PR;
  • PRs without go-test-compat skip the GOROOT jobs;
  • manual dispatch and the nightly schedule remain unchanged;
  • no required-check or repository-ruleset change is included.

The existing pull-request concurrency key cancels an older GOROOT run when a labeled PR receives a newer commit.

Validation

  • GOTOOLCHAIN=local go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 .github/workflows/goroot.yml
  • git diff --check

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GOROOT PR label-gating review

This change adds a pull_request trigger to the GOROOT workflow and gates both the goroot matrix job and the goroot-summary job behind the go-test-compat label. Overall it is well-constructed and secure.

Strengths

  • Correct trigger: uses pull_request (not pull_request_target) with permissions: contents: read and no secret usage — fork PRs cannot exfiltrate secrets or write to the repo.
  • The gate correctly distinguishes the labeled action (reads github.event.label.name) from synchronize/reopened (reads contains(...labels.*.name, ...)), avoiding the common bug where a just-added label isn't yet visible in the label set.
  • Both jobs are gated in sync, so on unlabeled PRs the summary job is skipped rather than failing on missing artifacts / the report_count -ne 16 check.

Notes (non-blocking)

  • Inline comments below cover the substantive items (CI cost on synchronize, opened coverage, and gate duplication/drift risk).
  • Pre-existing, adjacent to the diff: the matrix comment at .github/workflows/goroot.yml:43-44 is contradictory — it states "Go 1.25 is intentionally omitted because it is not a compatibility target," but 1.25.0 is present in the matrix (line 36) and assigned the compatibility lane (lines 39-40). Not introduced by this PR, but worth correcting while nearby.
  • The label acts as the trust gate for running fork code; ensure go-test-compat is only appliable by trusted maintainers (a repo-settings concern, outside this diff).

No blocking issues found.

Comment thread .github/workflows/goroot.yml
Comment thread .github/workflows/goroot.yml
Comment thread .github/workflows/goroot.yml
@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown

LLGo baseline benchmarks

688be2abfe7e | workflow run | long-term charts

Program measurements

Platform Workload File size vs base Text size vs base Build vs base Run vs base
Linux cprintf 19256 B 0 B / +0.0% 387 B 0 B / +0.0% 278.885 ms +20.6 ms / +8.0% (worse) 975.085 us +147.6 us / +17.8% (worse)
Linux cprintf-lto 19088 B 0 B / +0.0% 368 B 0 B / +0.0% 270.121 ms +9.538 ms / +3.7% (worse) 941.397 us +129.3 us / +15.9% (worse)
Linux fmtprintf 1653232 B +8 B / +0.0004839% (worse) 501083 B 0 B / +0.0% 2.183 s -240.3 ms / -9.9% (better) 2.192 ms -267.3 us / -10.9% (better)
Linux fmtprintf-lto 1525824 B 0 B / +0.0% 459700 B 0 B / +0.0% 6.491 s -104.6 ms / -1.6% (better) 2.019 ms -71.55 us / -3.4% (better)
Linux println 62032 B 0 B / +0.0% 15261 B 0 B / +0.0% 262.665 ms -14.04 ms / -5.1% (better) 1.139 ms +63.54 us / +5.9% (worse)
Linux println-lto 53840 B 0 B / +0.0% 12882 B 0 B / +0.0% 413.661 ms +37.12 ms / +9.9% (worse) 1.166 ms +163.7 us / +16.3% (worse)
macOS cprintf 84480 B 0 B / +0.0% 16493 B 0 B / +0.0% 423.501 ms -90.59 ms / -17.6% (better) 3.290 ms -1.986 ms / -37.6% (better)
macOS cprintf-lto 100704 B 0 B / +0.0% 16473 B 0 B / +0.0% 510.667 ms +44.13 ms / +9.5% (worse) 3.117 ms +259.9 us / +9.1% (worse)
macOS fmtprintf 1498256 B 0 B / +0.0% 882133 B 0 B / +0.0% 2.604 s -878.4 ms / -25.2% (better) 6.361 ms -581.4 us / -8.4% (better)
macOS fmtprintf-lto 1208976 B 0 B / +0.0% 875129 B 0 B / +0.0% 6.540 s -3.73 s / -36.3% (better) 5.345 ms -8.878 ms / -62.4% (better)
macOS println 114832 B 0 B / +0.0% 34849 B 0 B / +0.0% 516.193 ms -7.418 ms / -1.4% (better) 4.116 ms -955 us / -18.8% (better)
macOS println-lto 118656 B 0 B / +0.0% 32489 B 0 B / +0.0% 697.318 ms -234.1 ms / -25.1% (better) 4.377 ms -3.064 ms / -41.2% (better)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 8.089 ns/op +0.015 ns/op / +0.2% (worse)
Linux BenchmarkMergeCompilerFlags 100.200 ns/op -0.4 ns/op / -0.4% (better)
Linux BenchmarkMergeLinkerFlags 64.080 ns/op -0.21 ns/op / -0.3% (better)
Linux BenchmarkChannelBuffered 40 ns/op -0.04 ns/op / -0.1% (better)
Linux BenchmarkChannelHandoff 24436 ns/op +214 ns/op / +0.9% (worse)
Linux BenchmarkDefer 35.630 ns/op -2.56 ns/op / -6.7% (better)
Linux BenchmarkDirectCall 0.247 ns/op -0.004 ns/op / -1.6% (better)
Linux BenchmarkGlobalRead 0.355 ns/op -0.0025 ns/op / -0.7% (better)
Linux BenchmarkGlobalWrite 6.958 ns/op -0.016 ns/op / -0.2% (better)
Linux BenchmarkGoroutine 36129 ns/op +3538 ns/op / +10.9% (worse)
Linux BenchmarkInterfaceCall 4.306 ns/op +0.02 ns/op / +0.5% (worse)
Linux BenchmarkRuntimeGetG 0.723 ns/op -0.0001 ns/op / -0.01384% (better)
macOS BenchmarkLookupPCRandom 11.620 ns/op -5.35 ns/op / -31.5% (better)
macOS BenchmarkMergeCompilerFlags 106.200 ns/op -160.6 ns/op / -60.2% (better)
macOS BenchmarkMergeLinkerFlags 70.610 ns/op -147.1 ns/op / -67.6% (better)
macOS BenchmarkChannelBuffered 24.530 ns/op -10.77 ns/op / -30.5% (better)
macOS BenchmarkChannelHandoff 6971 ns/op -4204 ns/op / -37.6% (better)
macOS BenchmarkDefer 34.730 ns/op -10.05 ns/op / -22.4% (better)
macOS BenchmarkDirectCall 1.251 ns/op -0.055 ns/op / -4.2% (better)
macOS BenchmarkGlobalRead 1.159 ns/op -0.156 ns/op / -11.9% (better)
macOS BenchmarkGlobalWrite 1.197 ns/op -0.135 ns/op / -10.1% (better)
macOS BenchmarkGoroutine 44324 ns/op +14519 ns/op / +48.7% (worse)
macOS BenchmarkInterfaceCall 5.424 ns/op -1.263 ns/op / -18.9% (better)
macOS BenchmarkRuntimeGetG 2.226 ns/op -0.794 ns/op / -26.3% (better)

Compared with 6fe8babd468c measured in the same runner job.

@cpunion cpunion added go-test-compat Go standard-library and GOROOT test compatibility and removed go-test-compat Go standard-library and GOROOT test compatibility labels Aug 26, 2026
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