From 07e8336390df0495accaddb2c1c4fd8029adf9c1 Mon Sep 17 00:00:00 2001 From: Alexander Bigulov <42319615+bialger@users.noreply.github.com> Date: Tue, 13 Feb 2024 15:18:54 +0300 Subject: [PATCH] Windows MinGW used --- .github/workflows/ci_tests.yml | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index f7846d5..7b8f499 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -55,27 +55,15 @@ jobs: endif() - name: Create CMake cache - shell: cmake -P {0} + shell: bash run: | - execute_process( - COMMAND cmake -S . -B cmake-build-release -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_BUILD_TYPE=Release - RESULT_WORKING_DIRECTORY build - RESULT_VARIABLE result - ) - - if (NOT result EQUAL 0) - message(FATAL_ERROR "Running tests failed!") - endif() - - execute_process( - COMMAND cmake -S . -B cmake-build-debug -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_BUILD_TYPE=Debug - RESULT_WORKING_DIRECTORY build - RESULT_VARIABLE result - ) - - if (NOT result EQUAL 0) - message(FATAL_ERROR "Running tests failed!") - endif() + if [ "${{ matrix.config.cxx }}" == "g++" ]; then + cmake -S . -B cmake-build-release -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" + cmake -S . -B cmake-build-debug -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" + else + cmake -S . -B cmake-build-release -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_BUILD_TYPE=Release + cmake -S . -B cmake-build-debug -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_BUILD_TYPE=Debug + fi - name: Build main target run: |