Skip to content

Commit a5a4d6d

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

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,41 @@ 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+
/usr/sbin/pkg_add cmake ninja-build gcc14 git-base bash
22+
# capnproto build dependencies.
23+
/usr/sbin/pkg_add digest libtool-base mktools pkgconf cwrappers
24+
/usr/sbin/pkg_admin -K /usr/pkg/pkgdb fetch-pkg-vulnerabilities
25+
run: |
26+
git clone --depth=1 https://github.com/NetBSD/pkgsrc.git /usr/pkgsrc
27+
sync: 'rsync'
28+
copyback: false
29+
30+
# The prebuilt capnproto package is broken because it was built with GCC 10.5.0.
31+
# This could be reconsidered once GCC is updated to 14.1 or newer,
32+
# or if switching to Clang.
33+
- name: Install capnproto
34+
run: |
35+
cd /usr/pkgsrc/devel/capnproto/
36+
env -u PKG_PATH make CPPFLAGS='-DKJ_NO_EXCEPTIONS=0' install
37+
38+
- name: Run CI script
39+
run: |
40+
cd ${{ github.workspace }}
41+
CI_CONFIG="ci/configs/netbsd.bash" bash ci/scripts/ci.sh
42+
843
build-openbsd:
944
runs-on: ubuntu-latest
1045
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"
4+
export CXX="/usr/pkg/gcc14/bin/g++"
5+
CMAKE_ARGS=(-G Ninja)
6+
BUILD_ARGS=(-k 0)

0 commit comments

Comments
 (0)