diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e751c5f..6e9e5485 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,35 @@ on: pull_request: jobs: + build-openbsd: + runs-on: ubuntu-latest + name: build • openbsd + defaults: + run: + shell: openbsd {0} + steps: + - uses: actions/checkout@v5 + + - name: Start OpenBSD VM + uses: vmactions/openbsd-vm@v1 + with: + prepare: | + pkg_add -v cmake ninja git python bash + run: | + git clone --depth=1 https://codeberg.org/OpenBSD/ports.git /usr/ports + sync: 'rsync' + copyback: false + + - name: Install capnproto + run: | + cd /usr/ports/devel/capnproto/ + make install + + - name: Run CI script + run: | + cd ${{ github.workspace }} + CI_CONFIG="ci/configs/openbsd.bash" bash ci/scripts/ci.sh + build: runs-on: ubuntu-latest @@ -16,7 +45,7 @@ jobs: name: build • ${{ matrix.config }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install Nix uses: cachix/install-nix-action@v31 # 2025-05-27, from https://github.com/cachix/install-nix-action/tags diff --git a/ci/configs/openbsd.bash b/ci/configs/openbsd.bash new file mode 100644 index 00000000..a404e2bc --- /dev/null +++ b/ci/configs/openbsd.bash @@ -0,0 +1,5 @@ +CI_DESC="CI config for OpenBSD" +CI_DIR=build-openbsd +export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter" +CMAKE_ARGS=(-G Ninja) +BUILD_ARGS=(-k 0) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 0e758d57..7da049c3 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -24,6 +24,5 @@ add_executable(mpexample target_capnp_sources(mpexample ${CMAKE_CURRENT_SOURCE_DIR} init.capnp calculator.capnp printer.capnp) target_include_directories(mpexample PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(mpexample PRIVATE Threads::Threads) -target_link_libraries(mpexample PRIVATE stdc++fs) add_custom_target(mpexamples DEPENDS mpexample mpcalculator mpprinter) diff --git a/src/mp/util.cpp b/src/mp/util.cpp index a9485399..da7c3b0b 100644 --- a/src/mp/util.cpp +++ b/src/mp/util.cpp @@ -16,6 +16,7 @@ #include #include #include +#include // NOLINT(misc-include-cleaner) // IWYU pragma: keep #include #include #include