Skip to content

Commit d0fc108

Browse files
committed
Merge bitcoin-core#196: ci: Add NetBSD job
861da39 ci: Add NetBSD job (Hennadii Stepanov) Pull request description: The master branch @ 1b8d4a6 fails to build on NetBSD. See: https://github.com/hebasto/libmultiprocess/actions/runs/17175941246/job/48731811650 ACKs for top commit: ryanofsky: Code review ACK 861da39. Thanks for your persistence debugging issues here and answering all my questions Tree-SHA512: c88980c9c96c7e4f982401af0ab698818a5c81934cbf59e5c50437a74ed9edc94d9c3089008b74547d05b6874f0422033318b2b51152953a63fd922b5cf2e91b
2 parents 7b171f4 + 861da39 commit d0fc108

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,66 @@ 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 -danoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P \
43+
pkgsrc/devel/capnproto \
44+
pkgsrc/devel/libtool-base \
45+
pkgsrc/devel/pkgconf \
46+
pkgsrc/devel/zlib \
47+
`# gcc15 is referenced here because the pkgsrc framework requires lang/gcc15/version.mk to exist` \
48+
`# during the "make install" step below, even though we compile our project with gcc14.` \
49+
pkgsrc/lang/gcc15 \
50+
pkgsrc/mk \
51+
pkgsrc/pkgtools \
52+
pkgsrc/security/openssl \
53+
pkgsrc/sysutils/install-sh/files
54+
sync: 'rsync'
55+
copyback: false
56+
57+
- name: Install capnproto
58+
run: |
59+
cd /usr/pkgsrc/devel/capnproto/
60+
unset PKG_PATH
61+
make ${{ matrix.capnproto-cppflags }} install
62+
63+
- name: Run CI script
64+
run: |
65+
cd ${{ github.workspace }}
66+
CI_CONFIG="ci/configs/netbsd.bash" bash ci/scripts/ci.sh
67+
868
build-openbsd:
969
runs-on: ubuntu-latest
1070
name: build • openbsd

ci/configs/netbsd.bash

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CI_DESC="CI config for NetBSD"
2+
CI_DIR=build-netbsd
3+
export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter"
4+
# Hardcode GCC 14, since default GCC versions installed by NetBSD are older
5+
# and may not be compatible with libmultiprocess. GCC 14 was chosen because
6+
# it's the latest compiler available on all versions of NetBSD that we test.
7+
# Note that the GCC version specified here must match the version specified
8+
# in pkg_add in ci.yml.
9+
export CXX="/usr/pkg/gcc14/bin/g++"
10+
CMAKE_ARGS=(-G Ninja)
11+
BUILD_ARGS=(-k 0)

0 commit comments

Comments
 (0)