diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffaca1ca..529db751 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,16 @@ jobs: # 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 + # Due to a bug in Cap'n Proto, GCC compilers older + # than 14.x require `-DKJ_NO_EXCEPTIONS=0` when + # processing `capnproto/c++/src/kj/common.h`. + # See https://github.com/capnproto/capnproto/pull/2756/changes/28fa1a6753514d8de56875ec2222fa0e1c3a04f7. + - release: '10.1' capnproto-cppflags: 'CPPFLAGS="-DKJ_NO_EXCEPTIONS=0"' + env_vars: 'CXXFLAGS="-DKJ_NO_EXCEPTIONS=0"' + - release: '11.0' + capnproto-cppflags: 'CPPFLAGS="-DKJ_NO_EXCEPTIONS=0"' + env_vars: 'CXXFLAGS="-DKJ_NO_EXCEPTIONS=0"' steps: - uses: actions/checkout@v6 @@ -63,7 +69,7 @@ jobs: - name: Run CI script run: | cd ${{ github.workspace }} - CI_CONFIG="ci/configs/netbsd.bash" bash ci/scripts/ci.sh + CI_CONFIG="ci/configs/netbsd.bash" ${{ matrix.env_vars }} bash ci/scripts/ci.sh build-openbsd: runs-on: ubuntu-latest diff --git a/ci/configs/netbsd.bash b/ci/configs/netbsd.bash index c3e7d258..203b6623 100644 --- a/ci/configs/netbsd.bash +++ b/ci/configs/netbsd.bash @@ -1,11 +1,5 @@ CI_DESC="CI config for NetBSD" CI_DIR=build-netbsd -export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter" -# Hardcode GCC 14, since default GCC versions installed by NetBSD are older -# and may not be compatible with libmultiprocess. GCC 14 was chosen because -# it's the latest compiler available on all versions of NetBSD that we test. -# Note that the GCC version specified here must match the version specified -# in pkg_add in ci.yml. -export CXX="/usr/pkg/gcc14/bin/g++" +export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter ${CXXFLAGS:-}" CMAKE_ARGS=(-G Ninja) BUILD_ARGS=(-k 0) diff --git a/include/mp/proxy-types.h b/include/mp/proxy-types.h index ed458209..b790dd39 100644 --- a/include/mp/proxy-types.h +++ b/include/mp/proxy-types.h @@ -627,7 +627,7 @@ template auto PassField(Priority<2>, Args&&... args) -> decltype(CustomPassField(std::forward(args)...)) { return CustomPassField(std::forward(args)...); -}; +} template struct ServerField : Parent diff --git a/include/mp/type-function.h b/include/mp/type-function.h index 951e0885..fade9b42 100644 --- a/include/mp/type-function.h +++ b/include/mp/type-function.h @@ -61,7 +61,7 @@ decltype(auto) CustomReadField(TypeList> types, return read_dest.construct(ProxyCallFn{std::move(client)}); } return read_dest.construct(); -}; +} } // namespace mp #endif // MP_PROXY_TYPE_FUNCTION_H