Skip to content

Commit a9e4089

Browse files
committed
[ci] more featureful build on NetBSD
Note: future: build could be improved to expand library paths instead of using e.g. from -lbrotlienc to /usr/pkg/lib/libbrotlienc.so, in order to avoid need to set LD_LIBRARY_PATH=/usr/pkg/lib. Alternatively, pass linker flags to set -rpath to include /usr/pkg/lib. (Also, still need to set CFLAGS=/usr/pkg/include and LDFLAGS=/usr/pkg/lib during build configuration so that libraries are found during feature checks.)
1 parent f124e10 commit a9e4089

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.github/workflows/pr.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,18 @@ jobs:
132132
- uses: vmactions/netbsd-vm@v1
133133
with:
134134
prepare: |
135-
pkg_add cmake pkgconf pcre2 perl
135+
pkg_add cmake ninja pkgconf pcre2 perl \
136+
gnutls libressl mbedtls nettle nss wolfssl \
137+
cyrus-sasl mit-krb5 libdbi openldap-client \
138+
mariadb-client postgresql16-client \
139+
brotli libdeflate zlib zstd \
140+
libmaxminddb libunwind lua51 lua54 \
141+
libuuid libxml2 sqlite3
142+
# autoconf automake gmake libtool m4 py311-scons
136143
run: |
137144
set -e
138-
cmake -S "${{github.workspace}}" -B "build" -Wno-dev -DCMAKE_BUILD_TYPE=Release
139-
cmake --build build --config Release
140-
ctest -V --test-dir build --build-config Release
145+
export NO_UNWIND=1
146+
cd "${{github.workspace}}" && scripts/ci-build.sh cmake
141147
142148
OpenBSD:
143149
runs-on: ubuntu-latest

scripts/ci-build.sh

+6
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ if [ "$(uname -s)" = "FreeBSD" ]; then
3636
export LDFLAGS=-L/usr/local/lib
3737
fi
3838

39+
if [ "$(uname -s)" = "NetBSD" ]; then
40+
export CPPFLAGS=-I/usr/pkg/include
41+
export LDFLAGS=-L/usr/pkg/lib
42+
export LD_LIBRARY_PATH=/usr/pkg/lib
43+
fi
44+
3945
case "${build}" in
4046
"autobuild"|"coverity")
4147
mkdir -p m4

0 commit comments

Comments
 (0)