Skip to content

Commit 47a5d47

Browse files
committed
ci: Add NetBSD job
1 parent 470fc51 commit 47a5d47

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

.github/workflows/ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,64 @@ on:
55
pull_request:
66

77
jobs:
8+
build-netbsd:
9+
runs-on: ubuntu-latest
10+
name: build • netbsd ${{ matrix.release }}
11+
defaults:
12+
run:
13+
shell: netbsd {0}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
# Test all supported releases.
18+
# See https://www.netbsd.org/releases/.
19+
include:
20+
- release: 9.4
21+
capnproto-cppflags: 'CPPFLAGS="-DKJ_NO_EXCEPTIONS=0 -DKJ_USE_KQUEUE=0"'
22+
- release: 10.1
23+
capnproto-cppflags: 'CPPFLAGS="-DKJ_NO_EXCEPTIONS=0"'
24+
steps:
25+
- uses: actions/checkout@v6
26+
27+
- name: Start NetBSD VM
28+
uses: vmactions/netbsd-vm@v1
29+
with:
30+
release: ${{ matrix.release }}
31+
# The installed compiler version must match the CXX variable
32+
# defined in `ci/configs/netbsd.bash`.
33+
prepare: |
34+
pkg_add cmake ninja-build gcc14
35+
# capnproto prerequisites.
36+
# See the following "Install capnproto" step.
37+
run: |
38+
set -e
39+
pkg_add digest libtool-base mktools pkgconf cwrappers
40+
pkg_admin -K /usr/pkg/pkgdb fetch-pkg-vulnerabilities
41+
cd /usr
42+
cvs [email protected]:/cvsroot checkout -P \
43+
pkgsrc/devel/capnproto \
44+
pkgsrc/devel/libtool-base \
45+
pkgsrc/devel/pkgconf \
46+
pkgsrc/devel/zlib \
47+
pkgsrc/lang/gcc15 \
48+
pkgsrc/mk \
49+
pkgsrc/pkgtools \
50+
pkgsrc/security/openssl \
51+
pkgsrc/sysutils/install-sh/files
52+
sync: 'rsync'
53+
copyback: false
54+
55+
- name: Install capnproto
56+
run: |
57+
cd /usr/pkgsrc/devel/capnproto/
58+
unset PKG_PATH
59+
make ${{ matrix.capnproto-cppflags }} install
60+
61+
- name: Run CI script
62+
run: |
63+
cd ${{ github.workspace }}
64+
CI_CONFIG="ci/configs/netbsd.bash" bash ci/scripts/ci.sh
65+
866
build-openbsd:
967
runs-on: ubuntu-latest
1068
name: build • openbsd

ci/configs/netbsd.bash

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CI_DESC="CI config for NetBSD"
2+
CI_DIR=build-netbsd
3+
export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter"
4+
# This path must match the compiler package installed
5+
# in the "Start NetBSD VM" step of the CI workflow.
6+
export CXX="/usr/pkg/gcc14/bin/g++"
7+
CMAKE_ARGS=(-G Ninja)
8+
BUILD_ARGS=(-k 0)

0 commit comments

Comments
 (0)