Skip to content

Commit dd8b00a

Browse files
Better solution
1 parent 9299c4e commit dd8b00a

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/windows.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ jobs:
3838
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
3939
- uses: ilammy/msvc-dev-cmd@v1
4040
- uses: lukka/run-vcpkg@v11
41-
- name: Compile
41+
- name: Compile tests (JSON)
42+
if: matrix.format == 'JSON'
4243
run: |
43-
if [[ "${{ matrix.format }}" == "JSON" ]]; then
44-
cmake -S . -B build -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
45-
else
46-
cmake -S . -B build -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_JSON=OFF -DREFLECTCPP_${{ matrix.format }}=ON -DCMAKE_BUILD_TYPE=Release
47-
fi
44+
cmake -S . -B build -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
45+
cmake --build build --config Release -j4
46+
- name: Compile tests (Other formats)
47+
if: matrix.format != 'JSON'
48+
run: |
49+
cmake -S . -B build -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_JSON=OFF -DREFLECTCPP_${{ matrix.format }}=ON -DCMAKE_BUILD_TYPE=Release
4850
cmake --build build --config Release -j4
4951
- name: Run tests
5052
run: |

0 commit comments

Comments
 (0)