Skip to content

ci: add FreeBSD and OpenBSD builds via vmactions - #570

Open
neilpang wants to merge 1 commit into
davmac314:masterfrom
neilpang:ci/bsd-vmactions
Open

ci: add FreeBSD and OpenBSD builds via vmactions#570
neilpang wants to merge 1 commit into
davmac314:masterfrom
neilpang:ci/bsd-vmactions

Conversation

@neilpang

@neilpang neilpang commented Aug 1, 2026

Copy link
Copy Markdown

Closes #558

Cirrus CI shut down on 2026-06-01, which is what removed the FreeBSD
coverage. This adds FreeBSD and OpenBSD jobs to regular_ci.yml using the
vmactions VM actions suggested in #558 -- they boot the guest under
QEMU/KVM on a regular ubuntu-latest runner and cache the VM image.

Both platforms already carry their own build config
(configs/mconfig.FreeBSD, configs/mconfig.OpenBSD) and the build picks
them up automatically, which the logs confirm:

*** Found configuration for OS: FreeBSD
*** Found configuration for OS: OpenBSD

NetBSD is left out deliberately: there is no configs/mconfig.NetBSD, so it
is not among the directly-supported platforms listed in BUILD.

Verification

All six jobs green, the existing jobs unaffected:
https://github.com/neilpang/dinit/actions/runs/30680903099

job compiler / target unit tests integration tests time
FreeBSD clang 19.1.7, x86_64-unknown-freebsd15.1 pass (asan+ubsan) Passed: 30, Failed: 0 4m30s
OpenBSD clang 19.1.7, amd64-unknown-openbsd7.9 pass Passed: 30, Failed: 0 4m10s

On the cache limit

You raised the cache limit in #558, so here are the measured numbers:

cache entry size
freebsd base image 970 MB
freebsd image after prepare 1840 MB
openbsd base image 565 MB
openbsd image after prepare 779 MB
total ~4.15 GB of the 10 GB quota

That total includes cache-after-prepare: true, which re-caches the image
after pkg install gmake so later runs skip the package install entirely.
Dropping that option removes the two "after prepare" entries (~2.6 GB,
leaving ~1.5 GB) at the cost of reinstalling gmake on every run -- a few
seconds. Happy to switch it off if you prefer the smaller footprint.

Cirrus CI shut down on 2026-06-01, which removed the FreeBSD coverage.
Add FreeBSD and OpenBSD jobs using the vmactions VM actions, which boot
the VM on a regular ubuntu-latest runner and cache the prepared image.

Both are directly supported platforms with their own build config in
configs/ (mconfig.FreeBSD, mconfig.OpenBSD).

Closes davmac314#558

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR restores BSD coverage in the main GitHub Actions workflow by adding FreeBSD and OpenBSD CI jobs using vmactions/*-vm, replacing the previously-lost Cirrus CI coverage.

Changes:

  • Add a FreeBSD VM job that builds with gmake and runs unit + integration tests.
  • Add an OpenBSD VM job that builds with gmake and runs unit + integration tests.
  • Upload src/igr-tests/*/output/* artifacts on failure for both new jobs.
Suppressed comments (2)

.github/workflows/regular_ci.yml:186

  • Job id naming is inconsistent with the rest of this workflow (e.g. Debian-bookworm_build, MacOS-latest_build, Alpine-latest_build). Consider using the same <OS>-<variant>_build pattern for easier scanning and filtering in the Actions UI.
  OpenBSD_build:

.github/workflows/regular_ci.yml:194

  • The arch matrix value is currently unused (it isn't referenced anywhere in the job). Either drop the matrix/strategy or pass the architecture through to vmactions/openbsd-vm via its arch input. The vmactions docs use x86_64 as the amd64 value.
    strategy:
      fail-fast: false # Upload src/igr-tests/*/output/* files in igr-tests
      matrix:
        include:
          - arch: 'amd64'


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

name: igr-tests_output
path: src/igr-tests/*/output/*

FreeBSD_build:
Comment on lines +151 to +165
strategy:
fail-fast: false # Upload src/igr-tests/*/output/* files in igr-tests
matrix:
include:
- arch: 'amd64'

steps:
- uses: actions/checkout@v7
- name: Build and test in FreeBSD
uses: vmactions/freebsd-vm@v1
with:
usesh: true
cache-after-prepare: true
prepare: |
pkg install -y gmake
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.

Run CI on FreeBSD again

2 participants