Skip to content

[PERF] Reenable PerfBDN Android testing #98769

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

Merged
merged 8 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 26 additions & 27 deletions eng/pipelines/coreclr/perf-non-wasm-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -316,30 +316,29 @@ jobs:
parameters:
name: MonoRuntimePacks

# Disabled due to: https://github.com/dotnet/performance/issues/3655
# # build PerfBDN app
# - template: /eng/pipelines/common/platform-matrix.yml
# parameters:
# jobTemplate: /eng/pipelines/common/global-build-job.yml
# buildConfig: release
# runtimeFlavor: mono
# platforms:
# - ios_arm64
# jobParameters:
# dependsOn:
# - Build_android_arm64_release_Mono_Packs
# buildArgs: -s mono -c $(_BuildConfig)
# nameSuffix: PerfBDNApp
# isOfficialBuild: false
# pool:
# vmImage: 'macos-12'
# postBuildSteps:
# - template: /eng/pipelines/coreclr/templates/build-perf-bdn-app.yml
# parameters:
# rootFolder: '$(Build.SourcesDirectory)/artifacts/'
# includeRootFolder: true
# displayName: Android BDN App Artifacts
# artifactName: PerfBDNAppArm
# archiveExtension: '.tar.gz'
# archiveType: tar
# tarCompression: gz
# build PerfBDN app
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- ios_arm64
jobParameters:
dependsOn:
- Build_android_arm64_release_Mono_Packs
buildArgs: -s mono -c $(_BuildConfig)
nameSuffix: PerfBDNApp
isOfficialBuild: false
pool:
vmImage: 'macos-12'
postBuildSteps:
- template: /eng/pipelines/coreclr/templates/build-perf-bdn-app.yml
parameters:
rootFolder: '$(Build.SourcesDirectory)/artifacts/'
includeRootFolder: true
displayName: Android BDN App Artifacts
artifactName: PerfBDNAppArm
archiveExtension: '.tar.gz'
archiveType: tar
tarCompression: gz
10 changes: 5 additions & 5 deletions eng/pipelines/coreclr/templates/build-perf-bdn-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ parameters:
archiveExtension: ''
archiveType: ''
tarCompression: ''
framework: 'net8.0' # Framework version to get versions for and build for
framework: 'net9.0' # Framework version to get versions for and build for
perfRepo: 'main' # Perf repo to pull for the PerfLabExporter


Expand Down Expand Up @@ -61,13 +61,13 @@ steps:
echo '{ }' > ./global.json
curl -o NuGet.config 'https://raw.githubusercontent.com/dotnet/maui/${{parameters.framework}}/NuGet.config'
curl -o dotnet-install.sh 'https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh'
curl -Lo maui-supported-sdk-version.json 'https://aka.ms/dotnet/sdk/maui/${{parameters.framework}}.json'
curl -Lo maui-supported-sdk-version.json 'https://maui.blob.core.windows.net/metadata/sdks/${{parameters.framework}}.json'
version=$(sed -nr 's/\s*"version": "(.*)"/\1/p' ./maui-supported-sdk-version.json)
chmod -R a+rx .
./dotnet-install.sh --version $version --install-dir .
./dotnet --info
./dotnet workload install maui --from-rollback-file https://aka.ms/dotnet/maui/${{parameters.framework}}.json --configfile NuGet.config
./dotnet workload install android --from-rollback-file https://aka.ms/dotnet/maui/${{parameters.framework}}.json --configfile NuGet.config
./dotnet workload install maui --from-rollback-file https://maui.blob.core.windows.net/metadata/rollbacks/${{parameters.framework}}.json --configfile NuGet.config
./dotnet workload install android --from-rollback-file https://maui.blob.core.windows.net/metadata/rollbacks/${{parameters.framework}}.json --configfile NuGet.config
displayName: Install MAUI workload
workingDirectory: $(Build.SourcesDirectory)

Expand Down Expand Up @@ -147,7 +147,7 @@ steps:

# Remove the embed assemblies from source
- script: |
../dotnet build ./src/Core/tests/Benchmarks.Droid/Benchmarks.Droid.csproj --configuration Release -bl:BenchmarksDroid.binlog /p:TF_Build=False
../dotnet build ./src/Core/tests/Benchmarks.Droid/Benchmarks.Droid.csproj --configuration Release -bl:BenchmarksDroid.binlog /p:TF_Build=False /p:ForceNet8Current=true
mv ./src/Core/tests/Benchmarks.Droid/bin/Release/${{parameters.framework}}-android/android-arm64/com.microsoft.maui.benchmarks-Signed.apk ./MonoBenchmarksDroid.apk
displayName: Build BDN Android App
workingDirectory: $(Build.SourcesDirectory)/maui
Expand Down
17 changes: 8 additions & 9 deletions eng/pipelines/coreclr/templates/perf-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
- ${{ format('build_{0}{1}_{2}_{3}_{4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.codeGenType) }}
- ${{ if eq(parameters.runtimeType, 'AndroidMono')}}:
- ${{ 'build_android_arm64_release_AndroidMono' }}
# - ${{ 'Build_ios_arm64_release_PerfBDNApp' }} Disabled per: https://github.com/dotnet/performance/issues/3655
- ${{ 'Build_ios_arm64_release_PerfBDNApp' }}
- ${{ if eq(parameters.runtimeType, 'iOSMono')}}:
- ${{ 'build_ios_arm64_release_iOSMono' }}
- ${{ if eq(parameters.runtimeType, 'iOSNativeAOT')}}:
Expand Down Expand Up @@ -228,14 +228,13 @@ jobs:
artifactFileName: 'AndroidMonoarm64.tar.gz'
artifactName: 'AndroidMonoarm64'
displayName: 'Mono Android HelloWorld'
# Disabled per: https://github.com/dotnet/performance/issues/3655
# - template: /eng/pipelines/common/download-artifact-step.yml
# parameters:
# unpackFolder: $(Build.SourcesDirectory)
# cleanUnpackFolder: false
# artifactFileName: 'AndroidBDNApk.tar.gz'
# artifactName: 'AndroidBDNApk'
# displayName: 'Mono Android BDN Apk'
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(Build.SourcesDirectory)
cleanUnpackFolder: false
artifactFileName: 'AndroidBDNApk.tar.gz'
artifactName: 'AndroidBDNApk'
displayName: 'Mono Android BDN Apk'

# Download iOSMono and Native AOT tests
- ${{ if or(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.runtimeType, 'iOSNativeAOT')) }}:
Expand Down
20 changes: 10 additions & 10 deletions eng/testing/performance/android_scenarios.proj
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,24 @@
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
<!-- <HelixWorkItem Include="SOD - Android Benchmarks.Droid APK Size">
<HelixWorkItem Include="SOD - Android Benchmarks.Droid APK Size">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>cd $(ScenarioDirectory)bdnandroid;copy %HELIX_CORRELATION_PAYLOAD%\MonoBenchmarksDroid.apk .;$(Python) pre.py -1-apk-name MonoBenchmarksDroid.apk</PreCommands>
<Command>$(Python) test.py sod -1-scenario-name &quot;%(Identity)&quot;</Command>
<PreCommands>cd $(ScenarioDirectory)bdnandroid;copy %HELIX_CORRELATION_PAYLOAD%\MonoBenchmarksDroid.apk .;$(Python) pre.py --apk-name MonoBenchmarksDroid.apk</PreCommands>
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
<HelixWorkItem Include="SOD - Android Benchmarks.Droid Extracted Size">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>cd $(ScenarioDirectory)bdnandroid;copy %HELIX_CORRELATION_PAYLOAD%\MonoBenchmarksDroid.apk .;$(Python) pre.py -1-unzip -1-apk-name MonoBenchmarksDroid.apk</PreCommands>
<Command>$(Python) test.py sod -1-scenario-name &quot;%(Identity)&quot;</Command>
<PreCommands>cd $(ScenarioDirectory)bdnandroid;copy %HELIX_CORRELATION_PAYLOAD%\MonoBenchmarksDroid.apk .;$(Python) pre.py --unzip --apk-name MonoBenchmarksDroid.apk</PreCommands>
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem> -->
<!-- <HelixWorkItem Include="Mobile Benchmark - Android Benchmarks.Droid Benchmark Run"> Disabled per https://github.com/dotnet/performance/issues/3655
</HelixWorkItem>
<HelixWorkItem Include="Mobile Benchmark - Android Benchmarks.Droid Benchmark Run">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)bdnandroid;copy %HELIX_CORRELATION_PAYLOAD%\MonoBenchmarksDroid.apk .;$(Python) pre.py -1-apk-name MonoBenchmarksDroid.apk</PreCommands>
<Command>$(Python) test.py androidinstrumentation -1-package-path .\pub\MonoBenchmarksDroid.apk -1-package-name com.microsoft.maui.benchmarks -1-instrumentation-name com.microsoft.maui.MainInstrumentation -1-scenario-name &quot;%(Identity)&quot;</Command>
<PreCommands>echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)bdnandroid;copy %HELIX_CORRELATION_PAYLOAD%\MonoBenchmarksDroid.apk .;$(Python) pre.py --restart-device --apk-name MonoBenchmarksDroid.apk</PreCommands>
<Command>$(Python) test.py androidinstrumentation --package-path .\pub\MonoBenchmarksDroid.apk --package-name com.microsoft.maui.benchmarks --instrumentation-name com.microsoft.maui.MainInstrumentation --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
<Timeout>00:30:00</Timeout>
</HelixWorkItem> -->
</HelixWorkItem>
</ItemGroup>
</Project>