From 812e63379e866ce23127f8d49507463dfda02e45 Mon Sep 17 00:00:00 2001 From: Parker Bibus Date: Mon, 14 Apr 2025 13:08:45 -0700 Subject: [PATCH 1/7] Update the iOS scenarios to use the same flow as android, bringing them up to running net10. --- eng/pipelines/sdk-perf-jobs.yml | 8 ++------ src/scenarios/mauiblazorios/pre.py | 15 +++++++-------- src/scenarios/mauiios/pre.py | 15 +++++++-------- src/scenarios/netios/pre.py | 17 ++++++++--------- 4 files changed, 24 insertions(+), 31 deletions(-) diff --git a/eng/pipelines/sdk-perf-jobs.yml b/eng/pipelines/sdk-perf-jobs.yml index 9c9b7b9b42d..7fa43b6dedf 100644 --- a/eng/pipelines/sdk-perf-jobs.yml +++ b/eng/pipelines/sdk-perf-jobs.yml @@ -436,10 +436,8 @@ jobs: jobParameters: runKind: maui_scenarios_ios projectFileName: maui_scenarios_ios.proj - dotnetVersionsLinks: - 9.0: ./eng/Version.Details.xml channels: - - 8.0 + - main runtimeFlavor: mono additionalJobIdentifier: Mono ${{ each parameter in parameters.jobParameters }}: @@ -455,10 +453,8 @@ jobs: jobParameters: runKind: maui_scenarios_ios projectFileName: maui_scenarios_ios.proj - dotnetVersionsLinks: - 9.0: ./eng/Version.Details.xml channels: - - 8.0 + - main runtimeFlavor: coreclr additionalJobIdentifier: CoreCLR ${{ each parameter in parameters.jobParameters }}: diff --git a/src/scenarios/mauiblazorios/pre.py b/src/scenarios/mauiblazorios/pre.py index 27d5a058d98..c9d5430bcce 100644 --- a/src/scenarios/mauiblazorios/pre.py +++ b/src/scenarios/mauiblazorios/pre.py @@ -5,14 +5,15 @@ import sys from performance.logger import setup_loggers, getLogger from shared import const -from shared.mauisharedpython import remove_aab_files, install_versioned_maui +from shared.mauisharedpython import remove_aab_files, install_latest_maui from shared.precommands import PreCommands -from shared.versionmanager import versions_write_json, get_version_from_dll_powershell_ios +from shared.versionmanager import versions_write_json, get_sdk_versions from test import EXENAME setup_loggers(True) precommands = PreCommands() -install_versioned_maui(precommands) +install_latest_maui(precommands) +precommands.print_dotnet_info() # Setup the Maui folder precommands.new(template='maui-blazor', @@ -39,7 +40,6 @@ # Build the IPA # NuGet.config file cannot be in the build directory due same cause as to https://github.com/dotnet/aspnetcore/issues/41397 -shutil.copy('./MauiNuGet.config', './Nuget.config') precommands.execute(['/p:_RequireCodeSigning=false', '/p:ApplicationId=net.dot.mauiblazortesting']) output_dir = const.PUBDIR @@ -47,9 +47,8 @@ output_dir = precommands.output remove_aab_files(output_dir) -# Copy the MauiVersion to a file so we have it on the machine -maui_version = get_version_from_dll_powershell_ios(rf"./{const.APPDIR}/obj/Release/{precommands.framework}/ios-arm64/linked/Microsoft.Maui.dll") -version_dict = { "mauiVersion": maui_version } +# Extract the versions of used SDKs from the linked folder DLLs +version_dict = get_sdk_versions(rf"./{const.APPDIR}/obj/Release/{precommands.framework}/ios-arm64/linked", False) versions_write_json(version_dict, rf"{output_dir}/versions.json") -print(f"Versions: {version_dict} from location " + rf"./{const.APPDIR}/obj/Release/{precommands.framework}/ios-arm64/linked/Microsoft.Maui.dll") +print(f"Versions: {version_dict} from location " + rf"./{const.APPDIR}/obj/Release/{precommands.framework}/ios-arm64/linked") diff --git a/src/scenarios/mauiios/pre.py b/src/scenarios/mauiios/pre.py index 48812e66dc8..473d1170c92 100644 --- a/src/scenarios/mauiios/pre.py +++ b/src/scenarios/mauiios/pre.py @@ -6,15 +6,16 @@ import subprocess from performance.logger import setup_loggers, getLogger from shared import const -from shared.mauisharedpython import remove_aab_files, install_versioned_maui +from shared.mauisharedpython import remove_aab_files, install_latest_maui from shared.precommands import PreCommands -from shared.versionmanager import versions_write_json, get_version_from_dll_powershell_ios +from shared.versionmanager import versions_write_json, get_sdk_versions from test import EXENAME setup_loggers(True) precommands = PreCommands() -install_versioned_maui(precommands) +install_latest_maui(precommands) +precommands.print_dotnet_info() # Setup the Maui folder precommands.new(template='maui', @@ -25,7 +26,6 @@ no_restore=False) # Build the APK -shutil.copy('./MauiNuGet.config', './app/Nuget.config') precommands.execute(['/p:_RequireCodeSigning=false', '/p:ApplicationId=net.dot.mauitesting']) # Remove the aab files as we don't need them, this saves space @@ -34,8 +34,7 @@ output_dir = precommands.output remove_aab_files(output_dir) -# Copy the MauiVersion to a file so we have it on the machine -maui_version = get_version_from_dll_powershell_ios(rf"./{const.APPDIR}/obj/Release/{precommands.framework}/ios-arm64/linked/Microsoft.Maui.dll") -version_dict = { "mauiVersion": maui_version } +# Extract the versions of used SDKs from the linked folder DLLs +version_dict = get_sdk_versions(rf"./{const.APPDIR}/obj/Release/{precommands.framework}/ios-arm64/linked", False) versions_write_json(version_dict, rf"{output_dir}/versions.json") -print(f"Versions: {version_dict} from location " + rf"./{const.APPDIR}/obj/Release/{precommands.framework}/ios-arm64/linked/Microsoft.Maui.dll") +print(f"Versions: {version_dict} from location " + rf"./{const.APPDIR}/obj/Release/{precommands.framework}/ios-arm64/linked") diff --git a/src/scenarios/netios/pre.py b/src/scenarios/netios/pre.py index 17e19d614b6..713cc1ebd03 100644 --- a/src/scenarios/netios/pre.py +++ b/src/scenarios/netios/pre.py @@ -3,17 +3,18 @@ ''' import shutil import sys -from performance.logger import setup_loggers +from performance.logger import setup_loggers, getLogger from shared import const -from shared.mauisharedpython import remove_aab_files, install_versioned_maui +from shared.mauisharedpython import remove_aab_files, install_latest_maui from shared.precommands import PreCommands -from shared.versionmanager import versions_write_json, get_version_from_dll_powershell_ios +from shared.versionmanager import versions_write_json, get_sdk_versions from test import EXENAME setup_loggers(True) precommands = PreCommands() -install_versioned_maui(precommands) +install_latest_maui(precommands) +precommands.print_dotnet_info() # Setup the .NET iOS folder precommands.new(template='ios', @@ -24,7 +25,6 @@ no_restore=False) # Build the APK -shutil.copy('./MauiNuGet.config', './app/Nuget.config') precommands.execute(['/p:_RequireCodeSigning=false', '/p:ApplicationId=net.dot.xamarintesting']) # Remove the aab files as we don't need them, this saves space @@ -33,8 +33,7 @@ output_dir = precommands.output remove_aab_files(output_dir) -# Copy the XamarinVersion to a file so we have it on the machine -net_ios_version = get_version_from_dll_powershell_ios(rf"./{const.APPDIR}/obj/Release/{precommands.framework}/ios-arm64/linked/Microsoft.iOS.dll") -version_dict = { "netIosVersion": net_ios_version } +# Extract the versions of used SDKs from the linked folder DLLs +version_dict = get_sdk_versions(rf"./{const.APPDIR}/obj/Release/{precommands.framework}/ios-arm64/linked", False) versions_write_json(version_dict, rf"{output_dir}/versions.json") -print(f"Versions: {version_dict} from location " + rf"./{const.APPDIR}/obj/Release/{precommands.framework}/ios-arm64/linked/Microsoft.iOS.dll") +print(f"Versions: {version_dict} from location " + rf"./{const.APPDIR}/obj/Release/{precommands.framework}/ios-arm64/linked") From 2314facc5f979c83784558b4686f2d6c52e82100 Mon Sep 17 00:00:00 2001 From: Parker Bibus Date: Mon, 14 Apr 2025 14:42:23 -0700 Subject: [PATCH 2/7] Update iOS builds to use the latest macos and xcode version. --- eng/performance/maui_scenarios_ios.proj | 2 +- eng/pipelines/sdk-perf-jobs.yml | 4 ++-- eng/pipelines/templates/build-machine-matrix.yml | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/eng/performance/maui_scenarios_ios.proj b/eng/performance/maui_scenarios_ios.proj index 2e0662854ff..0443330a21d 100644 --- a/eng/performance/maui_scenarios_ios.proj +++ b/eng/performance/maui_scenarios_ios.proj @@ -51,7 +51,7 @@ - sudo xcode-select -s /Applications/Xcode_16.2.app; $(Python) pre.py publish -f $(PERFLAB_Framework)-ios --self-contained -c Release -r ios-arm64 $(NativeAOTCommandProps) -o $(PreparePayloadWorkItemBaseDirectory)%(PreparePayloadWorkItem.ScenarioDirectoryName); cd ../; zip -r %(PreparePayloadWorkItem.ScenarioDirectoryName).zip %(PreparePayloadWorkItem.ScenarioDirectoryName) + sudo xcode-select -s /Applications/Xcode_16.3.app; $(Python) pre.py publish -f $(PERFLAB_Framework)-ios --self-contained -c Release -r ios-arm64 $(NativeAOTCommandProps) -o $(PreparePayloadWorkItemBaseDirectory)%(PreparePayloadWorkItem.ScenarioDirectoryName); cd ../; zip -r %(PreparePayloadWorkItem.ScenarioDirectoryName).zip %(PreparePayloadWorkItem.ScenarioDirectoryName) %(PreparePayloadWorkItem.PayloadDirectory) diff --git a/eng/pipelines/sdk-perf-jobs.yml b/eng/pipelines/sdk-perf-jobs.yml index 7fa43b6dedf..99439315966 100644 --- a/eng/pipelines/sdk-perf-jobs.yml +++ b/eng/pipelines/sdk-perf-jobs.yml @@ -431,7 +431,7 @@ jobs: parameters: jobTemplate: /eng/pipelines/templates/run-scenarios-job.yml buildMachines: - - osx-x64-ios-arm64 + - osx-arm64-ios-arm64 isPublic: false jobParameters: runKind: maui_scenarios_ios @@ -448,7 +448,7 @@ jobs: parameters: jobTemplate: /eng/pipelines/templates/run-scenarios-job.yml buildMachines: - - osx-x64-ios-arm64 + - osx-arm64-ios-arm64 isPublic: false jobParameters: runKind: maui_scenarios_ios diff --git a/eng/pipelines/templates/build-machine-matrix.yml b/eng/pipelines/templates/build-machine-matrix.yml index 637be851ec4..319cebdb7ec 100644 --- a/eng/pipelines/templates/build-machine-matrix.yml +++ b/eng/pipelines/templates/build-machine-matrix.yml @@ -129,14 +129,14 @@ jobs: machinePool: Galaxy ${{ insert }}: ${{ parameters.jobParameters }} -- ${{ if and(containsValue(parameters.buildMachines, 'osx-x64-ios-arm64'), not(eq(parameters.isPublic, true))) }}: # iPhone ARM64 12mini only used in private builds currently +- ${{ if and(containsValue(parameters.buildMachines, 'osx-arm64-ios-arm64'), not(eq(parameters.isPublic, true))) }}: # iPhone ARM64 12mini only used in private builds currently - template: ${{ parameters.jobTemplate }} parameters: osGroup: osx - archType: x64 - osVersion: 14 + archType: arm64 + osVersion: 15 pool: - vmImage: 'macos-14' + vmImage: 'macos-15' queue: OSX.13.Amd64.Iphone.Perf machinePool: iPhoneMini12 ${{ insert }}: ${{ parameters.jobParameters }} From 3bc225c295e27258085e4a9a487a38a868976ecc Mon Sep 17 00:00:00 2001 From: Parker Bibus Date: Mon, 14 Apr 2025 15:34:07 -0700 Subject: [PATCH 3/7] Update the net_ios dll used for getting the ios version for mobile tests to the correct one. --- src/scenarios/shared/versionmanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scenarios/shared/versionmanager.py b/src/scenarios/shared/versionmanager.py index 119ef6b1dc4..eb6ff6a9ebe 100644 --- a/src/scenarios/shared/versionmanager.py +++ b/src/scenarios/shared/versionmanager.py @@ -74,7 +74,7 @@ def parse_version_output(output: str) -> tuple[str, str]: mobile_sdks = { "net_android": "Mono.Android.dll", - "net_ios": "Mono.iOS.dll", + "net_ios": "Microsoft.iOS.dll", "net_maui": "Microsoft.Maui.dll", "runtime": "System.Runtime.dll" } From b91e7c221734ed2d285fb0dc2270965e46976a14 Mon Sep 17 00:00:00 2001 From: Parker Bibus Date: Mon, 14 Apr 2025 16:02:07 -0700 Subject: [PATCH 4/7] Test building SOD and Startup for x64. --- eng/pipelines/sdk-perf-jobs.yml | 4 ++-- eng/pipelines/templates/build-machine-matrix.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/sdk-perf-jobs.yml b/eng/pipelines/sdk-perf-jobs.yml index 99439315966..7fa43b6dedf 100644 --- a/eng/pipelines/sdk-perf-jobs.yml +++ b/eng/pipelines/sdk-perf-jobs.yml @@ -431,7 +431,7 @@ jobs: parameters: jobTemplate: /eng/pipelines/templates/run-scenarios-job.yml buildMachines: - - osx-arm64-ios-arm64 + - osx-x64-ios-arm64 isPublic: false jobParameters: runKind: maui_scenarios_ios @@ -448,7 +448,7 @@ jobs: parameters: jobTemplate: /eng/pipelines/templates/run-scenarios-job.yml buildMachines: - - osx-arm64-ios-arm64 + - osx-x64-ios-arm64 isPublic: false jobParameters: runKind: maui_scenarios_ios diff --git a/eng/pipelines/templates/build-machine-matrix.yml b/eng/pipelines/templates/build-machine-matrix.yml index 319cebdb7ec..c8ce56586a0 100644 --- a/eng/pipelines/templates/build-machine-matrix.yml +++ b/eng/pipelines/templates/build-machine-matrix.yml @@ -129,11 +129,11 @@ jobs: machinePool: Galaxy ${{ insert }}: ${{ parameters.jobParameters }} -- ${{ if and(containsValue(parameters.buildMachines, 'osx-arm64-ios-arm64'), not(eq(parameters.isPublic, true))) }}: # iPhone ARM64 12mini only used in private builds currently +- ${{ if and(containsValue(parameters.buildMachines, 'osx-x64-ios-arm64'), not(eq(parameters.isPublic, true))) }}: # iPhone ARM64 12mini only used in private builds currently - template: ${{ parameters.jobTemplate }} parameters: osGroup: osx - archType: arm64 + archType: x64 osVersion: 15 pool: vmImage: 'macos-15' From 67232b6f98b5593cbef53c01606648151c01d220 Mon Sep 17 00:00:00 2001 From: Parker Bibus Date: Wed, 16 Apr 2025 16:17:54 -0700 Subject: [PATCH 5/7] Standardize the iOS Scenario names to match android name convention. --- eng/performance/maui_scenarios_ios.proj | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/eng/performance/maui_scenarios_ios.proj b/eng/performance/maui_scenarios_ios.proj index 0443330a21d..30e5dc76d25 100644 --- a/eng/performance/maui_scenarios_ios.proj +++ b/eng/performance/maui_scenarios_ios.proj @@ -12,9 +12,6 @@ $(CorrelationPayloadDirectory)$(PreparePayloadOutDirectoryName)/ --nativeaot true - - $(RuntimeFlavor) @@ -29,19 +26,19 @@ - + netios $(ScenariosDir)%(ScenarioDirectoryName) NetiOSDefault com.companyname.NetiOSDefault - + mauiios $(ScenariosDir)%(ScenarioDirectoryName) MauiiOSDefault net.dot.mauitesting - + mauiblazorios $(ScenariosDir)%(ScenarioDirectoryName) MauiBlazoriOSDefault @@ -61,11 +58,11 @@ cp -r $HELIX_CORRELATION_PAYLOAD/$(PreparePayloadOutDirectoryName)/%(HelixWorkItem.ScenarioDirectoryName) $HELIX_WORKITEM_ROOT/pub $(Python) test.py sod --scenario-name "%(Identity)" $(ScenarioArgs) - + cp -r $HELIX_CORRELATION_PAYLOAD/$(PreparePayloadOutDirectoryName)/%(HelixWorkItem.ScenarioDirectoryName) $HELIX_WORKITEM_ROOT/pub; mv $HELIX_WORKITEM_ROOT/pub/%(HelixWorkItem.IPAName).ipa $HELIX_WORKITEM_ROOT/pub/%(HelixWorkItem.IPAName).zip; unzip -d $HELIX_WORKITEM_ROOT/pub $HELIX_WORKITEM_ROOT/pub/%(HelixWorkItem.IPAName).zip; rm $HELIX_WORKITEM_ROOT/pub/%(HelixWorkItem.IPAName).zip $(Python) test.py sod --scenario-name "%(Identity)" $(ScenarioArgs) - + $(ScenariosDir)netios.zip 00:15:00 ios-device @@ -93,7 +90,7 @@ ]]> - + $(ScenariosDir)mauiios.zip 00:15:00 ios-device @@ -122,7 +119,7 @@ -