Skip to content

Commit afef05f

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

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

.github/workflows/ci.yml

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

77
jobs:
8+
build-netbsd:
9+
runs-on: ubuntu-latest
10+
name: build • netbsd
11+
defaults:
12+
run:
13+
shell: netbsd {0}
14+
steps:
15+
- uses: actions/checkout@v6
16+
17+
- name: Start NetBSD VM
18+
uses: vmactions/netbsd-vm@v1
19+
with:
20+
prepare: |
21+
pkg_add cmake ninja-build gcc14
22+
# capnproto prerequisites.
23+
# See the following "Install capnproto" step.
24+
run: |
25+
set -e
26+
pkg_add digest libtool-base mktools pkgconf cwrappers
27+
pkg_admin -K /usr/pkg/pkgdb fetch-pkg-vulnerabilities
28+
cd /usr
29+
cvs -danoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P \
30+
pkgsrc/devel/capnproto \
31+
pkgsrc/devel/libtool-base \
32+
pkgsrc/devel/pkgconf \
33+
pkgsrc/devel/zlib \
34+
pkgsrc/lang/gcc15 \
35+
pkgsrc/mk \
36+
pkgsrc/pkgtools \
37+
pkgsrc/security/openssl \
38+
pkgsrc/sysutils/install-sh/files
39+
sync: 'rsync'
40+
copyback: false
41+
42+
# The prebuilt capnproto package is broken because it was built with GCC 10.5.0.
43+
# This could be reconsidered once GCC is updated to 14.1 or newer,
44+
# or if switching to Clang.
45+
- name: Install capnproto
46+
run: |
47+
cd /usr/pkgsrc/devel/capnproto/
48+
env -u PKG_PATH make CPPFLAGS='-DKJ_NO_EXCEPTIONS=0' install
49+
50+
- name: Run CI script
51+
run: |
52+
cd ${{ github.workspace }}
53+
CI_CONFIG="ci/configs/netbsd.bash" bash ci/scripts/ci.sh
54+
855
build-openbsd:
956
runs-on: ubuntu-latest
1057
name: build • openbsd

ci/configs/netbsd.bash

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CI_DESC="CI config for NetBSD"
2+
CI_DIR=build-netbsd
3+
export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter"
4+
export CXX="/usr/pkg/gcc14/bin/g++"
5+
CMAKE_ARGS=(-G Ninja)
6+
BUILD_ARGS=(-k 0)

0 commit comments

Comments
 (0)