Skip to content

Commit f4605cb

Browse files
committed
update
1 parent ed1f362 commit f4605cb

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/cmake-multi-platform.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ jobs:
5353
steps:
5454
- uses: actions/checkout@v3
5555

56+
- name: Validate build type
57+
if: matrix.build_type == ''
58+
run: |
59+
echo "Error: matrix.build_type is empty. Please set a valid build type (e.g., Release, Debug)."
60+
exit 1
61+
5662
- name: Set up Python
5763
uses: actions/setup-python@v2
5864
with:
@@ -96,9 +102,8 @@ jobs:
96102
-S ${{ github.workspace }}
97103
98104
- name: Build
99-
# Build your program with the given configuration.
100-
run: |
101-
cmake --build ${{ steps.strings.outputs.build-output-dir }}
105+
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
106+
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
102107

103108
- name: Test
104109
working-directory: ${{ steps.strings.outputs.build-output-dir }}

0 commit comments

Comments
 (0)