From eb472b41534af17bc855cf2671a65b4121e72961 Mon Sep 17 00:00:00 2001 From: Patryk Kaminski Date: Thu, 23 Nov 2023 08:56:53 +0100 Subject: [PATCH] Fix Clang on Windows builds in CI Fixes issue #1111. Enable clang-cl test builds on Windows in the Github Actions workflow. Also: - Remove redundant '.exe' suffixes. - Run Windows builds on the max available number of cpus. --- .github/workflows/cmake.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index fa82331fdb..4a3c4ddfeb 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -98,7 +98,10 @@ jobs: matrix: os: ['windows-2019', 'windows-2022'] build_type: [Debug, Release] - compiler: [{c: cl.exe, cxx: cl.exe}, {c: clang-cl.exe, cxx: clang-cl.exe}] + compiler: [{c: cl, cxx: cl}, {c: clang-cl, cxx: clang-cl}] + include: + - compiler: {c: clang-cl, cxx: clang-cl} + toolset: "-T ClangCL" runs-on: ${{matrix.os}} steps: @@ -122,6 +125,7 @@ jobs: run: > cmake -B${{github.workspace}}/build + ${{matrix.toolset}} -DCMAKE_C_COMPILER=${{matrix.compiler.c}} -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} -DCMAKE_POLICY_DEFAULT_CMP0094=NEW @@ -135,7 +139,7 @@ jobs: run: cmake --build ${{github.workspace}}/build --target check-generated --config ${{matrix.build_type}} - name: Build all - run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j 2 + run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS - name: Test working-directory: ${{github.workspace}}/build