Add FreeBSD Runners to CI#156
Conversation
📝 WalkthroughWalkthroughThe 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
.github/workflows/ci.yml (2)
298-299: FreeBSD jobs run onubuntu-latest— verify this meets thevmactions/freebsd-vmrequirements.The action boots a FreeBSD VM on top of the Linux runner. This is the documented pattern, but
ubuntu-latestmay shift OS versions over time. Ifvmactions/freebsd-vmhas 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@v1independently, meaning two full VM boot cycles per FreeBSD configuration. For FreeBSD 15.0 (which hasbuild-cmake: true), this doubles the VM overhead.You could consolidate both into a single VM invocation with a combined
runscript 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 + fiAlso 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.
| - 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) |
There was a problem hiding this comment.
🧩 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 30Repository: 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 2Repository: 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.
| - 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 |
There was a problem hiding this comment.
🧩 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 2Repository: 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 -10Repository: 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 2Repository: 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 fRepository: 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.txtRepository: 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.
|
GCOVR code coverage report https://156.corosio.prtest3.cppalliance.org/gcovr/index.html Build time: 2026-02-19 18:24:47 UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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.
🚀 New features to boost your workflow:
|
Summary by CodeRabbit