@@ -81,7 +81,21 @@ steps:
8181 displayName: Clone Maui
8282 workingDirectory: $(Build.SourcesDirectory)
8383
84+ - script : |
85+ set -x
86+ pwd
87+ git clone https://github.com/dotnet/performance.git --depth 1 -b ${{parameters.perfRepo}} --single-branch
88+ displayName: Clone performance
89+ workingDirectory: $(Build.SourcesDirectory)
90+
8491 - pwsh : |
92+ $BenchmarkDotNetVersionCapture = Get-Content .\performance\eng\Versions.props | Select-String -Pattern '<BenchmarkDotNetVersion>(.+?)</BenchmarkDotNetVersion>'
93+ if ($BenchmarkDotNetVersionCapture.Length -eq 0) {
94+ Write-Error "BenchmarkDotNetVersion not found in Versions.props"
95+ exit 1
96+ }
97+ $BenchmarkDotNetVersion = $BenchmarkDotNetVersionCapture.Matches.Groups[1].Value
98+
8599 $instrumentationFileContent = Get-Content .\maui\src\Core\tests\Benchmarks.Droid\MainInstrumentation.cs
86100 $perfLabExportLine = $instrumentationFileContent | Select-String -Pattern 'using BenchmarkDotNet.Toolchains.InProcess.Emit;'
87101 $lineNumber = $perfLabExportLine.LineNumber
@@ -100,7 +114,7 @@ steps:
100114
101115 $packageReferenceLine = $benchmarksDroidConfigFileContent | Select-String -Pattern '<PackageReference Include="BenchmarkDotNet"'
102116 $lineNumber = $packageReferenceLine.LineNumber
103- $benchmarksDroidConfigFileContent[$lineNumber-1] = " <PackageReference Include=`"BenchmarkDotNet`" Version=`"`$( BenchmarkDotNetVersion) `" />"
117+ $benchmarksDroidConfigFileContent[$lineNumber-1] = " <PackageReference Include=`"BenchmarkDotNet`" Version=`"$ BenchmarkDotNetVersion`" />"
104118
105119 $projectReferenceLine = $benchmarksDroidConfigFileContent | Select-String -Pattern '<ProjectReference Include="..\\..\\src\\Core.csproj" />'
106120 $lineNumber = $projectReferenceLine.LineNumber
@@ -131,13 +145,6 @@ steps:
131145 displayName: Insert Target Replace, BDN config link, and PerfLabExporter
132146 workingDirectory: $(Build.SourcesDirectory)
133147
134- - script : |
135- set -x
136- pwd
137- git clone https://github.com/dotnet/performance.git --depth 1 -b ${{parameters.perfRepo}} --single-branch
138- displayName: Clone performance
139- workingDirectory: $(Build.SourcesDirectory)
140-
141148# Remove the embed assemblies from source
142149 - script : |
143150 ../dotnet build ./src/Core/tests/Benchmarks.Droid/Benchmarks.Droid.csproj --configuration Release -bl:BenchmarksDroid.binlog /p:TF_Build=False
0 commit comments