From a900e6cfdd3e99a501be426e4d3a2fa71b5ba258 Mon Sep 17 00:00:00 2001 From: Jin Cai Date: Sat, 21 Dec 2024 23:29:13 +0800 Subject: [PATCH] [test] fix Github Actions for clang and gcc in Windows --- .github/workflows/test_cxx20.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_cxx20.yml b/.github/workflows/test_cxx20.yml index 6525451..c3c24dc 100644 --- a/.github/workflows/test_cxx20.yml +++ b/.github/workflows/test_cxx20.yml @@ -29,6 +29,8 @@ jobs: - build_type: MinSizeRel os: windows-latest compiler: [cl, cl] + env: + proj_type: ${{ (matrix.os == 'windows-latest' && matrix.compiler[0] != 'cl') && '-G "MinGW Makefiles"' || '' }} steps: - uses: actions/checkout@v4 @@ -39,7 +41,8 @@ jobs: echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - name: configure CMake run: > - cmake -B ${{ github.workspace }}/build -S ${{ github.workspace }} + cmake ${{ env.proj_type }} + -B ${{ github.workspace }}/build -S ${{ github.workspace }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_C_COMPILER=${{ matrix.compiler[0] }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler[1] }}