Skip to content

ci: move to the ecosystem CI standard - #247

Merged
kolkov merged 3 commits into
mainfrom
ci/ecosystem-standard
Nov 8, 2026
Merged

kolkov merged 3 commits into
mainfrom
ci/ecosystem-standard

Conversation

@kolkov

@kolkov kolkov commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Moves ui's CI to the pattern gogpu now runs on main (ci.yml at ef8260b).

The main gap it closes: tests did not gate the merge on macOS and Windows. Only the ubuntu job ran the plain tests, and the race step on every OS ran kolkov/racedetector with continue-on-error: true, so neither a race nor a macOS/Windows test failure turned CI red.

Changes in .github/workflows/ci.yml:

  • go test on all three OS, plus go test -race with CGO_ENABLED=1 on that step only. Everything else stays at CGO_ENABLED=0, the build users ship.
  • golangci-lint v2.15.0 comes from the shared gogpu/.github setup action (cached, sha256-checked) instead of downloading latest on every run. Earlier today that download returned 504 for over an hour.
  • New Lint - windows/amd64 and Lint - darwin/arm64 legs. ui has no per-OS files of its own, but desktop/ and the examples compile against gogpu's per-OS API, which the Linux lint never sees.
  • Every action is pinned by commit SHA with a version comment, and .github/dependabot.yml keeps them current. The root module is left out of Dependabot, since ecosystem deps move only to released versions in cascade order.
  • go mod tidy must leave go.mod/go.sum unchanged. The separate examples build step is gone, because the examples are part of ./... since 0.1.55.
  • A Required checks job depends on every other job and fails unless all of them succeeded. The branch ruleset will require only this job; that switch is a separate settings change.

A second commit corrects the 0.1.55 CHANGELOG note about the readback tests. They ran on the 0.1.54 dependencies; wgpu v0.34 would have made them skip, and the row padding prevents that. The release notes already say this.

The third commit fixes a data race in a test double that the old setup never reported. go test -race on macOS caught it on the first run: the window's animation pumper calls RequestRedraw from its own goroutine, and the mock provider counted those calls in a plain int while the test read it. The hosts allow that call from any goroutine (gogpu documents it), so production code is unchanged and the counter is now atomic. The Test matrix also gets fail-fast: false: on that run the macOS failure cancelled the Linux and Windows jobs, which hid their results.

Proving the new checks can fail. Two runs had a temporary probe commit, since dropped (runs 42469289570 and 42469586731). It added an unused function that only windows compiles, another that only darwin compiles, and a test with a data race. On the second run:

  • Lint - windows/amd64 and Lint - darwin/arm64 each flagged their probe, and Linux Lint stayed green;
  • the plain tests passed on all three OS, then -race failed on all three, on the probe test only;
  • Required checks failed.

Local, with GOWORK=off: golangci-lint for linux/amd64, windows/amd64 and darwin/arm64 reports 0 issues without the probe commit. With it, windows and darwin each report their probe and linux reports 0. go mod tidy leaves no diff.

Tests now gate the merge on all three OS. Before, only ubuntu ran the
plain tests, and the race step (an external instrumenter) had
continue-on-error, so a race or a macOS/Windows test failure never
turned CI red.

- go test on every OS; go test -race with CGO_ENABLED=1 on that step
  only (the toolchain's ThreadSanitizer), replacing kolkov/racedetector
- golangci-lint v2.15.0 from the shared gogpu/.github setup action
  (cached, sha256-checked) instead of a per-job download of latest
- lint-targets: windows/amd64 and darwin/arm64 legs, since desktop/ and
  the examples compile against gogpu's per-OS API
- every action pinned by commit SHA; Dependabot for github-actions
- go mod tidy check; the examples step is gone (they are in ./...)
- a Required checks job over every job, for the ruleset to require

Pattern copied from gogpu ci.yml at ef8260b (LEAD-005).
The readback tests ran on the 0.1.54 dependencies. They would only have
started skipping under wgpu v0.34, which rejects an unpadded copy; the
padding added in 0.1.55 keeps them running. The release notes already
say this.
The window's animation pumper calls WindowProvider.RequestRedraw from its
own goroutine, which the hosts allow (gogpu documents it as safe from any
goroutine). The test double incremented a plain int there while the test
read it, and go test -race reported it on macOS in
TestWindow_AnimPumper_StartsOnInvalidation. The production path is
unchanged.
@kolkov
kolkov force-pushed the ci/ecosystem-standard branch from 30540e0 to 8546b7b Compare November 8, 2026 10:05
@codecov

codecov Bot commented Nov 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kolkov
kolkov merged commit bc0cb25 into main Nov 8, 2026
12 checks passed
@kolkov
kolkov deleted the ci/ecosystem-standard branch November 8, 2026 10:09
kolkov added a commit to gogpu/g3d that referenced this pull request Nov 8, 2026
The test matrix covers oldstable and stable; test-minimum runs exactly the
go.mod line (1.25), which this machine never tests. fail-fast: false keeps
one OS's race failure from cancelling the others and hiding their results
(gogpu/ui#247).

Vulncheck is informational: it is not in the gate, so a new CVE does not
block unrelated PRs, and a finding with no fixed version yet does not turn
the run red.

No 386 leg: measured 2026-11-08, wgpu v0.34.9 does not compile for 32-bit
(constant 4294967294 overflows int in core/track) and goffi has no 386
syscall implementation.
kolkov added a commit to gogpu/gogpu that referenced this pull request Nov 8, 2026
One failing leg must not cancel the others: each OS and Go version is its
own evidence (gogpu/ui#247).
kolkov added a commit to gogpu/gogpu that referenced this pull request Nov 8, 2026
One failing leg must not cancel the others: each OS and Go version is its
own evidence (gogpu/ui#247).
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