From a1f0147eb6cefaeff012879dbaf637297736ed3f Mon Sep 17 00:00:00 2001 From: Parker Bibus Date: Fri, 11 Feb 2022 19:21:02 -0600 Subject: [PATCH] Update Maui/Mobile pre.py's and disable android due to AOT Issue (#65231) * Setup testing jobs, change repo to test perf repo, and added apk-name parameter to pre.py for mobile scenarios. * Update dotnet install type to be daily. This matches the link for installing net 6.0 in the maui contributing dev requirements list. * Try lowercase package name. * List post build folder stuff. * Add android output format as apk. * Disable package replacement to see if that is the issue location. * Revert "Disable package replacement to see if that is the issue location." This reverts commit 31cffe7cb296ccd5796fccccac14edbdbc526452. * Always try to publish the binlog files. * Comment out the props file to see if that fixes the AOT error. * Readd props references. * Try building without AOT. * Disable Maui Android Scenarios so that at least iOS on main are being build and measured for SOD. * Forgot to remove the uploading of the Android APP. * Disable download attempt of the MauiAndroidApp. * Reenable full perf run. * Set the setup branch back to main. * Undisable MauiScenario.targets file. It semi-causes the AOT issue but should still be enabled for other working builds. * Add reason for the commented out sections. --- .../templates/build-perf-maui-apps.yml | 49 +++++++++++-------- eng/pipelines/coreclr/templates/perf-job.yml | 15 +++--- .../performance/android_scenarios.proj | 28 ++++++----- eng/testing/performance/performance-setup.ps1 | 5 +- 4 files changed, 54 insertions(+), 43 deletions(-) diff --git a/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml b/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml index 5ca99a4e84411..7e7e8044abaa7 100644 --- a/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml +++ b/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml @@ -112,7 +112,7 @@ steps: - script: | curl -o dotnet-install.sh 'https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh' chmod -R a+rx . - ./dotnet-install.sh --channel 6.0.2xx --quality signed --install-dir . + ./dotnet-install.sh --channel 6.0.2xx --quality daily --install-dir . ./dotnet --info ./dotnet workload install maui --from-rollback-file https://aka.ms/dotnet/maui/main.json --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json displayName: Install MAUI workload @@ -126,12 +126,14 @@ steps: displayName: Setup MAUI Project workingDirectory: $(Build.SourcesDirectory) - - script: | - chmod -R a+r . - ../dotnet publish -bl:MauiAndroid.binlog -f net6.0-android -c Release - mv ./bin/Release/net6.0-android/com.companyname.MauiTesting-Signed.apk ./MauiAndroidDefault.apk - displayName: Build MAUI Android - workingDirectory: $(Build.SourcesDirectory)/MauiTesting + #### Commented out to mitigate https://github.com/dotnet/performance/issues/2254 on main + #- script: | + # chmod -R a+r . + # ../dotnet publish -bl:MauiAndroid.binlog -f net6.0-android -c Release -p:RunAOTCompilation=false -p:AndroidEnableProfiledAot=false + # ls -l -R + # mv ./bin/Release/net6.0-android/com.companyname.mauitesting-Signed.apk ./MauiAndroidDefault.apk + # displayName: Build MAUI Android + # workingDirectory: $(Build.SourcesDirectory)/MauiTesting - script: | chmod -R a+r . @@ -147,33 +149,38 @@ steps: displayName: Build MAUI MacCatalyst workingDirectory: $(Build.SourcesDirectory)/MauiTesting - - task: PublishBuildArtifacts@1 - displayName: 'Publish MauiAndroid binlog' - inputs: - pathtoPublish: $(Build.SourcesDirectory)/MauiTesting/MauiAndroid.binlog - artifactName: ${{ parameters.artifactName }} + #### Commented out to mitigate https://github.com/dotnet/performance/issues/2254 on main + #- task: PublishBuildArtifacts@1 + # displayName: 'Publish MauiAndroid binlog' + # condition: always() + # inputs: + # pathtoPublish: $(Build.SourcesDirectory)/MauiTesting/MauiAndroid.binlog + # artifactName: ${{ parameters.artifactName }} - task: PublishBuildArtifacts@1 displayName: 'Publish MauiiOS binlog' + condition: always() inputs: pathtoPublish: $(Build.SourcesDirectory)/MauiTesting/MauiiOS.binlog artifactName: ${{ parameters.artifactName }} - task: PublishBuildArtifacts@1 displayName: 'Publish MauiMacCatalyst binlog' + condition: always() inputs: pathtoPublish: $(Build.SourcesDirectory)/MauiTesting/MauiMacCatalyst.binlog artifactName: ${{ parameters.artifactName }} - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: $(Build.SourcesDirectory)/MauiTesting/MauiAndroidDefault.apk - includeRootFolder: true - displayName: Maui Android App - artifactName: MauiAndroidApp - archiveExtension: '.tar.gz' - archiveType: tar - tarCompression: gz + #### Commented out to mitigate https://github.com/dotnet/performance/issues/2254 on main + #- template: /eng/pipelines/common/upload-artifact-step.yml + # parameters: + # rootFolder: $(Build.SourcesDirectory)/MauiTesting/MauiAndroidDefault.apk + # includeRootFolder: true + # displayName: Maui Android App + # artifactName: MauiAndroidApp + # archiveExtension: '.tar.gz' + # archiveType: tar + # tarCompression: gz - template: /eng/pipelines/common/upload-artifact-step.yml parameters: diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml index 18912fe315115..12b8b1a89ef27 100644 --- a/eng/pipelines/coreclr/templates/perf-job.yml +++ b/eng/pipelines/coreclr/templates/perf-job.yml @@ -159,13 +159,14 @@ jobs: artifactFileName: 'AndroidMonoarm64.tar.gz' artifactName: 'AndroidMonoarm64' displayName: 'Mono Android HelloWorld' - - template: /eng/pipelines/common/download-artifact-step.yml - parameters: - unpackFolder: $(Build.SourcesDirectory) - cleanUnpackFolder: false - artifactFileName: 'MauiAndroidApp.tar.gz' - artifactName: 'MauiAndroidApp' - displayName: 'Maui Android App' + #### Commented out to mitigate https://github.com/dotnet/performance/issues/2254 on main + #- template: /eng/pipelines/common/download-artifact-step.yml + # parameters: + # unpackFolder: $(Build.SourcesDirectory) + # cleanUnpackFolder: false + # artifactFileName: 'MauiAndroidApp.tar.gz' + # artifactName: 'MauiAndroidApp' + # displayName: 'Maui Android App' # 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 fefff6deeefe0..f616c6a693d8c 100644 --- a/eng/testing/performance/android_scenarios.proj +++ b/eng/testing/performance/android_scenarios.proj @@ -25,39 +25,41 @@ $(WorkItemDirectory) - cd $(ScenarioDirectory)helloandroid;copy %HELIX_CORRELATION_PAYLOAD%\HelloAndroid.apk .;$(Python) pre.py + cd $(ScenarioDirectory)helloandroid;copy %HELIX_CORRELATION_PAYLOAD%\HelloAndroid.apk .;$(Python) pre.py --apk-name HelloAndroid.apk $(Python) test.py sod --scenario-name "%(Identity)" $(Python) post.py $(WorkItemDirectory) - cd $(ScenarioDirectory)helloandroid;copy %HELIX_CORRELATION_PAYLOAD%\HelloAndroid.apk .;$(Python) pre.py --unzip + cd $(ScenarioDirectory)helloandroid;copy %HELIX_CORRELATION_PAYLOAD%\HelloAndroid.apk .;$(Python) pre.py --unzip --apk-name HelloAndroid.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 + echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)helloandroid;copy %HELIX_CORRELATION_PAYLOAD%\HelloAndroid.apk .;$(Python) pre.py --apk-name HelloAndroid.apk $(Python) test.py devicestartup --device-type android --package-path pub\HelloAndroid.apk --package-name net.dot.HelloAndroid --scenario-name "%(Identity)" $(Python) post.py - + + diff --git a/eng/testing/performance/performance-setup.ps1 b/eng/testing/performance/performance-setup.ps1 index 7f1be6761b504..9696ffc9da4c7 100644 --- a/eng/testing/performance/performance-setup.ps1 +++ b/eng/testing/performance/performance-setup.ps1 @@ -149,8 +149,9 @@ if ($AndroidMono) { mkdir $WorkItemDirectory } - Copy-Item -path "$SourceDirectory\androidHelloWorld\HelloAndroid.apk" $PayloadDirectory -Verbose - Copy-Item -path "$SourceDirectory\MauiAndroidDefault.apk" $PayloadDirectory -Verbose + Copy-Item -path "$SourceDirectory\androidHelloWorld\HelloAndroid.apk" $PayloadDirectory -Verbose + #### Commented out to mitigate https://github.com/dotnet/performance/issues/2254 on main + #Copy-Item -path "$SourceDirectory\MauiAndroidDefault.apk" $PayloadDirectory -Verbose $SetupArguments = $SetupArguments -replace $Architecture, 'arm64' }