feat(testing): expose complete iKvxx test suite

This commit is contained in:
2026-06-17 19:07:51 -05:00
parent e651ae1575
commit 3628fd1c7f
6 changed files with 138 additions and 55 deletions

View File

@@ -1,56 +1,55 @@
name: C++ bindings
name: Build
on:
push:
pull_request:
jobs:
test:
name: ${{ matrix.compiler }} / ${{ matrix.build_type }}
cmake-build:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- compiler: gcc
cc: gcc
cxx: g++
build_type: Debug
- compiler: gcc
cc: gcc
cxx: g++
build_type: Release
- compiler: clang
cc: clang
cxx: clang++
build_type: Debug
- compiler: clang
cc: clang
cxx: clang++
build_type: Release
steps:
- name: Checkout with submodules
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: >-
cmake -S . -B build
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DIKVXX_BUILD_TESTS=ON
-DIKVXX_INSTALL=ON
- 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: Build
run: cmake --build build --parallel 2
- name: Configure CMake build
run: |
cmake -S . -B build -G Ninja -DIKVXX_BUILD_TESTS=OFF
- name: Test bindings
run: ctest --test-dir build --build-config ${{ matrix.build_type }} --output-on-failure
- name: Build with CMake
run: |
cmake --build build
- name: Verify installation
run: cmake --install build --prefix "${{ runner.temp }}/ikvxx-install"
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