@@ -81,7 +81,21 @@ steps:
81
81
displayName: Clone Maui
82
82
workingDirectory: $(Build.SourcesDirectory)
83
83
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
+
84
91
- 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
+
85
99
$instrumentationFileContent = Get-Content .\maui\src\Core\tests\Benchmarks.Droid\MainInstrumentation.cs
86
100
$perfLabExportLine = $instrumentationFileContent | Select-String -Pattern 'using BenchmarkDotNet.Toolchains.InProcess.Emit;'
87
101
$lineNumber = $perfLabExportLine.LineNumber
@@ -100,7 +114,7 @@ steps:
100
114
101
115
$packageReferenceLine = $benchmarksDroidConfigFileContent | Select-String -Pattern '<PackageReference Include="BenchmarkDotNet"'
102
116
$lineNumber = $packageReferenceLine.LineNumber
103
- $benchmarksDroidConfigFileContent[$lineNumber-1] = " <PackageReference Include=`"BenchmarkDotNet`" Version=`"`$( BenchmarkDotNetVersion) `" />"
117
+ $benchmarksDroidConfigFileContent[$lineNumber-1] = " <PackageReference Include=`"BenchmarkDotNet`" Version=`"$ BenchmarkDotNetVersion`" />"
104
118
105
119
$projectReferenceLine = $benchmarksDroidConfigFileContent | Select-String -Pattern '<ProjectReference Include="..\\..\\src\\Core.csproj" />'
106
120
$lineNumber = $projectReferenceLine.LineNumber
@@ -131,13 +145,6 @@ steps:
131
145
displayName: Insert Target Replace, BDN config link, and PerfLabExporter
132
146
workingDirectory: $(Build.SourcesDirectory)
133
147
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
-
141
148
# Remove the embed assemblies from source
142
149
- script : |
143
150
../dotnet build ./src/Core/tests/Benchmarks.Droid/Benchmarks.Droid.csproj --configuration Release -bl:BenchmarksDroid.binlog /p:TF_Build=False
0 commit comments