From ff40764345a161902769c8cb99f55f3e49d820f1 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 4 Nov 2025 11:06:43 +0000 Subject: [PATCH] Add NetBSD build workflow Co-authored-by: v --- .github/workflows/netbsd_build.yml | 64 ++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/netbsd_build.yml diff --git a/.github/workflows/netbsd_build.yml b/.github/workflows/netbsd_build.yml new file mode 100644 index 0000000000..f0ef7bc1c6 --- /dev/null +++ b/.github/workflows/netbsd_build.yml @@ -0,0 +1,64 @@ +name: NetBSD Build + +on: + workflow_dispatch: + inputs: + netbsd_version: + description: 'NetBSD version to use' + required: false + default: '10.0' + type: choice + options: + - '10.0' + - '9.3' + +jobs: + netbsd-build: + runs-on: ubuntu-latest + name: Build on NetBSD ${{ inputs.netbsd_version }} + + steps: + - name: Check out source code + uses: actions/checkout@v4 + + - name: Build on NetBSD + uses: vmactions/netbsd-vm@v1 + with: + release: ${{ inputs.netbsd_version }} + usesh: true + prepare: | + # Install base build dependencies + pkg_add cmake ninja-build pkgconf \ + pcre2 sqlite3 openssl ragel icu \ + libsodium glib2 libunwind luajit \ + perl5 || true + # Note: hyperscan may not be available on all NetBSD versions + run: | + set -e + + echo "==> Building Rspamd on NetBSD $(uname -r)" + + # Create build directory + mkdir -p build + cd build + + # Run CMake + echo "==> Running CMake configuration" + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DENABLE_LUAJIT=ON \ + .. + + # Build + echo "==> Building Rspamd" + ninja -j$(sysctl -n hw.ncpu) + + # Run tests + echo "==> Running C++ unit tests" + test/rspamd-test-cxx || echo "C++ tests failed" + + echo "==> Running Lua unit tests" + test/rspamd-test -p /rspamd/lua || echo "Lua tests failed" + + echo "==> Build completed successfully!" -- 2.47.3