diff --git a/eng/pipelines/coreclr/templates/build-perf-bdn-app.yml b/eng/pipelines/coreclr/templates/build-perf-bdn-app.yml index df38f21fe15d3e..ddcea7b914715c 100644 --- a/eng/pipelines/coreclr/templates/build-perf-bdn-app.yml +++ b/eng/pipelines/coreclr/templates/build-perf-bdn-app.yml @@ -81,7 +81,21 @@ steps: displayName: Clone Maui workingDirectory: $(Build.SourcesDirectory) + - script: | + set -x + pwd + git clone https://github.com/dotnet/performance.git --depth 1 -b ${{parameters.perfRepo}} --single-branch + displayName: Clone performance + workingDirectory: $(Build.SourcesDirectory) + - pwsh: | + $BenchmarkDotNetVersionCapture = Get-Content .\performance\eng\Versions.props | Select-String -Pattern '(.+?)' + if ($BenchmarkDotNetVersionCapture.Length -eq 0) { + Write-Error "BenchmarkDotNetVersion not found in Versions.props" + exit 1 + } + $BenchmarkDotNetVersion = $BenchmarkDotNetVersionCapture.Matches.Groups[1].Value + $instrumentationFileContent = Get-Content .\maui\src\Core\tests\Benchmarks.Droid\MainInstrumentation.cs $perfLabExportLine = $instrumentationFileContent | Select-String -Pattern 'using BenchmarkDotNet.Toolchains.InProcess.Emit;' $lineNumber = $perfLabExportLine.LineNumber @@ -100,7 +114,7 @@ steps: $packageReferenceLine = $benchmarksDroidConfigFileContent | Select-String -Pattern '" + $benchmarksDroidConfigFileContent[$lineNumber-1] = " " $projectReferenceLine = $benchmarksDroidConfigFileContent | Select-String -Pattern '' $lineNumber = $projectReferenceLine.LineNumber @@ -131,13 +145,6 @@ steps: displayName: Insert Target Replace, BDN config link, and PerfLabExporter workingDirectory: $(Build.SourcesDirectory) - - script: | - set -x - pwd - git clone https://github.com/dotnet/performance.git --depth 1 -b ${{parameters.perfRepo}} --single-branch - displayName: Clone performance - workingDirectory: $(Build.SourcesDirectory) - # Remove the embed assemblies from source - script: | ../dotnet build ./src/Core/tests/Benchmarks.Droid/Benchmarks.Droid.csproj --configuration Release -bl:BenchmarksDroid.binlog /p:TF_Build=False