diff --git a/azure-devops/run-build.yml b/azure-devops/run-build.yml index bf4c1436163..3d4258ec860 100644 --- a/azure-devops/run-build.yml +++ b/azure-devops/run-build.yml @@ -2,12 +2,13 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception jobs: -- job: ${{ parameters.targetPlatform }} +- job: '${{ parameters.targetPlatform }}_${{ parameters.shardNum }}' timeoutInMinutes: 360 variables: buildOutputLocation: 'D:\build\${{ parameters.targetPlatform }}' litFlags: '-j$(testParallelism);--timeout=240;--shuffle;--xunit-xml-output=$(buildOutputLocation)/test-results.xml' + shardFlags: '--num-shards=${{ parameters.numShards }};--run-shard=${{ parameters.shardNum }}' vcpkgLocation: '$(Build.SourcesDirectory)/vcpkg' steps: - script: | @@ -62,7 +63,7 @@ jobs: -host_arch=amd64 -arch=${{ parameters.vsDevCmdArch }} -no_logo cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=$(vcpkgLocation)\scripts\buildsystems\vcpkg.cmake ^ -DVCPKG_TARGET_TRIPLET=${{ parameters.targetPlatform }}-windows -DCMAKE_CXX_COMPILER=cl ^ - -DCMAKE_BUILD_TYPE=Release -DLIT_FLAGS=$(litFlags) ^ + -DCMAKE_BUILD_TYPE=Release -DLIT_FLAGS=$(litFlags);$(shardFlags) ^ -DCMAKE_CXX_FLAGS=/analyze:autolog- ^ -S $(Build.SourcesDirectory) -B $(buildOutputLocation) cmake --build $(buildOutputLocation) @@ -88,4 +89,4 @@ jobs: searchFolder: $(buildOutputLocation) testResultsFormat: JUnit testResultsFiles: '**/test-results.xml' - testRunTitle: 'test-${{ parameters.targetPlatform }}' + testRunTitle: 'test-${{ parameters.targetPlatform }}-${{ parameters.shardNum }}' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 641674e59de..71a79fe47eb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -63,18 +63,124 @@ stages: parameters: targetPlatform: x86 vsDevCmdArch: x86 + numShards: 8 + shardNum: 1 + + - template: azure-devops/run-build.yml + parameters: + targetPlatform: x86 + vsDevCmdArch: x86 + numShards: 8 + shardNum: 2 + + - template: azure-devops/run-build.yml + parameters: + targetPlatform: x86 + vsDevCmdArch: x86 + numShards: 8 + shardNum: 3 + + - template: azure-devops/run-build.yml + parameters: + targetPlatform: x86 + vsDevCmdArch: x86 + numShards: 8 + shardNum: 4 + + - template: azure-devops/run-build.yml + parameters: + targetPlatform: x86 + vsDevCmdArch: x86 + numShards: 8 + shardNum: 5 + + - template: azure-devops/run-build.yml + parameters: + targetPlatform: x86 + vsDevCmdArch: x86 + numShards: 8 + shardNum: 6 + + - template: azure-devops/run-build.yml + parameters: + targetPlatform: x86 + vsDevCmdArch: x86 + numShards: 8 + shardNum: 7 + + - template: azure-devops/run-build.yml + parameters: + targetPlatform: x86 + vsDevCmdArch: x86 + numShards: 8 + shardNum: 8 + + - template: azure-devops/run-build.yml + parameters: + targetPlatform: x64 + vsDevCmdArch: amd64 + numShards: 8 + shardNum: 1 + + - template: azure-devops/run-build.yml + parameters: + targetPlatform: x64 + vsDevCmdArch: amd64 + numShards: 8 + shardNum: 2 + + - template: azure-devops/run-build.yml + parameters: + targetPlatform: x64 + vsDevCmdArch: amd64 + numShards: 8 + shardNum: 3 + + - template: azure-devops/run-build.yml + parameters: + targetPlatform: x64 + vsDevCmdArch: amd64 + numShards: 8 + shardNum: 4 + + - template: azure-devops/run-build.yml + parameters: + targetPlatform: x64 + vsDevCmdArch: amd64 + numShards: 8 + shardNum: 5 + + - template: azure-devops/run-build.yml + parameters: + targetPlatform: x64 + vsDevCmdArch: amd64 + numShards: 8 + shardNum: 6 + + - template: azure-devops/run-build.yml + parameters: + targetPlatform: x64 + vsDevCmdArch: amd64 + numShards: 8 + shardNum: 7 - template: azure-devops/run-build.yml parameters: targetPlatform: x64 vsDevCmdArch: amd64 + numShards: 8 + shardNum: 8 - template: azure-devops/run-build.yml parameters: targetPlatform: arm vsDevCmdArch: arm + numShards: 1 + shardNum: 1 - template: azure-devops/run-build.yml parameters: targetPlatform: arm64 vsDevCmdArch: arm64 + numShards: 1 + shardNum: 1