From fcfaa20fa3fa8b522783a38c8324f334bcf37969 Mon Sep 17 00:00:00 2001 From: Andreas Schuh Date: Mon, 31 Mar 2025 23:21:54 +0100 Subject: [PATCH] test: Run cmake and ctest directly in GH action --- .github/workflows/test.yml | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 20b91e5..2487abf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,26 +17,32 @@ jobs: matrix: os: - ubuntu-latest - - macos-latest - - windows-latest + # - macos-latest + # - windows-latest + cmake: + - '4.0' + - '3.31' fail-fast: false permissions: contents: write steps: - name: Checkout Project uses: actions/checkout@v4 + - name: Setup cmake + uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2 + with: + cmake-version: ${{ matrix.cmake }} - name: Setup Ninja uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6 - - name: Build CMake Project - uses: threeal/cmake-action@725d1314ccf9ea922805d7e3f9d9bcbca892b406 # v2.1.0 - with: - generator: Ninja - cxx-compiler: clang++ - build-dir: ${{github.workspace}}/build - options: | - CMAKE_BUILD_TYPE=Release - GFLAGS_BUILD_SHARED_LIBS=ON - GFLAGS_BUILD_STATIC_LIBS=ON - GFLAGS_BUILD_TESTING=ON + - name: Configure CMake + run: | + cmake -B build -G Ninja \ + -D CMAKE_CXX_COMPILER=clang++ \ + -D CMAKE_BUILD_TYPE=Release \ + -D GFLAGS_BUILD_SHARED_LIBS=ON \ + -D GFLAGS_BUILD_STATIC_LIBS=ON \ + -D GFLAGS_BUILD_TESTING=ON + - name: Build Tests + run: cmake --build build --config Release - name: Run Tests - uses: threeal/ctest-action@8f90c568a3060a3cffb896e241be14bd3f53d526 # v1.1.0 + run: cd build && ctest