Add VM-based CI that builds and tests on DragonFly BSD - #2027
Open
neilpang wants to merge 2 commits into
Open
Conversation
GitHub offers no hosted runner for any of the BSDs, so the job runs the OS in a VM on top of an ubuntu-latest runner via the vmactions actions. MoarVM has no test suite of its own, so the job builds NQP against the MoarVM it just built and runs the NQP test suite. The workflow is a separate file, so it neither interferes with nor delays the existing Azure Pipelines matrix. Closes MoarVM#1418
There was a problem hiding this comment.
Pull request overview
Adds a new GitHub Actions workflow that runs MoarVM + NQP build/test inside a DragonFly BSD VM (via vmactions) on ubuntu-latest, providing CI coverage for a non-hosted platform without impacting the existing Azure Pipelines matrix.
Changes:
- Introduces
.github/workflows/test_other_platforms.ymlto build MoarVM and run the NQP test suite on DragonFly BSD within a VM. - Updates
README.mdto include a GitHub Actions badge for the new workflow.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| README.md | Adds a status badge pointing to the new “Test on other platforms” workflow. |
| .github/workflows/test_other_platforms.yml | New VM-based CI job that builds MoarVM and runs NQP tests on DragonFly BSD. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # is owned by a different uid than the one running the build. | ||
| # Without this, `git describe` and the submodule sync that | ||
| # Configure.pl runs both fail with "detected dubious ownership". | ||
| git config --global --add safe.directory '*' |
Comment on lines
+12
to
+17
| pull_request: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
|
|
||
| jobs: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1418
#1418 asked for a drop-in test build on FreeBSD and other operating systems using
the vmactions VMs. This adds that workflow as a separate file, so it neither
interferes with nor delays the Azure Pipelines matrix.
What the job does
It runs the guest OS in a VM on an
ubuntu-latestrunner, builds MoarVM, thenbuilds NQP against it and runs the NQP test suite -- MoarVM has no test suite of its
own (
make testjust printsbuild/test.txt).Verification run on the exact head of this branch:
https://github.com/neilpang/MoarVM/actions/runs/30349845037 -- 371 compiles,
This is MoarVM version 2026.07-7-ge82d6372a built with JIT support,Files=145, Tests=13476 ... Result: PASS. The job takes about 5 minutes end to end.Two things in the job need explaining:
--toolchain=gnu.build/setup.pmmaps the BSDs to thebsdtoolchain, butthe Makefile that generates cannot be built by BSD make: the object rules use
$*.c, and BSD make expands$*to the file name without its directory, soevery compile fails with
clang: error: no such file or directory: 'args.c'(run). If you would
rather have the native
makepath work, the fix is in the$*.coccurrences inbuild/Makefile.in; happy to send that separately.-jon the MoarVM build. The vendored dyncall build shells out to the basesystem make, which rejects the bare
-jthat GNU make puts intoMAKEFLAGSforits job server:
make[1]: illegal argument to -j -- must be positive integer!Why only DragonFly BSD
I tried FreeBSD, OpenBSD, NetBSD and Solaris as well. Each is blocked by a real
portability break rather than by CI configuration, so I left those jobs out instead
of landing a red workflow.
FreeBSD --
3rdparty/libuv(pinned atMoarVM/libuv@dcd3a3f, the head of1-50-0-with-pty) has:FreeBSD has no
<util.h>--openpty(3)is declared in<libutil.h>and lives in-lutil. Confirmed absent on 13.5, 14.3 and 15.1, withlibutil.hpresent on each:run.
Two changes make FreeBSD work, both verified:
<libutil.h>on FreeBSD -- PR: unix: include <libutil.h> for openpty() on FreeBSD libuv#1. With it,MoarVM builds and the NQP suite passes on 13.5, 14.3 and 15.1:
run.
build/setup.pm: addutilto the FreeBSDsyslibs. Without itlibmoar.socarries an unresolvedopenpty; the build and the NQP suite stillpass because nothing in them spawns a pty, but a pty spawn would fail at runtime
(run). Adding
utillinkslibutil.so.9on 13.5 andlibutil.so.10on 15.1(run).
I can send the
setup.pmchange and the FreeBSD job as a follow-up once the libuvside is settled.
NetBSD and OpenBSD --
3rdparty/zmijdoes not compile:and on NetBSD additionally
zmij.c:151:24: error: expected declaration specifiers or '...' before '__builtin_constant_p'-- NetBSD's
<sys/bswap.h>definesbswap64as a macro, colliding with zmij'sstatic inlineof the same name. Runs:OpenBSD,
NetBSD. This arrived
with the Ryu -> Zmij switch (#1986).
Solaris 11.4 --
src/core/args.c:75:33: error: implicit declaration of function 'alloca';Solaris declares
allocain<alloca.h>.Run.
Also in this PR
actions/checkout@v7, the current major.fetch-depth: 0+fetch-tags: true:Configure.pltakes theversion from
git describe --tags, and NQP refuses a MoarVM older than its pinnedMOAR_REVISION.safe.directory, because the tree is synced into the VM andends up owned by a different uid than the build runs as.