diff --git a/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml b/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml index bc747bda77356f..96cf36eafcaab7 100644 --- a/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml +++ b/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml @@ -142,6 +142,27 @@ steps: displayName: Build MAUI Android workingDirectory: $(Build.SourcesDirectory)/MauiTesting + - script: | + set -x + pwd + git clone https://github.com/naricc/dotnet-podcasts.git + cd dotnet-podcasts + cp $(Build.SourcesDirectory)/src/tests/Common/maui/MauiScenario.props ./Directory.Build.props + cp $(Build.SourcesDirectory)/src/tests/Common/maui/MauiScenario.targets ./Directory.Build.targets + displayName: Clone podcast app + workingDirectory: $(Build.SourcesDirectory) + + - script: | + set -x + 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 + 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 + 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: | @@ -154,7 +175,6 @@ steps: - script: | chmod -R a+r . - # remove net6.0-maccatalyst to work around https://github.com/dotnet/sdk/issues/21877 cp MauiTesting.csproj MauiTesting.csproj.bak sed -i'' -e 's/net6.0-ios;net6.0-maccatalyst/net6.0-ios/g' MauiTesting.csproj @@ -204,6 +224,17 @@ steps: archiveType: tar tarCompression: gz + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: $(Build.SourcesDirectory)/MauiTesting/MauiAndroidPodcast.apk + includeRootFolder: true + displayName: Maui Android Podcast + artifactName: MauiAndroidPodcast + archiveExtension: '.tar.gz' + archiveType: tar + tarCompression: gz + + - template: /eng/pipelines/common/upload-artifact-step.yml parameters: rootFolder: $(Build.SourcesDirectory)/MauiTesting/MauiiOSDefault.ipa diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml index e95b5f03ec21bc..16c862be161ef5 100644 --- a/eng/pipelines/coreclr/templates/perf-job.yml +++ b/eng/pipelines/coreclr/templates/perf-job.yml @@ -166,6 +166,14 @@ jobs: artifactFileName: 'MauiAndroidApp.tar.gz' artifactName: 'MauiAndroidApp' displayName: 'Maui Android App' + - template: /eng/pipelines/common/download-artifact-step.yml + parameters: + unpackFolder: $(Build.SourcesDirectory) + cleanUnpackFolder: false + artifactFileName: 'MauiAndroidPodcast.tar.gz' + artifactName: 'MauiAndroidPodcast' + displayName: 'Maui Android Podcast' + # Download iOSMono tests and MauiiOS/MacCatalyst - ${{ if eq(parameters.runtimeType, 'iOSMono') }}: diff --git a/eng/testing/performance/android_scenarios.proj b/eng/testing/performance/android_scenarios.proj index 7b6cf345114575..2b19dd4c170fe0 100644 --- a/eng/testing/performance/android_scenarios.proj +++ b/eng/testing/performance/android_scenarios.proj @@ -41,12 +41,24 @@ $(Python) test.py sod --scenario-name "%(Identity)" $(Python) post.py + + $(WorkItemDirectory) + cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidPodcast.apk .; $(Python) pre.py --apk-name MauiAndroidPodcast.apk + $(Python) test.py sod --scenario-name "%(Identity)" + $(Python) post.py + $(WorkItemDirectory) cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidDefault.apk .; $(Python) pre.py --unzip --apk-name MauiAndroidDefault.apk $(Python) test.py sod --scenario-name "%(Identity)" $(Python) post.py + + $(WorkItemDirectory) + cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidPodcast.apk .; $(Python) pre.py --unzip --apk-name MauiAndroidPodcast.apk + $(Python) test.py sod --scenario-name "%(Identity)" + $(Python) post.py + $(WorkItemDirectory) echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)helloandroid;copy %HELIX_CORRELATION_PAYLOAD%\HelloAndroid.apk .;$(Python) pre.py --apk-name HelloAndroid.apk @@ -65,11 +77,22 @@ $(Python) test.py devicestartup --device-type android --package-path pub\MauiAndroidDefault.apk --package-name com.companyname.mauitesting --scenario-name "%(Identity)" $(Python) post.py + + $(WorkItemDirectory) + echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidPodcast.apk .;$(Python) pre.py --apk-name MauiAndroidPodcast.apk + $(Python) test.py devicestartup --device-type android --package-path pub\MauiAndroidPodcast.apk --package-name com.Microsoft.NetConf2021.Maui --scenario-name "%(Identity)" + $(Python) post.py + $(WorkItemDirectory) echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidDefault.apk .;$(Python) pre.py --apk-name MauiAndroidDefault.apk $(Python) test.py devicestartup --device-type android --package-path pub\MauiAndroidDefault.apk --package-name com.companyname.mauitesting --scenario-name "%(Identity)" --disable-animations $(Python) post.py + + $(WorkItemDirectory) + echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidPodcast.apk .;$(Python) pre.py --apk-name MauiAndroidPodcast.apk + $(Python) test.py devicestartup --device-type android --package-path pub\MauiAndroidPodcast.apk --package-name com.Microsoft.NetConf2021.Maui --scenario-name "%(Identity)" --disable-animations + $(Python) post.py diff --git a/eng/testing/performance/performance-setup.ps1 b/eng/testing/performance/performance-setup.ps1 index 3eca57f9cdd1eb..cf9df4dee77f7d 100644 --- a/eng/testing/performance/performance-setup.ps1 +++ b/eng/testing/performance/performance-setup.ps1 @@ -157,6 +157,7 @@ if ($AndroidMono) { Copy-Item -path "$SourceDirectory\androidHelloWorld\HelloAndroid.apk" $PayloadDirectory -Verbose Copy-Item -path "$SourceDirectory\MauiAndroidDefault.apk" $PayloadDirectory -Verbose + Copy-Item -path "$SourceDirectory\MauiAndroidPodcast.apk" $PayloadDirectory -Verbose $SetupArguments = $SetupArguments -replace $Architecture, 'arm64' }