From 7358e1b4fd2932c6ceb8339c62af64c8677cf936 Mon Sep 17 00:00:00 2001 From: Parker Bibus Date: Tue, 18 Jul 2023 09:51:03 -0700 Subject: [PATCH] Update script to replace the BDN version being used in the PerfBDN app to the same version we use for all BDN tests and in BDN extensions. (#89057) --- eng/pipelines/coreclr/templates/build-perf-bdn-app.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/eng/pipelines/coreclr/templates/build-perf-bdn-app.yml b/eng/pipelines/coreclr/templates/build-perf-bdn-app.yml index b719585..df38f21 100644 --- a/eng/pipelines/coreclr/templates/build-perf-bdn-app.yml +++ b/eng/pipelines/coreclr/templates/build-perf-bdn-app.yml @@ -28,7 +28,7 @@ steps: path: $(Build.SourcesDirectory)/ArtifactPacks patterns: | IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.android-!(*.symbols).nupkg - + # # Other artifacts to include once they are being built # # EX. IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-*.nupkg @@ -56,9 +56,9 @@ steps: destinationFolder: $(Build.SourcesDirectory)/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-arm64 overwriteExistingFiles: true cleanDestinationFolder: false - + - script: | - echo '{ }' > ./global.json + echo '{ }' > ./global.json curl -o NuGet.config 'https://raw.githubusercontent.com/dotnet/maui/${{parameters.framework}}/NuGet.config' curl -o dotnet-install.sh 'https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh' curl -Lo maui-supported-sdk-version.json 'https://aka.ms/dotnet/sdk/maui/${{parameters.framework}}.json' @@ -86,22 +86,26 @@ steps: $perfLabExportLine = $instrumentationFileContent | Select-String -Pattern 'using BenchmarkDotNet.Toolchains.InProcess.Emit;' $lineNumber = $perfLabExportLine.LineNumber $instrumentationFileContent[$lineNumber-1] += "using BenchmarkDotNet.Extensions;" - + $perfLabExportLine = $instrumentationFileContent | Select-String -Pattern 'var config = ManualConfig' $lineNumber = $perfLabExportLine.LineNumber $instrumentationFileContent[$lineNumber-1] += ".AddExporter(new PerfLabExporter()).WithArtifactsPath(`"/storage/emulated/0/Android/data/com.microsoft.maui.benchmarks/files`")" $instrumentationFileContent | Set-Content .\maui\src\Core\tests\Benchmarks.Droid\MainInstrumentation.cs $benchmarksDroidConfigFileContent = Get-Content .\maui\src\Core\tests\Benchmarks.Droid\Benchmarks.Droid.csproj - + $propertyGroupLine = $benchmarksDroidConfigFileContent | Select-String -Pattern '' $lineNumber = $propertyGroupLine.LineNumber $benchmarksDroidConfigFileContent[$lineNumber-1] += "`$(DefineConstants);PERFLAB_INLAB" + $packageReferenceLine = $benchmarksDroidConfigFileContent | Select-String -Pattern '" + $projectReferenceLine = $benchmarksDroidConfigFileContent | Select-String -Pattern '' $lineNumber = $projectReferenceLine.LineNumber $benchmarksDroidConfigFileContent[$lineNumber-1] += "" - + $targetLine = $benchmarksDroidConfigFileContent | Select-String -Pattern '' $lineNumber = $targetLine.LineNumber $benchmarksDroidConfigFileContent[$lineNumber-1] += " @@ -122,7 +126,7 @@ steps: " - + $benchmarksDroidConfigFileContent | Set-Content .\maui\src\Core\tests\Benchmarks.Droid\Benchmarks.Droid.csproj displayName: Insert Target Replace, BDN config link, and PerfLabExporter workingDirectory: $(Build.SourcesDirectory) -- 2.7.4