Skip to content

Comments

Add FreeBSD Runners to CI#156

Merged
mvandeberg merged 1 commit intocppalliance:developfrom
mvandeberg:feature/freebsd-runner
Feb 20, 2026
Merged

Add FreeBSD Runners to CI#156
mvandeberg merged 1 commit intocppalliance:developfrom
mvandeberg:feature/freebsd-runner

Conversation

@mvandeberg
Copy link
Contributor

@mvandeberg mvandeberg commented Feb 19, 2026

Summary by CodeRabbit

  • Chores
    • Expanded continuous integration support to include FreeBSD with dedicated workflows and testing routines.
    • Enhanced platform-specific test execution logic across Linux, macOS, Windows, and FreeBSD environments.

@coderabbitai
Copy link

coderabbitai bot commented Feb 19, 2026

📝 Walkthrough

Walkthrough

The CI workflow was expanded with explicit platform flags (windows, linux, macos, freebsd) in the build matrix. Steps are now gated with matrix-based conditions to control execution per platform. FreeBSD-specific workflows for Boost B2 and CMake were added, with conditional logic replacing previous runner-os checks throughout.

Changes

Cohort / File(s) Summary
CI Workflow Configuration
.github/workflows/ci.yml
Expanded build matrix with explicit platform flags; introduced FreeBSD-specific workflows for Boost B2 and CMake testing; replaced runner-os checks with matrix-based condition gates; added conditional logic for setup/install steps, vcpkg, OpenSSL/WolfSSL configuration, and platform-specific paths.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Hopping through workflows with glee,
FreeBSD joins the CI spree!
Matrix flags dance, conditions align,
Each platform runs, step by step, so fine.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add FreeBSD Runners to CI' directly and accurately summarizes the main change: adding FreeBSD platform support to the CI workflow with explicit matrix flags, conditional steps, and FreeBSD-specific job configurations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cppalliance-bot
Copy link

An automated preview of the documentation is available at https://156.corosio.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-02-19 18:20:44 UTC

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
.github/workflows/ci.yml (2)

298-299: FreeBSD jobs run on ubuntu-latest — verify this meets the vmactions/freebsd-vm requirements.

The action boots a FreeBSD VM on top of the Linux runner. This is the documented pattern, but ubuntu-latest may shift OS versions over time. If vmactions/freebsd-vm has specific host requirements, pinning (e.g., ubuntu-24.04) would be safer.

Also applies to: 302-303

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 298 - 299, The workflow currently uses
runs-on: "ubuntu-latest" for the FreeBSD VM jobs (see the freebsd: "14.3" job
definition and the runs-on setting); update these job definitions to use a
pinned Ubuntu runner that meets vmactions/freebsd-vm host requirements (for
example change runs-on: "ubuntu-latest" to runs-on: "ubuntu-24.04" or another
fixed version required by vmactions/freebsd-vm) and make the same change for the
other FreeBSD job instances referenced around lines 302-303 so the host OS won’t
unexpectedly drift.

729-747: Each FreeBSD step spins up a separate VM — consider consolidating.

Both the B2 step (line 729) and the CMake step (line 749) invoke vmactions/freebsd-vm@v1 independently, meaning two full VM boot cycles per FreeBSD configuration. For FreeBSD 15.0 (which has build-cmake: true), this doubles the VM overhead.

You could consolidate both into a single VM invocation with a combined run script that does b2 first, then cmake, to cut wall-clock time significantly.

💡 Example consolidated step
-      - name: Boost B2 Workflow (FreeBSD)
-        if: ${{ matrix.freebsd }}
-        uses: vmactions/freebsd-vm@v1
-        with:
-          release: ${{ matrix.freebsd }}
-          usesh: true
-          run: |
-            set -xe
-            cd boost-root
-            ./bootstrap.sh
-            ./b2 libs/${{ steps.patch.outputs.module }}/test \
-              toolset=clang \
-              cxxstd=20 \
-              variant=release \
-              link=shared \
-              rtti=on \
-              cxxflags="-fexperimental-library" \
-              -q \
-              -j$(sysctl -n hw.ncpu)
-
-      - name: Boost CMake Workflow (FreeBSD)
-        if: ${{ matrix.freebsd && matrix.build-cmake }}
-        uses: vmactions/freebsd-vm@v1
-        with:
-          release: ${{ matrix.freebsd }}
-          usesh: true
-          prepare: |
-            pkg install -y cmake
-          run: |
-            set -xe
-            cd boost-root
-            cmake -S . -B build \
-              -DCMAKE_BUILD_TYPE=Release \
-              -DCMAKE_CXX_FLAGS="-fexperimental-library" \
-              -DBOOST_INCLUDE_LIBRARIES="${{ steps.patch.outputs.module }}" \
-              -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-            cmake --build build --target tests -j$(sysctl -n hw.ncpu)
-            ctest --test-dir build --output-on-failure
+      - name: FreeBSD Workflow (B2 + CMake)
+        if: ${{ matrix.freebsd }}
+        uses: vmactions/freebsd-vm@v1
+        with:
+          release: ${{ matrix.freebsd }}
+          usesh: true
+          prepare: |
+            pkg install -y cmake
+          run: |
+            set -xe
+            cd boost-root
+
+            # B2 build and test
+            ./bootstrap.sh
+            ./b2 libs/${{ steps.patch.outputs.module }}/test \
+              toolset=clang \
+              cxxstd=20 \
+              variant=release \
+              link=shared \
+              rtti=on \
+              cxxflags="-fexperimental-library" \
+              -q \
+              -j$(sysctl -n hw.ncpu)
+
+            # CMake build and test (conditional on build-cmake)
+            BUILD_CMAKE="${{ matrix.build-cmake }}"
+            if [ "$BUILD_CMAKE" = "true" ]; then
+              cmake -S . -B build \
+                -DCMAKE_BUILD_TYPE=Release \
+                -DCMAKE_CXX_FLAGS="-fexperimental-library" \
+                -DBOOST_INCLUDE_LIBRARIES="${{ steps.patch.outputs.module }}" \
+                -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
+              cmake --build build --target tests -j$(sysctl -n hw.ncpu)
+              ctest --test-dir build --output-on-failure
+            fi

Also applies to: 749-766

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 729 - 747, Consolidate the two
separate vmactions/freebsd-vm@v1 invocations (the "Boost B2 Workflow (FreeBSD)"
step that runs the ./b2 command and the later CMake step) into a single VM step
that preserves the matrix.freebsd condition and runs a combined run script:
first execute the existing b2 sequence (cd boost-root; ./bootstrap.sh; ./b2
...), then conditionally run the cmake commands only when the matrix value
build-cmake is true for that matrix entry; keep existing flags (toolset=clang,
cxxstd=20, etc.), -q and parallelism, and ensure any outputs or step outputs
used later are still produced or exported so downstream steps do not break.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 749-766: The FreeBSD CI step "Boost CMake Workflow (FreeBSD)"
currently only installs cmake in the prepare block; update that prepare script
to also install the OpenSSL development package (openssl-devel or the FreeBSD
package name) and add commands to build and install WolfSSL so TLS-capable
libraries are present for CMake discovery; modify the prepare block referenced
in the workflow step (the prepare: | block under the vmactions/freebsd-vm usage)
to include pkg install for OpenSSL dev and the sequence to fetch, build, and
install WolfSSL before running the cmake/run steps.
- Around line 729-747: Replace the floating action reference
vmactions/freebsd-vm@v1 with the specific commit SHA (e.g.,
vmactions/freebsd-vm@6dca0c54d9c12cf3073ba02d013fa1934bff3e6a) and add a prepare
block to the step to install required build prerequisites before the run script
(for example using pkg install -y bash and any other tools your bootstrap/tests
need); update the step that currently uses runs: | (the Boost B2 Workflow block
referencing steps.patch.outputs.module) to include the prepare section so the
bootstrap.sh and ./b2 invocation have the necessary dependencies available.

---

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 298-299: The workflow currently uses runs-on: "ubuntu-latest" for
the FreeBSD VM jobs (see the freebsd: "14.3" job definition and the runs-on
setting); update these job definitions to use a pinned Ubuntu runner that meets
vmactions/freebsd-vm host requirements (for example change runs-on:
"ubuntu-latest" to runs-on: "ubuntu-24.04" or another fixed version required by
vmactions/freebsd-vm) and make the same change for the other FreeBSD job
instances referenced around lines 302-303 so the host OS won’t unexpectedly
drift.
- Around line 729-747: Consolidate the two separate vmactions/freebsd-vm@v1
invocations (the "Boost B2 Workflow (FreeBSD)" step that runs the ./b2 command
and the later CMake step) into a single VM step that preserves the
matrix.freebsd condition and runs a combined run script: first execute the
existing b2 sequence (cd boost-root; ./bootstrap.sh; ./b2 ...), then
conditionally run the cmake commands only when the matrix value build-cmake is
true for that matrix entry; keep existing flags (toolset=clang, cxxstd=20,
etc.), -q and parallelism, and ensure any outputs or step outputs used later are
still produced or exported so downstream steps do not break.

Comment on lines +729 to +747
- name: Boost B2 Workflow (FreeBSD)
if: ${{ matrix.freebsd }}
uses: vmactions/freebsd-vm@v1
with:
release: ${{ matrix.freebsd }}
usesh: true
run: |
set -xe
cd boost-root
./bootstrap.sh
./b2 libs/${{ steps.patch.outputs.module }}/test \
toolset=clang \
cxxstd=20 \
variant=release \
link=shared \
rtti=on \
cxxflags="-fexperimental-library" \
-q \
-j$(sysctl -n hw.ncpu)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

vmactions/freebsd-vm latest commit SHA github

💡 Result:

Latest commit on vmactions/freebsd-vm (branch main): 6dca0c54d9c12cf3073ba02d013fa1934bff3e6a [1]


🏁 Script executed:

# Examine the CI workflow file at the cited lines and surrounding context
head -n 750 .github/workflows/ci.yml | tail -n 30

Repository: cppalliance/corosio

Length of output: 1143


🏁 Script executed:

# Search for prepare blocks and FreeBSD steps in the CI workflow
rg -n "prepare:|freebsd" .github/workflows/ci.yml -A 5 -B 2

Repository: cppalliance/corosio

Length of output: 4896


Pin vmactions/freebsd-vm to a full SHA and add a prepare block to ensure build prerequisites are installed.

Using a floating major-version tag (@v1) for third-party actions is a supply-chain risk — the tag can be moved to point at arbitrary code. Pin to a specific commit SHA (e.g., vmactions/freebsd-vm@6dca0c54d9c12cf3073ba02d013fa1934bff3e6a with a version comment for readability).

Additionally, add a prepare block to explicitly install build prerequisites (e.g., pkg install -y bash if the bootstrap script requires it), matching the pattern already used in the CMake FreeBSD step below this one.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 729 - 747, Replace the floating action
reference vmactions/freebsd-vm@v1 with the specific commit SHA (e.g.,
vmactions/freebsd-vm@6dca0c54d9c12cf3073ba02d013fa1934bff3e6a) and add a prepare
block to the step to install required build prerequisites before the run script
(for example using pkg install -y bash and any other tools your bootstrap/tests
need); update the step that currently uses runs: | (the Boost B2 Workflow block
referencing steps.patch.outputs.module) to include the prepare section so the
bootstrap.sh and ./b2 invocation have the necessary dependencies available.

Comment on lines +749 to +766
- name: Boost CMake Workflow (FreeBSD)
if: ${{ matrix.freebsd && matrix.build-cmake }}
uses: vmactions/freebsd-vm@v1
with:
release: ${{ matrix.freebsd }}
usesh: true
prepare: |
pkg install -y cmake
run: |
set -xe
cd boost-root
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="-fexperimental-library" \
-DBOOST_INCLUDE_LIBRARIES="${{ steps.patch.outputs.module }}" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build --target tests -j$(sysctl -n hw.ncpu)
ctest --test-dir build --output-on-failure
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# First, find and examine CMakeLists.txt files
echo "=== Finding CMakeLists.txt files ==="
find . -name "CMakeLists.txt" -type f | head -20

echo ""
echo "=== Searching for WolfSSL references in CMake files ==="
rg -i 'wolfssl' --type cmake -n

echo ""
echo "=== Searching for OpenSSL references in CMake files ==="
rg -i 'openssl' --type cmake -n | head -30

echo ""
echo "=== Checking find_package requirements ==="
rg 'find_package.*\(OpenSSL|WolfSSL\)' -i --type cmake -n -A 2

Repository: cppalliance/corosio

Length of output: 8613


🏁 Script executed:

#!/bin/bash

# Check the workflow file for context
echo "=== Examining the FreeBSD CMake workflow step ==="
sed -n '749,766p' .github/workflows/ci.yml

echo ""
echo "=== Checking if there are any FreeBSD-specific CMake settings or documentation ==="
find . -name "*.md" -o -name "*.txt" | xargs grep -l -i "freebsd" 2>/dev/null | head -10

Repository: cppalliance/corosio

Length of output: 917


🏁 Script executed:

#!/bin/bash

# Look at the root CMakeLists.txt to understand the project structure
echo "=== Root CMakeLists.txt (first 100 lines) ==="
head -100 CMakeLists.txt

echo ""
echo "=== Searching for any OpenSSL/TLS conditionals in CMake ==="
rg 'if.*OpenSSL|if.*WolfSSL' -i --type cmake -B 2 -A 2

Repository: cppalliance/corosio

Length of output: 5870


🏁 Script executed:

#!/bin/bash

# Check how find_package(OpenSSL) works - look for any platform-specific config
echo "=== Checking for OpenSSL find_package usage patterns ==="
rg 'find_package.*OpenSSL' -B 2 -A 2

# Check if there's any documentation about platform requirements
echo ""
echo "=== Looking for README or platform docs ==="
find . -maxdepth 2 \( -name "README*" -o -name "INSTALL*" \) -type f

Repository: cppalliance/corosio

Length of output: 844


🏁 Script executed:

#!/bin/bash

# Check the actual test setup to understand what would happen
echo "=== Test CMakeLists.txt around TLS setup ==="
sed -n '20,45p' test/unit/CMakeLists.txt

Repository: cppalliance/corosio

Length of output: 978


FreeBSD CMake step should install OpenSSL and WolfSSL development packages to enable TLS testing.

The prepare block only installs cmake. Both WolfSSL and OpenSSL (development headers) are optional dependencies for TLS support but are not installed:

  • WolfSSL will not be available at all; TLS tests requiring WolfSSL will be skipped with a warning
  • OpenSSL may or may not be discoverable by CMake depending on FreeBSD version; tests may be skipped if headers are not in standard locations

While the build will succeed due to graceful conditional compilation, this reduces test coverage on FreeBSD. Add openssl-devel and build/install WolfSSL to the prepare block if TLS testing on FreeBSD is desired.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 749 - 766, The FreeBSD CI step "Boost
CMake Workflow (FreeBSD)" currently only installs cmake in the prepare block;
update that prepare script to also install the OpenSSL development package
(openssl-devel or the FreeBSD package name) and add commands to build and
install WolfSSL so TLS-capable libraries are present for CMake discovery; modify
the prepare block referenced in the workflow step (the prepare: | block under
the vmactions/freebsd-vm usage) to include pkg install for OpenSSL dev and the
sequence to fetch, build, and install WolfSSL before running the cmake/run
steps.

@cppalliance-bot
Copy link

GCOVR code coverage report https://156.corosio.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://156.corosio.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://156.corosio.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-02-19 18:24:47 UTC

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.24%. Comparing base (0cb2c00) to head (a12fc78).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #156      +/-   ##
===========================================
+ Coverage    82.02%   82.24%   +0.22%     
===========================================
  Files           70       70              
  Lines         5876     5876              
===========================================
+ Hits          4820     4833      +13     
+ Misses        1056     1043      -13     

see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0cb2c00...a12fc78. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mvandeberg mvandeberg merged commit 7429272 into cppalliance:develop Feb 20, 2026
20 checks passed
@mvandeberg mvandeberg deleted the feature/freebsd-runner branch February 20, 2026 21:45
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.

2 participants