From 39b3aace26cc8f27e8d1ea1af0b9d234f7b6d867 Mon Sep 17 00:00:00 2001 From: Parker Bibus Date: Mon, 28 Mar 2022 17:21:55 -0500 Subject: [PATCH] [MAUI][PERF] Maui Perf add iOS Podcast SOD Tests (#67165) * Publish the maui iOS Podcast app in the build yml * Pipe the built Podcast IPA file through and test it. --- .../coreclr/templates/build-perf-maui-apps.yml | 37 +++++++++++++++++++--- eng/pipelines/coreclr/templates/perf-job.yml | 7 ++++ eng/testing/performance/ios_scenarios.proj | 12 +++++++ eng/testing/performance/performance-setup.ps1 | 1 + 4 files changed, 53 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml b/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml index c1c2034..4c77815 100644 --- a/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml +++ b/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml @@ -157,12 +157,11 @@ steps: pwd chmod -R a+r . ../../../dotnet restore Microsoft.NetConf2021.Maui.csproj - ../../../dotnet publish Microsoft.NetConf2021.Maui.csproj -bl:MauiAndroid.binlog -r android-arm64 --self-contained --no-restore -f net6.0-android -c Release + ../../../dotnet publish Microsoft.NetConf2021.Maui.csproj -bl:MauiPodcastAndroid.binlog -r android-arm64 --self-contained --no-restore -f net6.0-android -c Release mv ./bin/Release/net6.0-android/android-arm64/com.Microsoft.NetConf2021.Maui-Signed.apk $(Build.SourcesDirectory)/MauiTesting/MauiAndroidPodcast.apk - displayName: Build podcast app for MAUI + displayName: Build MAUI Podcast Android workingDirectory: $(Build.SourcesDirectory)/dotnet-podcasts/src/Mobile - # 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: | @@ -188,6 +187,20 @@ steps: - script: | chmod -R a+r . + # remove net6.0-maccatalyst to work around https://github.com/dotnet/sdk/issues/21877 + cp Microsoft.NetConf2021.Maui.csproj Microsoft.NetConf2021.Maui.csproj.bak + sed -i'' -e 's/net6.0-ios;net6.0-maccatalyst/net6.0-ios/g' Microsoft.NetConf2021.Maui.csproj + + ../../../dotnet build ../Web/Components/Podcast.Components.Maui.csproj + ../../../dotnet publish Microsoft.NetConf2021.Maui.csproj -bl:MauiiOSPodcast.binlog -f net6.0-ios --self-contained -r ios-arm64 -c Release /p:_RequireCodeSigning=false + mv ./bin/Release/net6.0-ios/ios-arm64/publish/Microsoft.NetConf2021.Maui.ipa ./MauiiOSPodcast.ipa + + cp Microsoft.NetConf2021.Maui.csproj.bak Microsoft.NetConf2021.Maui.csproj + displayName: Build MAUI Podcast iOS + workingDirectory: $(Build.SourcesDirectory)/dotnet-podcasts/src/Mobile + + - script: | + chmod -R a+r . ../dotnet publish -bl:MauiMacCatalyst.binlog -f net6.0-maccatalyst -c Release mv ./bin/Release/net6.0-maccatalyst/maccatalyst-x64/MauiTesting.app ./MauiMacCatalystDefault.app displayName: Build MAUI MacCatalyst @@ -214,6 +227,13 @@ steps: pathtoPublish: $(Build.SourcesDirectory)/MauiTesting/MauiMacCatalyst.binlog artifactName: ${{ parameters.artifactName }} + - task: PublishBuildArtifacts@1 + displayName: 'Publish MauiiOSPodcast binlog' + condition: always() + inputs: + pathtoPublish: $(Build.SourcesDirectory)/dotnet-podcasts/src/Mobile/MauiiOSPodcast.binlog + artifactName: ${{ parameters.artifactName }} + - template: /eng/pipelines/common/upload-artifact-step.yml parameters: rootFolder: $(Build.SourcesDirectory)/MauiTesting/MauiAndroidDefault.apk @@ -234,7 +254,6 @@ steps: archiveType: tar tarCompression: gz - - template: /eng/pipelines/common/upload-artifact-step.yml parameters: rootFolder: $(Build.SourcesDirectory)/MauiTesting/MauiiOSDefault.ipa @@ -247,6 +266,16 @@ steps: - template: /eng/pipelines/common/upload-artifact-step.yml parameters: + rootFolder: $(Build.SourcesDirectory)/dotnet-podcasts/src/Mobile/MauiiOSPodcast.ipa + includeRootFolder: true + displayName: Maui iOS Podcast IPA + artifactName: MauiiOSPodcastIPA + archiveExtension: '.tar.gz' + archiveType: tar + tarCompression: gz + + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: rootFolder: $(Build.SourcesDirectory)/MauiTesting/MauiMacCatalystDefault.app includeRootFolder: true displayName: Maui MacCatalyst App diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml index e6e23c2..a32d0aa 100644 --- a/eng/pipelines/coreclr/templates/perf-job.yml +++ b/eng/pipelines/coreclr/templates/perf-job.yml @@ -216,6 +216,13 @@ jobs: artifactFileName: 'MauiMacCatalystDefault.tar.gz' artifactName: 'MauiMacCatalystDefault' displayName: 'Maui MacCatalyst App' + - template: /eng/pipelines/common/download-artifact-step.yml + parameters: + unpackFolder: $(Build.SourcesDirectory)/MauiiOSPodcastIPA + cleanUnpackFolder: false + artifactFileName: 'MauiiOSPodcastIPA.tar.gz' + artifactName: 'MauiiOSPodcastIPA' + displayName: 'Maui iOS Podcast IPA' # Create Core_Root - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(buildConfig) $(archType) generatelayoutonly $(librariesOverrideArg) diff --git a/eng/testing/performance/ios_scenarios.proj b/eng/testing/performance/ios_scenarios.proj index 6af44c3..b22caf0 100644 --- a/eng/testing/performance/ios_scenarios.proj +++ b/eng/testing/performance/ios_scenarios.proj @@ -48,5 +48,17 @@ $(Python) test.py sod --scenario-name "%(Identity)" $(Python) post.py + + $(WorkItemDirectory) + cd $(ScenarioDirectory)mauiios;copy %HELIX_CORRELATION_PAYLOAD%\MauiiOSPodcastIPA\MauiiOSPodcast.ipa .;$(Python) pre.py --name MauiiOSPodcast.ipa + $(Python) test.py sod --scenario-name "%(Identity)" + $(Python) post.py + + + $(WorkItemDirectory) + cd $(ScenarioDirectory)mauiios;copy %HELIX_CORRELATION_PAYLOAD%\MauiiOSPodcastIPA\MauiiOSPodcast.ipa .;$(Python) pre.py --unzip --name MauiiOSPodcast.ipa + $(Python) test.py sod --scenario-name "%(Identity)" + $(Python) post.py + diff --git a/eng/testing/performance/performance-setup.ps1 b/eng/testing/performance/performance-setup.ps1 index cf9df4d..96ab8f6 100644 --- a/eng/testing/performance/performance-setup.ps1 +++ b/eng/testing/performance/performance-setup.ps1 @@ -172,6 +172,7 @@ if ($iOSMono) { Copy-Item -path "$SourceDirectory\iosHelloWorld\nollvm" $PayloadDirectory\iosHelloWorld\nollvm -Recurse Copy-Item -path "$SourceDirectory\MauiiOSDefaultIPA" $PayloadDirectory\MauiiOSDefaultIPA -Recurse Copy-Item -path "$SourceDirectory\MauiMacCatalystDefault\MauiMacCatalystDefault.app" $PayloadDirectory\MauiMacCatalystDefault -Recurse + Copy-Item -path "$SourceDirectory\MauiiOSPodcastIPA" $PayloadDirectory\MauiiOSPodcastIPA -Recurse } $SetupArguments = $SetupArguments -replace $Architecture, 'arm64' -- 2.7.4