This replaces the FreeBSD cross-compilation job with a native build and test job inside a FreeBSD VM. NetBSD and OpenBSD retain their existing cross-compilation jobs.
We currently cross-compile BSD binaries without testing them in this repository. Running tests before merge should help catch platform-specific regressions that would otherwise first appear in nightly builds. This starts with FreeBSD because it has been the most reliable BSD platform in the nightly jobs.
As we don't have native FreeBSD runners, the job uses vmactions/freebsd-vm, which is also used by the nightly builds. It reuses the existing CI scripts, depends build, and cache actions where possible.
The VM image is cached after its prepare step installs dependencies. The job also restores and saves the usual build caches. Initial testing on free GitHub Actions runners took approximately 60 minutes without caches and 20–30 minutes with caches populated. Performance on Warp runners remains untested.
The VM uses the runner's available CPU count and 75% of its RAM, leaving the remaining memory for the host and VM overhead. There is some overhead after testing while rsync copies cache directories back out of the VM.
The patchset also suppresses lsof warnings on FreeBSD that would otherwise interfere with functional tests.
The job requires enabling one additional action:
vmactions/freebsd-vm@v1