Enable MTT over parallel flag (#4998)

This commit is contained in:
tooomm 2024-02-10 21:30:43 +01:00 committed by GitHub
parent c8723ae935
commit 96caeaca72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View file

@ -160,7 +160,13 @@ cmake .. "${flags[@]}"
echo "::endgroup::"
echo "::group::Build project"
if [[ $RUNNER_OS == Windows ]]; then
# Enable MTT, see https://devblogs.microsoft.com/cppblog/improved-parallelism-in-msbuild/
# and https://devblogs.microsoft.com/cppblog/cpp-build-throughput-investigation-and-tune-up/#multitooltask-mtt
cmake --build . "${buildflags[@]}" -- -p:UseMultiToolTask=true
else
cmake --build . "${buildflags[@]}"
fi
echo "::endgroup::"
if [[ $USE_CCACHE ]]; then

View file

@ -358,7 +358,9 @@ jobs:
CMAKE_GENERATOR: '${{env.CMAKE_GENERATOR}}'
CMAKE_GENERATOR_PLATFORM: 'x64'
QTDIR: '${{github.workspace}}\Qt\${{matrix.qt_version}}\win64_${{matrix.qt_arch}}'
run: .ci/compile.sh --server --release --test --package --parallel 4
# No need for --parallel flag, MTT is added in the compile script to let cmake/msbuild manage core count,
# project and process parallelism: https://devblogs.microsoft.com/cppblog/improved-parallelism-in-msbuild/
run: .ci/compile.sh --server --release --test --package
- name: Upload artifact
uses: actions/upload-artifact@v4