Skip to content

Commit bff804a

Browse files
CopilotcarsonRadtke
andcommitted
Improve workflow readability with matrix include for generator configuration
Co-authored-by: carsonRadtke <10507970+carsonRadtke@users.noreply.github.com>
1 parent 55f4956 commit bff804a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/compilers.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,15 @@ jobs:
8484
build_type: [ Debug, Release ]
8585
toolset: [ '', 'ClangCL' ]
8686
cxx_version: [ 14, 17, 20, 23 ]
87+
include:
88+
# Regular MSVC builds use Ninja (from preset)
89+
- toolset: ''
90+
generator_override: ''
91+
build_config_args: ''
92+
test_config_args: ''
93+
# ClangCL builds require Visual Studio generator
94+
- toolset: 'ClangCL'
95+
generator_override: '-G "Visual Studio 17 2022" -T ClangCL'
8796
runs-on: ${{ matrix.image }}
8897
steps:
8998
- uses: actions/checkout@v4
@@ -93,7 +102,7 @@ jobs:
93102
uses: ./.github/workflows/cmake
94103
with:
95104
cmake_preset: msvc-${{ matrix.cxx_version }}-${{ matrix.build_type == 'Debug' && 'debug' || 'release' }}
96-
extra_cmake_configure_args: ${{ matrix.toolset != '' && format('-G "Visual Studio 17 2022" -T {0}', matrix.toolset) || '' }}
97-
extra_cmake_build_args: ${{ matrix.toolset != '' && format('--config {0}', matrix.build_type) || '' }}
98-
extra_ctest_args: ${{ matrix.toolset != '' && format('-C {0}', matrix.build_type) || '' }}
105+
extra_cmake_configure_args: ${{ matrix.generator_override }}
106+
extra_cmake_build_args: ${{ matrix.toolset == 'ClangCL' && format('--config {0}', matrix.build_type) || '' }}
107+
extra_ctest_args: ${{ matrix.toolset == 'ClangCL' && format('-C {0}', matrix.build_type) || '' }}
99108

0 commit comments

Comments
 (0)