name: Build on: push: pull_request: jobs: cmake-build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: submodules: recursive - name: Install build tools run: | if ! command -v c++ >/dev/null || ! command -v cmake >/dev/null || ! command -v ninja >/dev/null; then apt-get update DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake ninja-build fi - name: Configure CMake build run: | cmake -S . -B build -G Ninja -DIKVXX_BUILD_TESTS=OFF - name: Build with CMake run: | cmake --build build unit-tests: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: submodules: recursive - name: Install build tools run: | if ! command -v c++ >/dev/null || ! command -v cmake >/dev/null || ! command -v ninja >/dev/null; then apt-get update DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake ninja-build fi - name: Configure unit tests run: | cmake -S . -B build-tests -G Ninja -DIKVXX_BUILD_TESTS=ON -DIKVXX_INSTALL=OFF - name: Run unit tests run: | cmake --build build-tests ctest --test-dir build-tests --output-on-failure