Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAUI][Blazor][PERF] Add Android/iOS/MacCatalyst Maui Blazor Perf Collection #68241

Closed
wants to merge 11 commits into from
Closed
42 changes: 41 additions & 1 deletion eng/pipelines/coreclr/templates/build-perf-maui-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,38 @@ steps:
displayName: Build MAUI MacCatalyst
workingDirectory: $(Build.SourcesDirectory)/MauiTesting

- script: |
./dotnet new maui-blazor -n MauiBlazorTesting
cd MauiBlazorTesting
# cp $(Build.SourcesDirectory)/src/tests/Common/maui/MauiScenario.props ./Directory.Build.props
# cp $(Build.SourcesDirectory)/src/tests/Common/maui/MauiScenario.targets ./Directory.Build.targets
cp $(Build.SourcesDirectory)/NuGet.config ./NuGet.config
TanayParikh marked this conversation as resolved.
Show resolved Hide resolved
displayName: Setup MAUI Blazor Hybrid Project
workingDirectory: $(Build.SourcesDirectory)

- script: |
chmod -R a+r .
# Restore is split out because of https://github.com/dotnet/sdk/issues/21877, can be removed with --no-restore once fixed
../dotnet restore
../dotnet publish -bl:MauiBlazorAndroid.binlog -f net6.0-android -c Release -r android-arm64 --no-restore --self-contained
mv ./bin/Release/net6.0-android/android-arm64/com.companyname.mauiblazortesting-Signed.apk ./MauiBlazorAndroidDefault.apk
displayName: Build MAUI Blazor Android
workingDirectory: $(Build.SourcesDirectory)/MauiBlazorTesting

- task: PublishBuildArtifacts@1
displayName: 'Publish MauiAndroid binlog'
condition: always()
inputs:
pathtoPublish: $(Build.SourcesDirectory)/MauiTesting/MauiAndroid.binlog
artifactName: ${{ parameters.artifactName }}

- task: PublishBuildArtifacts@1
displayName: 'Publish MauiBlazorAndroid binlog'
condition: always()
inputs:
pathtoPublish: $(Build.SourcesDirectory)/MauiBlazorTesting/MauiBlazorAndroid.binlog
artifactName: ${{ parameters.artifactName }}

- task: PublishBuildArtifacts@1
displayName: 'Publish MauiiOS binlog'
condition: always()
Expand Down Expand Up @@ -244,6 +269,16 @@ steps:
archiveType: tar
tarCompression: gz

- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/MauiBlazorTesting/MauiBlazorAndroidDefault.apk
includeRootFolder: true
displayName: Maui Blazor Android App
artifactName: MauiBlazorAndroidApp
archiveExtension: '.tar.gz'
archiveType: tar
tarCompression: gz

- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/MauiTesting/MauiAndroidPodcast.apk
Expand Down Expand Up @@ -286,7 +321,12 @@ steps:

- script: rm -r -f ./bin
workingDirectory: $(Build.SourcesDirectory)/MauiTesting
displayName: Clean bin directory
displayName: Clean MauiTesting bin directory
condition: succeededOrFailed()

- script: rm -r -f ./bin
workingDirectory: $(Build.SourcesDirectory)/MauiBlazorTesting
displayName: Clean MauiBlazorTesting bin directory
condition: succeededOrFailed()

- template: /eng/pipelines/common/upload-artifact-step.yml
Expand Down
7 changes: 7 additions & 0 deletions eng/pipelines/coreclr/templates/perf-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,13 @@ jobs:
artifactFileName: 'MauiAndroidPodcast.tar.gz'
artifactName: 'MauiAndroidPodcast'
displayName: 'Maui Android Podcast'
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(Build.SourcesDirectory)
cleanUnpackFolder: false
artifactFileName: 'MauiBlazorAndroidApp.tar.gz'
artifactName: 'MauiBlazorAndroidApp'
displayName: 'Maui Blazor Android App'


# Download iOSMono tests and MauiiOS/MacCatalyst
Expand Down
24 changes: 24 additions & 0 deletions eng/testing/performance/android_scenarios.proj
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
<HelixWorkItem Include="SOD - Maui Blazor Android APK Size">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiBlazorAndroidDefault.apk .; $(Python) pre.py --apk-name MauiBlazorAndroidDefault.apk</PreCommands>
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
<HelixWorkItem Include="SOD - Maui Android Podcast APK Size">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidPodcast.apk .; $(Python) pre.py --apk-name MauiAndroidPodcast.apk</PreCommands>
Expand All @@ -53,6 +59,12 @@
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
<HelixWorkItem Include="SOD - Maui Blazor Android Extracted Size">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiBlazorAndroidDefault.apk .; $(Python) pre.py --unzip --apk-name MauiBlazorAndroidDefault.apk</PreCommands>
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
<HelixWorkItem Include="SOD - Maui Android Podcast Extracted Size">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidPodcast.apk .; $(Python) pre.py --unzip --apk-name MauiAndroidPodcast.apk</PreCommands>
Expand All @@ -77,6 +89,12 @@
<Command>$(Python) test.py devicestartup --device-type android --package-path pub\MauiAndroidDefault.apk --package-name com.companyname.mauitesting --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
<HelixWorkItem Include="Device Startup - Android Maui Blazor DefaultTesting">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiBlazorAndroidDefault.apk .;$(Python) pre.py --apk-name MauiBlazorAndroidDefault.apk</PreCommands>
<Command>$(Python) test.py devicestartup --device-type android --package-path pub\MauiBlazorAndroidDefault.apk --package-name com.companyname.mauiblazortesting --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
TanayParikh marked this conversation as resolved.
Show resolved Hide resolved
<HelixWorkItem Include="Device Startup - Android Maui Podcast">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidPodcast.apk .;$(Python) pre.py --apk-name MauiAndroidPodcast.apk</PreCommands>
Expand All @@ -89,6 +107,12 @@
<Command>$(Python) test.py devicestartup --device-type android --package-path pub\MauiAndroidDefault.apk --package-name com.companyname.mauitesting --scenario-name &quot;%(Identity)&quot; --disable-animations</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
<HelixWorkItem Include="Device Startup - Android Maui Blazor DefaultTesting NoAnimation">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiBlazorAndroidDefault.apk .;$(Python) pre.py --apk-name MauiBlazorAndroidDefault.apk</PreCommands>
<Command>$(Python) test.py devicestartup --device-type android --package-path pub\MauiBlazorAndroidDefault.apk --package-name com.companyname.mauiblazortesting --scenario-name &quot;%(Identity)&quot; --disable-animations</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
<HelixWorkItem Include="Device Startup - Android Maui Podcast NoAnimation">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidPodcast.apk .;$(Python) pre.py --apk-name MauiAndroidPodcast.apk</PreCommands>
Expand Down
3 changes: 2 additions & 1 deletion eng/testing/performance/performance-setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ if ($AndroidMono) {
mkdir $WorkItemDirectory
}

Copy-Item -path "$SourceDirectory\androidHelloWorld\HelloAndroid.apk" $PayloadDirectory -Verbose
Copy-Item -path "$SourceDirectory\androidHelloWorld\HelloAndroid.apk" $PayloadDirectory -Verbose
Copy-Item -path "$SourceDirectory\MauiAndroidDefault.apk" $PayloadDirectory -Verbose
Copy-Item -path "$SourceDirectory\MauiBlazorAndroidDefault.apk" $PayloadDirectory -Verbose
Copy-Item -path "$SourceDirectory\MauiAndroidPodcast.apk" $PayloadDirectory -Verbose
$SetupArguments = $SetupArguments -replace $Architecture, 'arm64'
}
Expand Down