-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start automating benchmarks in pipeline (#1114)
* Run benchmarks in pipeline * fix msbuild not found * Move benchmarks to separate stage. * Enable cloning testwinrt * Attempt fix * Restore packages * Add results comparison * Fix yml file * Fix YML file * Adding baseline benchmarks * Add result comparison * Escape % * Increase threshold for now due to CPU differences and re-enable pipeline * Move comparison to benchmark.cmd to enable local comparisons. * Rearrange pipeline * Fix yml * Revert last 2 commits * Try adding depends * Undo * Try removing dependency for benchmark * Move benchmark stage * Rename * Fix template * Fix template * Move around templates * Fix template * Remove depends * Rename * Rename * Run all benchmarks * Add component detection task
- Loading branch information
1 parent
765ae46
commit 330a511
Showing
19 changed files
with
56,284 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
steps: | ||
- checkout: self | ||
clean: true | ||
persistCredentials: true | ||
|
||
# Clone TestWinRT | ||
- task: CmdLine@2 | ||
displayName: Clone TestWinRT | ||
inputs: | ||
script: get_testwinrt.cmd | ||
workingDirectory: $(Build.SourcesDirectory)\src | ||
|
||
# Use .NET Core SDK 2.1 | ||
- task: UseDotNet@2 | ||
displayName: Use .NET Core SDK 2.1 | ||
inputs: | ||
version: 2.1.x | ||
installationPath: C:\Users\VssAdministrator\AppData\Local\Microsoft\dotnet\ | ||
performMultiLevelLookup: true | ||
|
||
# Install .NET 5 SDK | ||
- task: PowerShell@2 | ||
displayName: Install .NET 5 SDK | ||
inputs: | ||
targetType: inline | ||
failOnStderr: true | ||
script: | | ||
Write-Host ##vso[task.setvariable variable=PATH;]${env:LocalAppData}\Microsoft\dotnet;${env:PATH}; | ||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; | ||
&([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version "$($env:NET5_SDK_VERSION)" -Architecture "x64" -AzureFeed "$($env:NET5_SDK_FEED)" | ||
# Install .NET 6 SDK | ||
- task: PowerShell@2 | ||
displayName: Install .NET 6 SDK | ||
inputs: | ||
targetType: inline | ||
failOnStderr: true | ||
script: | | ||
Write-Host ##vso[task.setvariable variable=PATH;]${env:LocalAppData}\Microsoft\dotnet;${env:PATH}; | ||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; | ||
dotnet new globaljson --sdk-version "$($env:NET6_SDK_VERSION)" | ||
&([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version "$($env:NET6_SDK_VERSION)" -Architecture "x64" -AzureFeed "$($env:NET5_SDK_FEED)" | ||
# Verify .NET SDK | ||
- task: CmdLine@2 | ||
displayName: Verify .NET SDK | ||
inputs: | ||
workingDirectory: $(Build.SourcesDirectory) | ||
script: | | ||
where dotnet | ||
dotnet --info | ||
# Run Benchmarks | ||
- task: CmdLine@2 | ||
displayName: Run Benchmarks for x64 Release | ||
inputs: | ||
workingDirectory: $(Build.SourcesDirectory)\src | ||
script: | | ||
if "%VSCMD_VER%"=="" ( | ||
pushd c: | ||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" >nul 2>&1 | ||
popd | ||
) | ||
benchmark.cmd | ||
# Component Detection | ||
- task: ComponentGovernanceComponentDetection@0 | ||
displayName: Component Detection | ||
|
||
# Stage Benchmark Results | ||
- task: CopyFiles@2 | ||
displayName: Stage Benchmark Results | ||
condition: always() | ||
inputs: | ||
SourceFolder: $(Build.SourcesDirectory)\src\BenchmarkDotNet.Artifacts\results\ | ||
Contents: '*' | ||
TargetFolder: $(Build.ArtifactStagingDirectory)\benchmarks | ||
|
||
# Publish Results | ||
- task: PublishBuildArtifacts@1 | ||
displayName: Publish Results | ||
condition: always() | ||
inputs: | ||
PathtoPublish: $(Build.ArtifactStagingDirectory)\benchmarks | ||
ArtifactName: benchmarks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.