77
88jobs :
99 windows-msvc :
10+ strategy :
11+ fail-fast : false
12+ matrix :
13+ format : ["JSON", "CAPNPROTO", "CBOR", "FLEXBUFFERS", "MSGPACK", "XML", "TOML", "UBJSON", "YAML", "benchmarks"]
14+ name : " windows-msvc (${{ matrix.format }})"
1015 runs-on : windows-latest
1116 steps :
1217 - name : Checkout
@@ -22,29 +27,41 @@ jobs:
2227 core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
2328 - uses : ilammy/msvc-dev-cmd@v1
2429 - uses : lukka/run-vcpkg@v11
25- - name : Compile
30+ - name : Compile benchmarks
31+ if : matrix.format == 'benchmarks'
2632 run : |
27- cmake -S . -B build -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_BUILD_BENCHMARKS=ON -DREFLECTCPP_BSON=ON -DREFLECTCPP_CAPNPROTO=ON -DREFLECTCPP_CBOR=ON -DREFLECTCPP_FLEXBUFFERS=ON -DREFLECTCPP_MSGPACK=ON -DREFLECTCPP_XML=ON -DREFLECTCPP_TOML=ON -DREFLECTCPP_YAML=ON -DCMAKE_BUILD_TYPE=Release
33+ cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_BENCHMARKS=ON -DREFLECTCPP_ALL_FORMATS=ON -DCMAKE_BUILD_TYPE=Release
34+ cmake --build build --config Release -j4
35+ - name : Compile tests (JSON)
36+ if : matrix.format == 'JSON'
37+ run : |
38+ cmake -S . -B build -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
39+ cmake --build build --config Release -j4
40+ - name : Compile tests (Other formats)
41+ if : matrix.format != 'JSON' && matrix.format != 'benchmarks'
42+ run : |
43+ cmake -S . -B build -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_JSON=OFF -DREFLECTCPP_${{ matrix.format }}=ON -DCMAKE_BUILD_TYPE=Release
2844 cmake --build build --config Release -j4
2945 - name : Run tests
3046 run : |
3147 ctest --test-dir build --output-on-failure
32- - name : Run benchmarks
48+ - name : Run benchmarks
49+ if : matrix.format == 'benchmarks'
3350 run : |
34- echo '# Benchmarks' >> $env: GITHUB_STEP_SUMMARY
35- echo '## Benchmarks across different formats' >> $env: GITHUB_STEP_SUMMARY
36- echo '```' >> $env: GITHUB_STEP_SUMMARY
37- .\ build\ benchmarks\ all\Release\ reflect-cpp-all-format-benchmarks.exe --benchmark_filter=canada_read >> $env: GITHUB_STEP_SUMMARY
38- .\ build\ benchmarks\ all\Release\ reflect-cpp-all-format-benchmarks.exe --benchmark_filter=canada_write >> $env: GITHUB_STEP_SUMMARY
39- .\ build\ benchmarks\ all\Release\ reflect-cpp-all-format-benchmarks.exe --benchmark_filter=licenses_read >> $env: GITHUB_STEP_SUMMARY
40- .\ build\ benchmarks\ all\Release\ reflect-cpp-all-format-benchmarks.exe --benchmark_filter=licenses_write >> $env: GITHUB_STEP_SUMMARY
41- .\ build\ benchmarks\ all\Release\ reflect-cpp-all-format-benchmarks.exe --benchmark_filter=person_read >> $env: GITHUB_STEP_SUMMARY
42- .\ build\ benchmarks\ all\Release\ reflect-cpp-all-format-benchmarks.exe --benchmark_filter=person_write >> $env: GITHUB_STEP_SUMMARY
43- echo '```' >> $env: GITHUB_STEP_SUMMARY
44- echo '## Benchmarks for JSON' >> $env: GITHUB_STEP_SUMMARY
45- echo '```' >> $env: GITHUB_STEP_SUMMARY
46- .\ build\ benchmarks\ json\Release\ reflect-cpp-json-benchmarks.exe --benchmark_filter=person_read >> $env: GITHUB_STEP_SUMMARY
47- .\ build\ benchmarks\ json\Release\ reflect-cpp-json-benchmarks.exe --benchmark_filter=canada >> $env: GITHUB_STEP_SUMMARY
48- .\ build\ benchmarks\ json\Release\ reflect-cpp-json-benchmarks.exe --benchmark_filter=licenses >> $env: GITHUB_STEP_SUMMARY
49- echo '```' >> $env: GITHUB_STEP_SUMMARY
51+ echo '# Benchmarks' >> $GITHUB_STEP_SUMMARY
52+ echo '## Benchmarks across different formats' >> $GITHUB_STEP_SUMMARY
53+ echo '```' >> $GITHUB_STEP_SUMMARY
54+ ./ build/ benchmarks/ all/ reflect-cpp-all-format-benchmarks --benchmark_filter=canada_read >> $GITHUB_STEP_SUMMARY
55+ ./ build/ benchmarks/ all/ reflect-cpp-all-format-benchmarks --benchmark_filter=canada_write >> $GITHUB_STEP_SUMMARY
56+ ./ build/ benchmarks/ all/ reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_read >> $GITHUB_STEP_SUMMARY
57+ ./ build/ benchmarks/ all/ reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_write >> $GITHUB_STEP_SUMMARY
58+ ./ build/ benchmarks/ all/ reflect-cpp-all-format-benchmarks --benchmark_filter=person_read >> $GITHUB_STEP_SUMMARY
59+ ./ build/ benchmarks/ all/ reflect-cpp-all-format-benchmarks --benchmark_filter=person_write >> $GITHUB_STEP_SUMMARY
60+ echo '```' >> $GITHUB_STEP_SUMMARY
61+ echo '## Benchmarks for JSON' >> $GITHUB_STEP_SUMMARY
62+ echo '```' >> $GITHUB_STEP_SUMMARY
63+ ./ build/ benchmarks/ json/ reflect-cpp-json-benchmarks --benchmark_filter=person_read >> $GITHUB_STEP_SUMMARY
64+ ./ build/ benchmarks/ json/ reflect-cpp-json-benchmarks --benchmark_filter=canada >> $GITHUB_STEP_SUMMARY
65+ ./ build/ benchmarks/ json/ reflect-cpp-json-benchmarks --benchmark_filter=licenses >> $GITHUB_STEP_SUMMARY
66+ echo '```' >> $GITHUB_STEP_SUMMARY
5067
0 commit comments