From a6ca7e24738c6b8bced4e5009b2b2b95644b62b2 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Thu, 3 Sep 2026 22:03:38 +0200 Subject: [PATCH] Add the Windows peer of darwin-stub MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A fleet-wide audit of the 601 repositories holding Go code put this one a single lane short of the standard: no windows-latest runner. Windows is the fleet's real gap — absent from 327 of 601 (54.4%), where each exotic architecture is missing from only ~189 (31.4%). The `cross` job already builds windows/amd64 and windows/arm64, which proves the module compiles there and nothing more. This runs the suite on a real Windows host, the way darwin-stub already does for macOS. CGO_ENABLED goes in `env` rather than in front of each command: the POSIX prefix darwin-stub uses (`CGO_ENABLED=0 go vet ./...`) is read by PowerShell as a command it cannot find, and that idiom is the reason several repositories in this fleet had no Windows lane at all. Checked before proposing: `go vet` passes with GOOS=windows and every test binary cross-compiles for windows/amd64. Co-Authored-By: Claude Opus 5 --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04c2e4f..3f751cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,6 +83,30 @@ jobs: # apksigner against the runner's own SDK. This proves the shipped host # sources and build.sh still produce a signed, installable package, and that # the Go application still cross-builds into it. + # The Windows peer of darwin-stub. The module already CROSS-BUILDS for + # windows/amd64 and windows/arm64 in the `cross` job, which proves it + # compiles and nothing more; this runs the suite on a real Windows host, the + # way darwin-stub does for macOS. + # + # CGO_ENABLED goes in env rather than in front of each command: the POSIX + # prefix that darwin-stub uses is read by PowerShell as a command it cannot + # find, which is the reason several repositories in this fleet had no Windows + # lane at all. + windows-stub: + name: windows (stub) + runs-on: windows-latest + env: + CGO_ENABLED: "0" + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-go@v7 + with: + go-version: stable + - run: go vet ./... + - run: go build ./... + - run: go test ./... + + apk: name: apk (host + application) runs-on: ubuntu-latest