Repository navigation
ci(freebsd): add a dispatch-only, informational FreeBSD build workflow - #2911
Merged
Merged
Conversation
Add .github/workflows/freebsd.yml, a standalone workflow triggered only by workflow_dispatch. It builds the UI-embedded binary inside FreeBSD 15.1 and 14.4 x86_64 VMs (vmactions/freebsd-vm, full-SHA pin to v1.5.9) with the canonical scripts/build.sh and runs the binary with --version. It declares read-only permissions, uploads and publishes nothing, is not part of ci-ok and is not called by release.yml or dry-run.yml, so a FreeBSD red never gates a pull request or a release. scripts/env.sh now detects FreeBSD and selects gmake there (BSD make cannot read the GNU make syntax of Makefile.cbm) and make everywhere else; the environment summary line reports the choice. scripts/build.sh runs $MAKE at all three build call sites. macOS, Linux and Windows still run make, so their builds are unchanged. Distilled from #1422 by PR9000: the release matrix, the x86_64-host choice, the aarch64 exclusion, the vmactions VM approach with a SHA pin, fail-fast: false and the gmake detection all come from that pull request, which built on the FreeBSD groundwork of #1093, #1423 and #1467. Co-authored-by: Pedro Ramos <131530838+pr9000@users.noreply.github.com> Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
The first proof run failed in both FreeBSD legs at `npm ci`: the UI dependency tree pulls in onnxruntime-node, which publishes builds for win32, darwin and linux only, so npm stops with EBADPLATFORM before the frontend is built. The VM boot, the pkg prepare step, the gmake detection and the source sync all worked. The job now builds the headless binary (scripts/build.sh without --with-ui) and drops node22/npm-node22 from the prepare step. That still proves the C core builds and starts on FreeBSD; the UI bundle is platform-independent JavaScript and is built on every other leg. The aarch64 comment now says what is actually unproven. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
3 of 4 tasks
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.
What does this PR do?
Adds a standalone FreeBSD build workflow,
.github/workflows/freebsd.yml, that a maintainer starts by hand from the Actions tab (workflow_dispatchonly, no schedule). It builds the headless binary (the C core, no embedded UI) inside FreeBSD 15.1 and 14.4 x86_64 VMs with the canonicalscripts/build.sh CC=clang CXX=clang++, and then runsbuild/c/codebase-memory-mcp --versioninside the VM. The UI build does not run there: its npm dependency tree pulls in onnxruntime-node, which publishes no FreeBSD build, sonpm cistops with EBADPLATFORM. The UI bundle itself is platform-independent JavaScript that every other leg already builds.This is the shape agreed on #1422 on 25 September: a non-gating, manual-dispatch, informational job that gives us visibility into FreeBSD breakage without blocking anyone.
What this is not
ci-okaggregate and never runs on pull requests or pushes.release.yml,dry-run.ymland_build.ymldo not call it, and it uploads and publishes nothing, so no FreeBSD archive is ever released from it.Changes
.github/workflows/freebsd.yml(new): FreeBSD 15.1 + 14.4 on x86_64,fail-fast: false, on an x86_64ubuntu-latesthost (QEMU guests on the arm runners are slow enough to time out). aarch64 stays disabled, with the reason in the file: it has not been proven with this workflow yet (its earlier blocker was the frontend build, which this headless job no longer runs). The VM prepare step installs only gmake, sqlite3, pkgconf and bash.actions/checkoutuses the same v7.0.1 SHA pin as every other workflow here, withpersist-credentials: false;vmactions/freebsd-vmis pinned to the full commit SHA of its current v1 release (v1.5.9). 90-minute timeout.scripts/env.sh: detects FreeBSD (freebsd*fromuname -s) and setsMAKE=gmakethere, because Makefile.cbm is GNU make syntax and FreeBSD's default make is BSD make; every other platform keepsmake. The environment summary line now also printsmake=....scripts/build.sh: the three build call sites run"$MAKE"instead ofmake. On macOS, Linux and Windows$MAKEismake, so those builds run exactly the command they ran before.Credit
This carries forward #1422 by @PR9000, who did the real work: the release matrix, the x86_64-host choice with its in-file reasoning, the argued-out aarch64 exclusion, the vmactions VM approach with a SHA pin,
fail-fast: falseand the gmake detection. The commit is credited to them with aCo-authored-bytrailer. It also builds on the FreeBSD groundwork that already landed in #1093, #1423 and #1467. Thank you!What changed from #1422, and why:
useshis dropped (the current vmactions release documents it as ignored), and the VM copy-back is skipped because nothing reads the results afterwards.Test plan
push:trigger commit that was dropped before this PR opened (the workflow it ran differs from the merged one only by those three trigger lines; the scripts are identical): https://github.com/DeusData/codebase-memory-mcp/actions/runs/41488878978 (15.1 and 14.4 green,make=gmakein the build summary,--versionprinted in each VM). An earlier run that still built the UI failed in both legs atnpm ci(EBADPLATFORM), which is why the job builds headless.bash -nandshellcheck -xonscripts/env.shandscripts/build.sh: env.sh is clean; build.sh shows only its pre-existing SC2163 on the CC/CXX export line.scripts/build.shstill builds the binary and--versionruns; the expanded build command is the samemake -j<N> -f Makefile.cbm cbm CFLAGS_EXTRA=as on main.scripts/security-audit.shpin check passes;tests/test_venue_parity_contract.shpasses with the new workflow marker-checked (re-run on the final tree, based on current main).pr.yml(ci-ok),release.yml,dry-run.yml,_build.yml,scripts/ci/select-lanes.shand the security allowlists are byte-identical to main: the diff touches only the three files above.dco+ci-ok.Checklist
git commit -s)make -f Makefile.cbm test): not run; no C source changes, PR CI runs the full setmake -f Makefile.cbm lint-ci): not applicable, cppcheck and clang-format cover C sources only