Skip to content

Commit

Permalink
[PERF] Finish fixing PerfBDNApp, continuation of #89057 (#89135)
Browse files Browse the repository at this point in the history
Move performance repo clone to before the csproj update and pull out the BDNVersion value from the performance Versions.props.
  • Loading branch information
LoopedBard3 authored Jul 20, 2023
1 parent a524267 commit 2ec8a68
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions eng/pipelines/coreclr/templates/build-perf-bdn-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<BenchmarkDotNetVersion>(.+?)</BenchmarkDotNetVersion>'
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
Expand All @@ -100,7 +114,7 @@ steps:
$packageReferenceLine = $benchmarksDroidConfigFileContent | Select-String -Pattern '<PackageReference Include="BenchmarkDotNet"'
$lineNumber = $packageReferenceLine.LineNumber
$benchmarksDroidConfigFileContent[$lineNumber-1] = " <PackageReference Include=`"BenchmarkDotNet`" Version=`"`$(BenchmarkDotNetVersion)`" />"
$benchmarksDroidConfigFileContent[$lineNumber-1] = " <PackageReference Include=`"BenchmarkDotNet`" Version=`"$BenchmarkDotNetVersion`" />"
$projectReferenceLine = $benchmarksDroidConfigFileContent | Select-String -Pattern '<ProjectReference Include="..\\..\\src\\Core.csproj" />'
$lineNumber = $projectReferenceLine.LineNumber
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2ec8a68

Please sign in to comment.