Repository navigation
Run CI across macOS, Windows, and the current stable Go - #89
Merged
Merged
Conversation
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.
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.
Extends CI from a single Linux job to macOS, Windows and the current stable Go.