Skip to content

.github/workflows: use macos-15 instead of macos-latest#483

Merged
hajimehoshi merged 1 commit into
ebitengine:0.10from
hajimehoshi:claude/0.10-pin-macos-15
Jul 18, 2026
Merged

.github/workflows: use macos-15 instead of macos-latest#483
hajimehoshi merged 1 commit into
ebitengine:0.10from
hajimehoshi:claude/0.10-pin-macos-15

Conversation

@hajimehoshi

Copy link
Copy Markdown
Member

What issue is this addressing?

Updates #482

What type of issue is this addressing?

bug

What this PR does | solves

CI on this branch is red because GitHub's macos-latest label has migrated to macOS 26. On macOS 26, dyld refuses to exec a Mach-O binary that has no LC_UUID load command, so the test binaries abort before main runs:

dyld[9810]: missing LC_UUID load command in .../b001/purego.test
signal: abort trap
FAIL	github.com/ebitengine/purego	0.003s

The Go linker emits LC_UUID only when -B is passed, and -B gobuildid became the default in Go 1.24 (cmd/link/internal/ld/main.go). Go 1.20 through 1.23 therefore produce binaries that macOS 26 will not start. CoreFoundation, pulled in by the cgo-enabled net package, is what triggers dyld's check, which is why CGO_ENABLED=0 passes and CGO_ENABLED=1 fails within the same step.

Measured on macOS 26.5 with this branch's tree:

Go LC_UUID LC_BUILD_VERSION CGO_ENABLED=1 test binary
1.18.10 absent minos 12.0 runs
1.19.13 absent minos 12.x runs
1.20.14 absent minos 26.0 dyld: missing LC_UUID
1.21.x absent expected to fail
1.22.12 absent minos 26.x dyld: missing LC_UUID
1.23.11 absent minos 26.x dyld: missing LC_UUID
1.25.7 / 1.26.5 present minos 26.x runs

Go 1.18/1.19 survive only because their linker stamps an old SDK version in LC_BUILD_VERSION, so dyld applies the pre-26 rules. That is incidental, not something to rely on.

This branch supports Go 1.18 and later, so the affected Go versions cannot simply be dropped from the matrix. Pinning the runner to macos-15 keeps the full matrix working. macos-15 is the arm64 image, the same architecture macos-latest resolved to before and after the macOS 26 migration, so test coverage is unchanged.

Notes for reviewers

  • main needs no equivalent change: all: drop support for Go 1.18 through 1.24 #469 reduced its matrix to Go 1.25+, all of which emit LC_UUID by default. The same commit passed on main and failed on this branch on the same day.
  • Alternatives considered and rejected:
    • -ldflags=-B=gobuildid on the macOS test commands works for Go 1.22/1.23, but Go 1.20/1.21 reject the flag (-B argument must start with 0x: gobuildid) and cannot emit LC_UUID at all.
    • Dropping Go 1.20-1.23 from the macOS matrix loses coverage that macos-15 can still provide.
  • This fix lasts only as long as GitHub offers macos-15. Once that label is retired, the Go 1.20-1.23 macOS cells will have to be dropped rather than fixed.
  • Job names change from ... on macos-latest to ... on macos-15. This branch has no branch protection, so no required status check is pinned to the old names.

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

macos-latest now points at macOS 26, where dyld refuses to run a
binary that has no LC_UUID load command. The Go linker emits LC_UUID
only since Go 1.24, so the tests with Go 1.20 through 1.23 fail to
start on macOS 26.

This branch supports Go 1.18 and later, so the affected Go versions
cannot be dropped. Pin the runner to macOS 15 instead.

Updates ebitengine#482

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 18, 2026 14:18

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

Pins the macOS GitHub Actions runner to a stable version to keep the 0.10 branch CI matrix (Go 1.18–1.26) passing now that macos-latest has moved to macOS 26, where older Go toolchains can produce Mach-O binaries that dyld refuses to execute.

Changes:

  • Switch the workflow matrix from macos-latest to macos-15.
  • Add inline documentation in the workflow explaining the dyld / LC_UUID incompatibility and referencing issue #482.

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

@hajimehoshi

Copy link
Copy Markdown
Member Author

@TotallyGamerJet PTAL. The merge target is 0.10, not main

@TotallyGamerJet TotallyGamerJet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hajimehoshi
hajimehoshi merged commit 7f6f138 into ebitengine:0.10 Jul 18, 2026
46 checks passed
@hajimehoshi
hajimehoshi deleted the claude/0.10-pin-macos-15 branch July 18, 2026 15:09
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.

3 participants