Skip to content

Commit

Permalink
[ci] more featureful build on NetBSD
Browse files Browse the repository at this point in the history
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.)
  • Loading branch information
gstrauss committed Jan 14, 2024
1 parent f124e10 commit a9e4089
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,18 @@ jobs:
- uses: vmactions/netbsd-vm@v1
with:
prepare: |
pkg_add cmake pkgconf pcre2 perl
pkg_add cmake ninja pkgconf pcre2 perl \
gnutls libressl mbedtls nettle nss wolfssl \
cyrus-sasl mit-krb5 libdbi openldap-client \
mariadb-client postgresql16-client \
brotli libdeflate zlib zstd \
libmaxminddb libunwind lua51 lua54 \
libuuid libxml2 sqlite3
# autoconf automake gmake libtool m4 py311-scons
run: |
set -e
cmake -S "${{github.workspace}}" -B "build" -Wno-dev -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
ctest -V --test-dir build --build-config Release
export NO_UNWIND=1
cd "${{github.workspace}}" && scripts/ci-build.sh cmake
OpenBSD:
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions scripts/ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ if [ "$(uname -s)" = "FreeBSD" ]; then
export LDFLAGS=-L/usr/local/lib
fi

if [ "$(uname -s)" = "NetBSD" ]; then
export CPPFLAGS=-I/usr/pkg/include
export LDFLAGS=-L/usr/pkg/lib
export LD_LIBRARY_PATH=/usr/pkg/lib
fi

case "${build}" in
"autobuild"|"coverity")
mkdir -p m4
Expand Down

0 comments on commit a9e4089

Please sign in to comment.