From a9e4089ad142ff947c637e36b9fb9d6d882c6845 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Sun, 14 Jan 2024 05:27:22 -0500 Subject: [PATCH] [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.) --- .github/workflows/pr.yml | 14 ++++++++++---- scripts/ci-build.sh | 6 ++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b3bd41cf2..48156bdf0 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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 diff --git a/scripts/ci-build.sh b/scripts/ci-build.sh index 9127c6742..991b4193a 100755 --- a/scripts/ci-build.sh +++ b/scripts/ci-build.sh @@ -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