Skip to content

Commit eb472b4

Browse files
committed
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.
1 parent fa2e5b0 commit eb472b4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/cmake.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ jobs:
9898
matrix:
9999
os: ['windows-2019', 'windows-2022']
100100
build_type: [Debug, Release]
101-
compiler: [{c: cl.exe, cxx: cl.exe}, {c: clang-cl.exe, cxx: clang-cl.exe}]
101+
compiler: [{c: cl, cxx: cl}, {c: clang-cl, cxx: clang-cl}]
102+
include:
103+
- compiler: {c: clang-cl, cxx: clang-cl}
104+
toolset: "-T ClangCL"
102105
runs-on: ${{matrix.os}}
103106

104107
steps:
@@ -122,6 +125,7 @@ jobs:
122125
run: >
123126
cmake
124127
-B${{github.workspace}}/build
128+
${{matrix.toolset}}
125129
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
126130
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
127131
-DCMAKE_POLICY_DEFAULT_CMP0094=NEW
@@ -135,7 +139,7 @@ jobs:
135139
run: cmake --build ${{github.workspace}}/build --target check-generated --config ${{matrix.build_type}}
136140

137141
- name: Build all
138-
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j 2
142+
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS
139143

140144
- name: Test
141145
working-directory: ${{github.workspace}}/build

0 commit comments

Comments
 (0)