Skip to content

Commit 71344ce

Browse files
authored
[PERF] Reenable PerfBDN Android testing (#98769)
* Update PerfBDN app target framework and install links to more direct links. * Revert "Temporarily disable PerfBDN app testing": This reverts commit 7e039e6. * Force net8 current and device reboot before run
1 parent 8819b22 commit 71344ce

File tree

4 files changed

+49
-51
lines changed

4 files changed

+49
-51
lines changed

eng/pipelines/coreclr/perf-non-wasm-jobs.yml

+26-27
Original file line numberDiff line numberDiff line change
@@ -316,30 +316,29 @@ jobs:
316316
parameters:
317317
name: MonoRuntimePacks
318318

319-
# Disabled due to: https://github.com/dotnet/performance/issues/3655
320-
# # build PerfBDN app
321-
# - template: /eng/pipelines/common/platform-matrix.yml
322-
# parameters:
323-
# jobTemplate: /eng/pipelines/common/global-build-job.yml
324-
# buildConfig: release
325-
# runtimeFlavor: mono
326-
# platforms:
327-
# - ios_arm64
328-
# jobParameters:
329-
# dependsOn:
330-
# - Build_android_arm64_release_Mono_Packs
331-
# buildArgs: -s mono -c $(_BuildConfig)
332-
# nameSuffix: PerfBDNApp
333-
# isOfficialBuild: false
334-
# pool:
335-
# vmImage: 'macos-12'
336-
# postBuildSteps:
337-
# - template: /eng/pipelines/coreclr/templates/build-perf-bdn-app.yml
338-
# parameters:
339-
# rootFolder: '$(Build.SourcesDirectory)/artifacts/'
340-
# includeRootFolder: true
341-
# displayName: Android BDN App Artifacts
342-
# artifactName: PerfBDNAppArm
343-
# archiveExtension: '.tar.gz'
344-
# archiveType: tar
345-
# tarCompression: gz
319+
# build PerfBDN app
320+
- template: /eng/pipelines/common/platform-matrix.yml
321+
parameters:
322+
jobTemplate: /eng/pipelines/common/global-build-job.yml
323+
buildConfig: release
324+
runtimeFlavor: mono
325+
platforms:
326+
- ios_arm64
327+
jobParameters:
328+
dependsOn:
329+
- Build_android_arm64_release_Mono_Packs
330+
buildArgs: -s mono -c $(_BuildConfig)
331+
nameSuffix: PerfBDNApp
332+
isOfficialBuild: false
333+
pool:
334+
vmImage: 'macos-12'
335+
postBuildSteps:
336+
- template: /eng/pipelines/coreclr/templates/build-perf-bdn-app.yml
337+
parameters:
338+
rootFolder: '$(Build.SourcesDirectory)/artifacts/'
339+
includeRootFolder: true
340+
displayName: Android BDN App Artifacts
341+
artifactName: PerfBDNAppArm
342+
archiveExtension: '.tar.gz'
343+
archiveType: tar
344+
tarCompression: gz

eng/pipelines/coreclr/templates/build-perf-bdn-app.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ parameters:
1616
archiveExtension: ''
1717
archiveType: ''
1818
tarCompression: ''
19-
framework: 'net8.0' # Framework version to get versions for and build for
19+
framework: 'net9.0' # Framework version to get versions for and build for
2020
perfRepo: 'main' # Perf repo to pull for the PerfLabExporter
2121

2222

@@ -61,13 +61,13 @@ steps:
6161
echo '{ }' > ./global.json
6262
curl -o NuGet.config 'https://raw.githubusercontent.com/dotnet/maui/${{parameters.framework}}/NuGet.config'
6363
curl -o dotnet-install.sh 'https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh'
64-
curl -Lo maui-supported-sdk-version.json 'https://aka.ms/dotnet/sdk/maui/${{parameters.framework}}.json'
64+
curl -Lo maui-supported-sdk-version.json 'https://maui.blob.core.windows.net/metadata/sdks/${{parameters.framework}}.json'
6565
version=$(sed -nr 's/\s*"version": "(.*)"/\1/p' ./maui-supported-sdk-version.json)
6666
chmod -R a+rx .
6767
./dotnet-install.sh --version $version --install-dir .
6868
./dotnet --info
69-
./dotnet workload install maui --from-rollback-file https://aka.ms/dotnet/maui/${{parameters.framework}}.json --configfile NuGet.config
70-
./dotnet workload install android --from-rollback-file https://aka.ms/dotnet/maui/${{parameters.framework}}.json --configfile NuGet.config
69+
./dotnet workload install maui --from-rollback-file https://maui.blob.core.windows.net/metadata/rollbacks/${{parameters.framework}}.json --configfile NuGet.config
70+
./dotnet workload install android --from-rollback-file https://maui.blob.core.windows.net/metadata/rollbacks/${{parameters.framework}}.json --configfile NuGet.config
7171
displayName: Install MAUI workload
7272
workingDirectory: $(Build.SourcesDirectory)
7373
@@ -147,7 +147,7 @@ steps:
147147
148148
# Remove the embed assemblies from source
149149
- script: |
150-
../dotnet build ./src/Core/tests/Benchmarks.Droid/Benchmarks.Droid.csproj --configuration Release -bl:BenchmarksDroid.binlog /p:TF_Build=False
150+
../dotnet build ./src/Core/tests/Benchmarks.Droid/Benchmarks.Droid.csproj --configuration Release -bl:BenchmarksDroid.binlog /p:TF_Build=False /p:ForceNet8Current=true
151151
mv ./src/Core/tests/Benchmarks.Droid/bin/Release/${{parameters.framework}}-android/android-arm64/com.microsoft.maui.benchmarks-Signed.apk ./MonoBenchmarksDroid.apk
152152
displayName: Build BDN Android App
153153
workingDirectory: $(Build.SourcesDirectory)/maui

eng/pipelines/coreclr/templates/perf-job.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
- ${{ format('build_{0}{1}_{2}_{3}_{4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.codeGenType) }}
9191
- ${{ if eq(parameters.runtimeType, 'AndroidMono')}}:
9292
- ${{ 'build_android_arm64_release_AndroidMono' }}
93-
# - ${{ 'Build_ios_arm64_release_PerfBDNApp' }} Disabled per: https://github.com/dotnet/performance/issues/3655
93+
- ${{ 'Build_ios_arm64_release_PerfBDNApp' }}
9494
- ${{ if eq(parameters.runtimeType, 'iOSMono')}}:
9595
- ${{ 'build_ios_arm64_release_iOSMono' }}
9696
- ${{ if eq(parameters.runtimeType, 'iOSNativeAOT')}}:
@@ -228,14 +228,13 @@ jobs:
228228
artifactFileName: 'AndroidMonoarm64.tar.gz'
229229
artifactName: 'AndroidMonoarm64'
230230
displayName: 'Mono Android HelloWorld'
231-
# Disabled per: https://github.com/dotnet/performance/issues/3655
232-
# - template: /eng/pipelines/common/download-artifact-step.yml
233-
# parameters:
234-
# unpackFolder: $(Build.SourcesDirectory)
235-
# cleanUnpackFolder: false
236-
# artifactFileName: 'AndroidBDNApk.tar.gz'
237-
# artifactName: 'AndroidBDNApk'
238-
# displayName: 'Mono Android BDN Apk'
231+
- template: /eng/pipelines/common/download-artifact-step.yml
232+
parameters:
233+
unpackFolder: $(Build.SourcesDirectory)
234+
cleanUnpackFolder: false
235+
artifactFileName: 'AndroidBDNApk.tar.gz'
236+
artifactName: 'AndroidBDNApk'
237+
displayName: 'Mono Android BDN Apk'
239238

240239
# Download iOSMono and Native AOT tests
241240
- ${{ if or(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.runtimeType, 'iOSNativeAOT')) }}:

eng/testing/performance/android_scenarios.proj

+10-10
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,24 @@
3535
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
3636
<PostCommands>$(Python) post.py</PostCommands>
3737
</HelixWorkItem>
38-
<!-- <HelixWorkItem Include="SOD - Android Benchmarks.Droid APK Size">
38+
<HelixWorkItem Include="SOD - Android Benchmarks.Droid APK Size">
3939
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
40-
<PreCommands>cd $(ScenarioDirectory)bdnandroid;copy %HELIX_CORRELATION_PAYLOAD%\MonoBenchmarksDroid.apk .;$(Python) pre.py -1-apk-name MonoBenchmarksDroid.apk</PreCommands>
41-
<Command>$(Python) test.py sod -1-scenario-name &quot;%(Identity)&quot;</Command>
40+
<PreCommands>cd $(ScenarioDirectory)bdnandroid;copy %HELIX_CORRELATION_PAYLOAD%\MonoBenchmarksDroid.apk .;$(Python) pre.py --apk-name MonoBenchmarksDroid.apk</PreCommands>
41+
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
4242
<PostCommands>$(Python) post.py</PostCommands>
4343
</HelixWorkItem>
4444
<HelixWorkItem Include="SOD - Android Benchmarks.Droid Extracted Size">
4545
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
46-
<PreCommands>cd $(ScenarioDirectory)bdnandroid;copy %HELIX_CORRELATION_PAYLOAD%\MonoBenchmarksDroid.apk .;$(Python) pre.py -1-unzip -1-apk-name MonoBenchmarksDroid.apk</PreCommands>
47-
<Command>$(Python) test.py sod -1-scenario-name &quot;%(Identity)&quot;</Command>
46+
<PreCommands>cd $(ScenarioDirectory)bdnandroid;copy %HELIX_CORRELATION_PAYLOAD%\MonoBenchmarksDroid.apk .;$(Python) pre.py --unzip --apk-name MonoBenchmarksDroid.apk</PreCommands>
47+
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
4848
<PostCommands>$(Python) post.py</PostCommands>
49-
</HelixWorkItem> -->
50-
<!-- <HelixWorkItem Include="Mobile Benchmark - Android Benchmarks.Droid Benchmark Run"> Disabled per https://github.com/dotnet/performance/issues/3655
49+
</HelixWorkItem>
50+
<HelixWorkItem Include="Mobile Benchmark - Android Benchmarks.Droid Benchmark Run">
5151
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
52-
<PreCommands>echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)bdnandroid;copy %HELIX_CORRELATION_PAYLOAD%\MonoBenchmarksDroid.apk .;$(Python) pre.py -1-apk-name MonoBenchmarksDroid.apk</PreCommands>
53-
<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>
52+
<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>
53+
<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>
5454
<PostCommands>$(Python) post.py</PostCommands>
5555
<Timeout>00:30:00</Timeout>
56-
</HelixWorkItem> -->
56+
</HelixWorkItem>
5757
</ItemGroup>
5858
</Project>

0 commit comments

Comments
 (0)