Skip to content

Run on arm64 Linux and on the BSDs, rather than only building for them - #111

Merged
tannevaled merged 1 commit into
mainfrom
run-on-arm64-linux-and-the-bsds
Oct 6, 2026
Merged

tannevaled merged 1 commit into
mainfrom
run-on-arm64-linux-and-the-bsds

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Two gaps, both the same shape as the one the arch lanes exist to close.

arm64 was only ever exercised on Darwin

macOS gave us the instruction set. It did not give us the kernel, the
scheduler, or the libc story that most of the world running this will have — a
server, a Raspberry Pi, a CI runner. ubuntu-24.04-arm is a native arm64
Linux runner, not emulation, and the os-matrix now covers it.

The BSDs were not built for at all, let alone run on

Measured here before writing a line of workflow — all clean today:

freebsd/amd64   ok      netbsd/amd64     ok
freebsd/arm64   ok      dragonfly/amd64  ok
openbsd/amd64   ok      illumos/amd64    ok
openbsd/arm64   ok      solaris/amd64    ok

They are now in the cross-compile step, which is cheap and catches a build tag
before somebody on one of those systems does. And three of them run the
suite
, in a virtual machine.

Why the test binary is cross-built on the host

It is built with the pinned toolchain and then run inside the VM, rather
than installing Go in the VM and building there. The Go a BSD packages is
whatever that release froze, so building inside would silently test a
different compiler from every other lane — and this module's floor is 1.27.1,
which the packaged one may not even satisfy.

It works because this package is one package with no testdata: a single
go test -c produces a binary that runs on its own.

What this claims, and what it does not

With CGO_ENABLED=0 the operating system is reached only through the standard
library, so the distance between Linux and FreeBSD here is much smaller than
the distance between amd64 and s390x. Smaller is not none: file modes, path
handling and what a syscall returns at the edges all differ, and a PDF reader
opens files.

This is a pilot, on one repository. If the lanes come back green it belongs
in the other nine; if one of them is red, that is the answer to a question
nobody here had asked yet.

🤖 Generated with Claude Code

Two gaps, both of the same shape as the one the arch lanes exist to close.

**arm64 was only ever exercised on Darwin.** macOS gave us the instruction
set; it did not give us the kernel, the scheduler or the libc story that most
of the world running this will have -- a server, a Raspberry Pi, a CI runner.
`ubuntu-24.04-arm` is a NATIVE arm64 Linux runner, not emulation, so the
os-matrix now covers it.

**The BSDs were not built for at all, let alone run on.** Measured here first:
freebsd/amd64, freebsd/arm64, openbsd/amd64, openbsd/arm64, netbsd/amd64,
dragonfly/amd64, illumos/amd64 and solaris/amd64 all compile clean today. They
are now in the cross-compile step, which is cheap and catches a build tag
before somebody on one of those systems does.

And three of them RUN the suite, in a virtual machine.

The binary is built with the PINNED toolchain and then run inside the VM,
rather than installing Go in the VM and building there. The Go a BSD packages
is whatever that release froze, so building inside would silently test a
different compiler from every other lane -- and this module's floor is 1.27.1,
which the packaged one may not even satisfy.

It works because this package is one package with no testdata: a single
`go test -c` produces a binary that runs on its own.

With `CGO_ENABLED=0` the operating system is reached only through the standard
library, so the distance between Linux and FreeBSD here is much smaller than
the distance between amd64 and s390x. Smaller is not none: file modes, path
handling and what a syscall returns at the edges all differ, and a PDF reader
opens files.

This is a pilot, on one repository. If the lanes are green it belongs in the
other nine.
@tannevaled
tannevaled merged commit 0755d96 into main Oct 6, 2026
13 checks passed
@tannevaled
tannevaled deleted the run-on-arm64-linux-and-the-bsds branch October 6, 2026 13:44
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