ci: add FreeBSD build CI and glog 0.7.x compatibility#3225
Draft
tuaris wants to merge 1 commit intoapache:masterfrom
Draft
ci: add FreeBSD build CI and glog 0.7.x compatibility#3225tuaris wants to merge 1 commit intoapache:masterfrom
tuaris wants to merge 1 commit intoapache:masterfrom
Conversation
This was referenced Feb 23, 2026
cff800e to
820980d
Compare
Add GitHub Actions workflow for FreeBSD using vmactions/freebsd-vm@v1. This runs cmake + make on FreeBSD 14.2 with system-installed deps. Also add conditional GLOG_USE_GLOG_EXPORT detection for glog >= 0.7 compatibility. This uses check_include_file_cxx to detect glog/export.h (added in glog 0.7) before defining GLOG_USE_GLOG_EXPORT. Safe with older glog versions where the header does not exist. This benefits all platforms, not just FreeBSD.
820980d to
fc87ea6
Compare
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 problem does this PR solve?
Issue Number: N/A
Problem Summary:
brpc has CI for Linux and macOS but not FreeBSD. With FreeBSD platform support added in PR #3224, a CI workflow is needed to prevent regressions.
Additionally, glog >= 0.7 requires
GLOG_USE_GLOG_EXPORTto be defined before including its headers. Without this, builds using newer glog versions fail with:This is PR 3 of 3 for FreeBSD support:
What is changed and the side effects?
Changed:
.github/workflows/ci-freebsd.yml— GitHub Actions workflow using vmactions/freebsd-vm to build on FreeBSD 14.2. Modeled after the existingci-macos.yml.GLOG_USE_GLOG_EXPORTdetection inCMakeLists.txt— usescheck_include_file_cxx("glog/export.h")to detect glog >= 0.7, and only definesGLOG_USE_GLOG_EXPORTwhen the header exists. Safe with older glog versions. Benefits all platforms, not just FreeBSD.Side effects:
Performance effects:
None
Breaking backward compatibility:
None — the glog compatibility change is additive and safe with all glog versions.
Check List: