Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,62 @@ on:
pull_request:

jobs:
build-netbsd:
runs-on: ubuntu-latest
name: build • netbsd ${{ matrix.release }}
defaults:
run:
shell: netbsd {0}
strategy:
fail-fast: false
matrix:
# Test all supported releases.
# See https://www.netbsd.org/releases/.
include:
- release: 9.4
capnproto-cppflags: 'CPPFLAGS="-DKJ_NO_EXCEPTIONS=0 -DKJ_USE_KQUEUE=0"'
- release: 10.1
capnproto-cppflags: 'CPPFLAGS="-DKJ_NO_EXCEPTIONS=0"'
steps:
- uses: actions/checkout@v6

- name: Start NetBSD VM
uses: vmactions/netbsd-vm@v1
with:
release: ${{ matrix.release }}
prepare: |
pkg_add cmake ninja-build gcc14
# capnproto prerequisites.
# See the following "Install capnproto" step.
run: |
set -e
pkg_add digest libtool-base mktools pkgconf cwrappers
pkg_admin -K /usr/pkg/pkgdb fetch-pkg-vulnerabilities
cd /usr
cvs -danoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P \
pkgsrc/devel/capnproto \
pkgsrc/devel/libtool-base \
pkgsrc/devel/pkgconf \
pkgsrc/devel/zlib \
pkgsrc/lang/gcc15 \
pkgsrc/mk \
pkgsrc/pkgtools \
pkgsrc/security/openssl \
pkgsrc/sysutils/install-sh/files
Comment on lines +40 to +49
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In commit "ci: Add NetBSD job" (d6f80ca)

Can you add a comment about where this list of dependencies comes from? I would like have some idea of how it can be updated in the future in the case of a new release or breakage.

I see openssl and zlib included at the bottom of https://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/devel/capnproto/Makefile?rev=1.11 so it makes sense they need to be included in the CVS checkout. But i'm not sure about the other ones. Especially gcc15 which seems to be checked out but not ever mentioned in the logs after the cvs checkout. So maybe it is not being used? The gcc15 version is also surprising since gcc14 seems to be used in other places this PR.

If you don't have answers to all the questions here that is fine, it would just help to have a comment saying where this comes from, so it is clear which parts of the netbsd config were intentionally chosen and which parts we are unsure about.

sync: 'rsync'
copyback: false

- name: Install capnproto
run: |
cd /usr/pkgsrc/devel/capnproto/
unset PKG_PATH
make ${{ matrix.capnproto-cppflags }} install

- name: Run CI script
run: |
cd ${{ github.workspace }}
CI_CONFIG="ci/configs/netbsd.bash" bash ci/scripts/ci.sh

build-openbsd:
runs-on: ubuntu-latest
name: build • openbsd
Expand Down
6 changes: 6 additions & 0 deletions ci/configs/netbsd.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CI_DESC="CI config for NetBSD"
CI_DIR=build-netbsd
export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter"
export CXX="/usr/pkg/gcc14/bin/g++"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In commit "ci: Add NetBSD job" (d6f80ca)

Is it necessary to hardcode gcc 14 here? If the gcc version in this file needs to be kept in sync with the gcc version ci.yml it would be helpful to have a comment both places stating this. Or if there is a way to use a default system compiler or a default gcc version and not hardcode any version that would seem even nicer.

CMAKE_ARGS=(-G Ninja)
BUILD_ARGS=(-k 0)
Loading