Skip to content

.github/workflows: add a native Windows/arm64 test target#471

Open
hajimehoshi wants to merge 1 commit into
ebitengine:mainfrom
hajimehoshi:claude/pedantic-roentgen-dcdae3
Open

.github/workflows: add a native Windows/arm64 test target#471
hajimehoshi wants to merge 1 commit into
ebitengine:mainfrom
hajimehoshi:claude/pedantic-roentgen-dcdae3

Conversation

@hajimehoshi

@hajimehoshi hajimehoshi commented Jun 23, 2026

Copy link
Copy Markdown
Member

What issue is this addressing?

Closes #468

What type of issue is this addressing?

feature

What this PR does | solves

Adds a native windows-11-arm runner to the test job matrix (Go 1.25.x
and 1.26.x) so the Windows/arm64 ABI is exercised on real hardware.

The GitHub windows-11-arm image has no C toolchain that targets Windows
arm64 — its bundled gcc is an x86_64 mingw build and MSYS2 is omitted —
and zig cc's aarch64-windows backend crashes nondeterministically
(~40% of invocations, 0xc0000005/0xc0000409, no diagnostic) on the
runner. Rather than ship a flaky-toolchain workaround, the tests that
compile a C shared library at run time are skipped on windows/arm64,
mirroring the existing windows/386 skip. The remaining tests still cover
the Go callback and syscall paths on the platform.

Changes:

  • Add windows-11-arm to the matrix.
  • Centralize the "no C toolchain" skip in buildSharedLib (now taking
    testing.TB) so every C-library test inherits it and it can't be
    forgotten on a new call site. This also subsumes the existing
    windows/386 skip.
  • Skip the Windows steps that don't apply to arm64: the MSYS2 setup, the
    Cgo variant of the 386 test, and go test -race (the race detector is
    unsupported on windows/arm64).

Filed by Claude (Claude Code), on behalf of @hajimehoshi.

Copilot AI review requested due to automatic review settings June 23, 2026 04:06

Copilot AI 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.

Pull request overview

This PR extends the CI test matrix to run the test suite natively on Windows/arm64 using the hosted windows-11-arm runner, and adjusts the test helper that builds shared libraries so it can handle a multi-word CC (e.g., zig cc -target ...) needed on that runner.

Changes:

  • Add windows-11-arm to the main test matrix (Go 1.25.x and 1.26.x).
  • Install Zig on Windows/arm64 and configure Go to use it as CC for producing arm64 DLLs.
  • Update buildSharedLib to split go env CC into an executable + leading args for multi-word CC.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
func_test.go Updates buildSharedLib to support multi-word CC values used by the new Windows/arm64 CI configuration.
.github/workflows/test.yml Adds a native Windows/arm64 runner, installs/configures Zig for that target, and skips steps not applicable on Windows/arm64 (MSYS2, 386 cgo, race).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread func_test.go Outdated
@hajimehoshi hajimehoshi force-pushed the claude/pedantic-roentgen-dcdae3 branch 2 times, most recently from 0bca654 to 52e1817 Compare June 23, 2026 05:25
@hajimehoshi hajimehoshi requested a review from Copilot June 23, 2026 05:27

Copilot AI 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.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread func_test.go Outdated
Add windows-11-arm to the test matrix so the Windows/arm64 ABI is
exercised on real hardware (Go 1.25.x and 1.26.x).

The runner has no C toolchain that targets Windows arm64 (its bundled
gcc is an x86_64 mingw build and MSYS2 is omitted), so the tests that
compile a C shared library are skipped on windows/arm64, as they already
are on windows/386. The skip lives in buildSharedLib, so every test that
builds a C library inherits it. The remaining tests still cover the Go
callback and syscall paths on the platform.

Also skip the Windows steps that do not apply to arm64: the MSYS2 setup,
the Cgo variant of the 386 test, and the race detector, which Go does
not support on windows/arm64.

Closes ebitengine#468

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI 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.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@hajimehoshi

Copy link
Copy Markdown
Member Author

@TotallyGamerJet Please take a look, thanks

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.

Add a native Windows/arm64 CI target

2 participants