Skip to content

Commit

Permalink
[PERF][MAUI] Add Maui version info to stored data. Runtime Side (dotn…
Browse files Browse the repository at this point in the history
…et#65800)

* Setup pipeline for testing.

* First test with the Maui Version.

* Remove perf-job parameter version typo.

* Try another way of doing the output variable.

* Third times the charm?

* Add a second test for two to be done in one run.

* Fix variable problem with xplat-setup.yml

* Third time was not the charm...

* Try another setup.

* Only include one of the tests as the perf setup is failing potentially due to this.

* Try 2 variable attempts and write out potential get methods.

* Remove failed thing and split them to all be seperate and always run.

* Move variables into the second job stuff.

* Won't run when specified under the job parameters.

* Try hardcoded values to see if it is the output or input that seems to not be connected properly.

* Try new variable format.

* Missed bracket that wasn't found until after most of the way through.

* Maui installs are failing, work around this for variable testing.

* Need to keep mono build enabled.

* Revert "Need to keep mono build enabled."

This reverts commit ff32e46.

* Revert "Maui installs are failing, work around this for variable testing."

This reverts commit 6dbf6b0.

* Temp fix for workload install.

* Removed breaking variable test as the new format works along with changing to only having one variable for testing. This should allow us to have access to the maui version in the perf setup for testing.

* Full run test. Still using perf repo fork.

* Add comment explaining RetrievedMauiVersion.

* Add maui version to the iOS runs.

* Undo testing changes to prepare for merge once install is working again.
  • Loading branch information
LoopedBard3 authored Feb 28, 2022
1 parent a58437f commit c41f452
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
8 changes: 8 additions & 0 deletions eng/pipelines/coreclr/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,17 @@ jobs:
runtimeFlavor: mono
platforms:
- Windows_x64
variables:
- name: mauiVersion
value: $[ dependencies.Build_iOS_arm64_release_MACiOSAndroidMaui.outputs['getMauiVersion.mauiVersion'] ]
jobParameters:
testGroup: perf
runtimeType: AndroidMono
projectFile: android_scenarios.proj
runKind: android_scenarios
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
logicalmachine: 'perfpixel4a'
additionalSetupParameters: "-MauiVersion $env:mauiVersion"

# run mono iOS scenarios and maui iOS scenarios
- template: /eng/pipelines/common/platform-matrix.yml
Expand All @@ -247,6 +251,9 @@ jobs:
runtimeFlavor: mono
platforms:
- Windows_x64
variables:
- name: mauiVersion
value: $[ dependencies.Build_iOS_arm64_release_MACiOSAndroidMaui.outputs['getMauiVersion.mauiVersion'] ]
jobParameters:
testGroup: perf
runtimeType: iOSMono
Expand All @@ -255,6 +262,7 @@ jobs:
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
logicalmachine: 'perfpixel4a'
iosLlvmBuild: False
additionalSetupParameters: "-MauiVersion $env:mauiVersion"

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
10 changes: 10 additions & 0 deletions eng/pipelines/coreclr/templates/build-perf-maui-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@ steps:
displayName: Build MAUI Android
workingDirectory: $(Build.SourcesDirectory)/MauiTesting
# This step pulls the product version from the used Microsoft.Maui.dll file properties and saves it for upload with the maui test counter.
# We pull from this file as we did not find another place to reliably get the version information pre or post build.
- powershell: |
$RetrievedMauiVersion = Get-ChildItem .\obj\Release\net6.0-android\android-arm64\linked\Microsoft.Maui.dll | Select-Object -ExpandProperty VersionInfo | Select-Object ProductVersion | Select-Object -ExpandProperty ProductVersion
$RetrievedMauiVersion
Write-Host "##vso[task.setvariable variable=mauiVersion;isOutput=true]$RetrievedMauiVersion"
name: getMauiVersion
displayName: Get and Save MAUI Version
workingDirectory: $(Build.SourcesDirectory)/MauiTesting
- script: |
chmod -R a+r .
../dotnet build -bl:MauiiOS.binlog -f net6.0-ios -c Release
Expand Down
8 changes: 7 additions & 1 deletion eng/testing/performance/performance-setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Param(
[switch] $NoPGO,
[switch] $DynamicPGO,
[switch] $FullPGO,
[switch] $iOSLlvmBuild
[switch] $iOSLlvmBuild,
[string] $MauiVersion
)

$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance") -or ($Repository -eq "dotnet-performance")
Expand Down Expand Up @@ -143,6 +144,11 @@ if ($UseBaselineCoreRun) {
Move-Item -Path $BaselineCoreRootDirectory -Destination $NewBaselineCoreRoot
}

if($MauiVersion -ne "")
{
$SetupArguments = "$SetupArguments --maui-version $MauiVersion"
}

if ($AndroidMono) {
if(!(Test-Path $WorkItemDirectory))
{
Expand Down

0 comments on commit c41f452

Please sign in to comment.