From ea34aefff6d452b7aa91a64d9c1d3d73840602e0 Mon Sep 17 00:00:00 2001 From: Aster Seker Date: Thu, 4 Sep 2025 23:06:46 +0300 Subject: [PATCH 1/2] ci(workflows): run ctest Invoke cmake with tests enabled and execute ctest on Linux and Windows runners. Ensure required packages are installed. --- .github/workflows/CI-Linux.yml | 12 ++++++++---- .github/workflows/CI-Win.yml | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI-Linux.yml b/.github/workflows/CI-Linux.yml index dbb4565..a2958f7 100644 --- a/.github/workflows/CI-Linux.yml +++ b/.github/workflows/CI-Linux.yml @@ -20,7 +20,11 @@ jobs: std: [11, 17] steps: - uses: actions/checkout@v3 - - name: Build and Run Tests - run: | - sudo apt-get update && sudo apt-get install -y cmake - CXX_STANDARD=${{ matrix.std }} ./scripts/run_tests.sh + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y cmake + - name: Configure + run: cmake -S . -B build -DBUILD_TESTS=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} + - name: Build + run: cmake --build build + - name: Run tests + run: cd build && ctest --output-on-failure diff --git a/.github/workflows/CI-Win.yml b/.github/workflows/CI-Win.yml index 3e59046..8e16889 100644 --- a/.github/workflows/CI-Win.yml +++ b/.github/workflows/CI-Win.yml @@ -28,8 +28,12 @@ jobs: mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-make - - name: Build and Run Tests + - name: Configure shell: msys2 {0} - run: | - export CXX_STANDARD=${{ matrix.std }} - ./scripts/run_tests.sh + run: cmake -S . -B build -DBUILD_TESTS=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} + - name: Build + shell: msys2 {0} + run: cmake --build build + - name: Run tests + shell: msys2 {0} + run: ctest --test-dir build --output-on-failure From 9b02c959c8078daeae37d9b3459edad44c3b5e8c Mon Sep 17 00:00:00 2001 From: Aster Seker Date: Fri, 5 Sep 2025 00:41:21 +0300 Subject: [PATCH 2/2] ci(linux): add vcpkg job Add job to install vcpkg, build with its toolchain, and run tests. --- .github/workflows/CI-Linux.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/CI-Linux.yml b/.github/workflows/CI-Linux.yml index a2958f7..728e5e7 100644 --- a/.github/workflows/CI-Linux.yml +++ b/.github/workflows/CI-Linux.yml @@ -28,3 +28,18 @@ jobs: run: cmake --build build - name: Run tests run: cd build && ctest --output-on-failure + vcpkg: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install vcpkg + run: | + git clone https://github.com/microsoft/vcpkg.git + ./vcpkg/bootstrap-vcpkg.sh + ./vcpkg/vcpkg install gtest + - name: Configure + run: cmake -S . -B build -DBUILD_TESTS=ON -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake + - name: Build + run: cmake --build build + - name: Run tests + run: cd build && ctest --output-on-failure