Skip to content

Commit cff800e

Browse files
committed
ci: add FreeBSD build CI and glog 0.7.x compatibility
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.
1 parent 5a2466a commit cff800e

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/ci-freebsd.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build on FreeBSD
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths-ignore:
7+
- '**.md'
8+
pull_request:
9+
branches: [ master ]
10+
paths-ignore:
11+
- '**.md'
12+
13+
jobs:
14+
compile-with-cmake:
15+
runs-on: ubuntu-latest
16+
name: FreeBSD build
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Build on FreeBSD
22+
uses: vmactions/freebsd-vm@v1
23+
with:
24+
release: "14.2"
25+
usesh: true
26+
prepare: |
27+
pkg install -y cmake protobuf gflags leveldb openssl git
28+
29+
run: |
30+
set -ex
31+
mkdir build && cd build
32+
cmake -DCMAKE_PREFIX_PATH=/usr/local ..
33+
make -j$(sysctl -n hw.ncpu)

0 commit comments

Comments
 (0)