Skip to content

Run CI across macOS, Windows, and the current stable Go - #89

Merged
ziggy42 merged 15 commits into
mainfrom
ci/platform-matrix
Aug 18, 2026
Merged

ziggy42 merged 15 commits into
mainfrom
ci/platform-matrix

Conversation

@ziggy42

@ziggy42 ziggy42 commented Aug 17, 2026 •

Copy link
Copy Markdown
Owner

Extends CI from a single Linux job to macOS, Windows and the current stable Go.

ziggy42 added 15 commits August 17, 2026 13:36
CI ran one job on ubuntu-latest with the Go version go.mod declares, so
neither the platforms Epsilon claims support for nor the Go most people
have installed were covered.

Split the workflow. The checks whose output is compared against the tree
(gofmt, mdformat, the benchmark wasm rebuild) stay on a single Linux job,
since a toolchain difference between platforms would surface there as a
failure rather than as drift. Testing runs across ubuntu and macOS, which
is arm64, against both the minimum Go go.mod declares and the current
stable release. The WASI testsuite asserts on host syscall behaviour, so
it stays on Linux.

Windows runs the runtime and the spec suite. wasip1 is excluded: it is
Unix-only by design, and NewWasiModuleBuilder().Build() reports that on
other platforms. Two things blocked the suite from building there:

- wasi_clocks_test.go carried no build constraint while constructing a
  WasiModule, which is declared in the unix-only file. This made
  `GOOS=windows go vet ./...` fail to type-check. The file now carries the
  same unix constraint wasi_resources_test.go already had.
- resolveBinary addressed the WABT binaries without a file extension, so
  the spec tests could not find wat2wasm.exe or wast2json.exe.

The Makefile selects a WABT build with uname and windows-latest has no
make, so that job installs WABT inline, reading the version from the
Makefile rather than repeating it.
setup-go, setup-uv and cache each ran on Node 20, which the runners
deprecate and now force onto Node 24, so every job logged a warning.
Move to the current majors: setup-go v7, cache v6, setup-uv v10. checkout
is already on Node 24 at v5.

Wrap the cache key and the WABT download URL to keep both within 80
columns.
astral-sh/setup-uv publishes exact version tags but moving major tags
only through v7, so the v10 the previous commit referenced does not
resolve and every job that loads the action failed to start. Address the
release itself. Both v7 and v10.0.1 run on node24, so either clears the
deprecation; this takes the current one.
The second step named itself after the matrix value, which is the literal
`go.mod` in the cells that read the version from the file, so both steps
appeared under one name there and the logs showed the same step running
and skipping. Name them for what they select instead. The job name
already carries which cell it is.
The comments named the project from inside it, hedged about what it
supports, and restated what the steps below them already say. Each one now
gives the reason its step is arranged the way it is and nothing else.
Both wrapped `git diff --exit-code` in a handler that printed a workflow
error and exited. The runner executes each `run` block with `bash -e`, so
the non-zero exit already failed the step; the handler only added an
annotation. Neither is worth a custom message where `vet` gets none: the
diff names the files it rewrote, and the step name says which check ran.
The key was folded across two lines only to fit in 80 columns, which put a
line break inside an expression. Giving the value its own line holds it in
79 without breaking it up.
The comment sat above the job, a strategy and two keys away from the list
it was about, and named only one of the two runners. State both next to
where they are declared.
The comment explained a package list at the end of the job from above the
job itself, and reached for the API that reports the restriction when the
restriction alone is the point.
The comments broke before the 80th column, so each one ran a line longer
than it needed to.
It opened by listing what the job holds and closed with a reason that
covered only half of it, since vet and the cross-compile have nothing to do
with drift. Lead with the constraint and say what the rest of the job is
separately.
It ran on Linux alone, guarded against syscall behaviour the host decides.
The suite passes on macOS, and wasip1 is where the platform differences
this matrix exists to find would actually appear, so run the whole suite
everywhere and let a real difference report itself.
The archive is 5 MB and unpacks in about two seconds, which is what
restoring the cache cost, so the cache bought nothing. It also held the
binaries the spec tests execute, and a cache entry is writable by refs
other than the one restoring it.
The job built the tree and then ran two packages from it. `go test ./...`
does both: it compiles every package, the CLI and the non-unix wasip1
build among them, and runs what applies to the platform, since the
unix-only tests carry a build constraint.
Nothing in the workflow writes through the API: the token reaches only
checkout. Declaring the scope it needs drops every other one to none and
holds that whatever the repository default becomes.
@ziggy42
ziggy42 marked this pull request as ready for review August 18, 2026 23:41
@ziggy42
ziggy42 merged commit ff46293 into main Aug 18, 2026
7 checks passed
@ziggy42
ziggy42 deleted the ci/platform-matrix branch August 18, 2026 23:42
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