Skip to content

Commit

Permalink
Fix Clang on Windows builds in CI
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
PatKamin committed Nov 23, 2023
1 parent fa2e5b0 commit eb472b4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit eb472b4

Please sign in to comment.