From 52ba42ff0008b9df375de999d4bdbe0062c4bb39 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Thu, 25 Sep 2025 13:45:40 +0200 Subject: [PATCH 01/24] Add iOS CoreCLR performance benchmarks --- eng/pipelines/performance/perf-build.yml | 10 ++++++++ .../templates/build-perf-sample-apps.yml | 25 +++++++++++++++++++ .../templates/perf-coreclr-build-jobs.yml | 19 ++++++++++++++ .../msbuild/apple/build/AppleBuild.targets | 1 + 4 files changed, 55 insertions(+) diff --git a/eng/pipelines/performance/perf-build.yml b/eng/pipelines/performance/perf-build.yml index 10cc3606d94bdf..062741167cc65a 100644 --- a/eng/pipelines/performance/perf-build.yml +++ b/eng/pipelines/performance/perf-build.yml @@ -30,6 +30,10 @@ parameters: displayName: Build Coreclr Arm64 Android type: boolean default: true +- name: coreclr_arm64_ios + displayName: Build Coreclr Arm64 iOS + type: boolean + default: true - name: wasm displayName: Build WebAssembly (wasm) type: boolean @@ -114,6 +118,8 @@ extends: - coreclr_x86_windows - ${{ if eq(parameters.coreclr_arm64_android, true) }}: - coreclr_arm64_android + - ${{ if eq(parameters.coreclr_arm64_ios, true) }}: + - coreclr_arm64_ios - ${{ if eq(parameters.wasm, true) }}: - wasm - ${{ if eq(parameters.monoAot_arm64_linux, true) }}: @@ -154,6 +160,8 @@ extends: - coreclr_x86_windows - ${{ if eq(parameters.coreclr_arm64_android, true) }}: - coreclr_arm64_android + - ${{ if eq(parameters.coreclr_arm64_ios, true) }}: + - coreclr_arm64_ios - ${{ if eq(parameters.wasm, true) }}: - wasm - ${{ if eq(parameters.monoAot_arm64_linux, true) }}: @@ -200,6 +208,8 @@ extends: - coreclr_x86_windows - ${{ if eq(parameters.coreclr_arm64_android, true) }}: - coreclr_arm64_android + - ${{ if eq(parameters.coreclr_arm64_ios, true) }}: + - coreclr_arm64_ios - ${{ if eq(parameters.wasm, true) }}: - wasm - ${{ if eq(parameters.monoAot_arm64_linux, true) }}: diff --git a/eng/pipelines/performance/templates/build-perf-sample-apps.yml b/eng/pipelines/performance/templates/build-perf-sample-apps.yml index f3a8eb3a3acf2d..d3ad51bd9547ec 100644 --- a/eng/pipelines/performance/templates/build-perf-sample-apps.yml +++ b/eng/pipelines/performance/templates/build-perf-sample-apps.yml @@ -210,6 +210,31 @@ steps: archiveExtension: '.zip' archiveType: zip + - ${{ if and(eq(parameters.osGroup, 'ios'), eq(parameters.runtimeType, 'coreclr')) }}: + # CoreCLR Interpreter Build + - script: make build-appbundle TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false /p:UseMonoRuntime=false /p:RunAOTCompilation=false /p:MonoForceInterpreter=false + env: + DevTeamProvisioning: '-' + workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS + displayName: Build HelloiOS sample app + - task: PublishBuildArtifacts@1 + condition: succeededOrFailed() + displayName: 'Publish binlog' + inputs: + pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog + artifactName: iOSCoreCLRArm64BuildLog + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/Bundle/HelloiOS/Release-iphoneos/HelloiOS.app + includeRootFolder: true + displayName: iOS Sample App + artifactName: iOSSampleApp + archiveExtension: '.zip' + archiveType: zip + - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin + workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS + displayName: Clean bindir + - ${{ if and(eq(parameters.osGroup, 'ios'), eq(parameters.nameSuffix, 'iOSNativeAOT')) }}: - script: make hello-app TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false env: diff --git a/eng/pipelines/performance/templates/perf-coreclr-build-jobs.yml b/eng/pipelines/performance/templates/perf-coreclr-build-jobs.yml index 85704ada6a297e..430afc47d4d28c 100644 --- a/eng/pipelines/performance/templates/perf-coreclr-build-jobs.yml +++ b/eng/pipelines/performance/templates/perf-coreclr-build-jobs.yml @@ -5,6 +5,7 @@ parameters: windows_x86: false windows_arm64: false android_arm64: false + ios_arm64: false jobs: - ${{ if or(eq(parameters.linux_x64, true), eq(parameters.windows_x64, true), eq(parameters.windows_x86, true), eq(parameters.linux_arm64, true), eq(parameters.windows_arm64, true)) }}: @@ -56,3 +57,21 @@ jobs: - template: /eng/pipelines/performance/templates/build-perf-sample-apps.yml parameters: runtimeType: coreclr + + - ${{ if eq(parameters.ios_arm64, true) }}: + # build coreclr iOS scenarios + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + runtimeFlavor: coreclr + platforms: + - ios_arm64 + jobParameters: + buildArgs: -s clr+clr.runtime+libs+packs+libs.tests -c $(_BuildConfig) + nameSuffix: iOSCoreCLR + isOfficialBuild: false + postBuildSteps: + - template: /eng/pipelines/performance/templates/build-perf-sample-apps.yml + parameters: + runtimeType: coreclr diff --git a/src/mono/msbuild/apple/build/AppleBuild.targets b/src/mono/msbuild/apple/build/AppleBuild.targets index 08f925649eb13f..ef599f766a4e7b 100644 --- a/src/mono/msbuild/apple/build/AppleBuild.targets +++ b/src/mono/msbuild/apple/build/AppleBuild.targets @@ -314,6 +314,7 @@ NativeAOT CoreCLR MonoVM + true Date: Thu, 25 Sep 2025 14:03:24 +0200 Subject: [PATCH 02/24] Test build --- eng/pipelines/performance/perf-build.yml | 10 ---------- .../templates/perf-coreclr-build-jobs.yml | 19 ------------------- .../perf-ios-scenarios-build-jobs.yml | 19 +++++++++++++++++++ .../msbuild/apple/build/AppleBuild.targets | 1 - 4 files changed, 19 insertions(+), 30 deletions(-) diff --git a/eng/pipelines/performance/perf-build.yml b/eng/pipelines/performance/perf-build.yml index 062741167cc65a..10cc3606d94bdf 100644 --- a/eng/pipelines/performance/perf-build.yml +++ b/eng/pipelines/performance/perf-build.yml @@ -30,10 +30,6 @@ parameters: displayName: Build Coreclr Arm64 Android type: boolean default: true -- name: coreclr_arm64_ios - displayName: Build Coreclr Arm64 iOS - type: boolean - default: true - name: wasm displayName: Build WebAssembly (wasm) type: boolean @@ -118,8 +114,6 @@ extends: - coreclr_x86_windows - ${{ if eq(parameters.coreclr_arm64_android, true) }}: - coreclr_arm64_android - - ${{ if eq(parameters.coreclr_arm64_ios, true) }}: - - coreclr_arm64_ios - ${{ if eq(parameters.wasm, true) }}: - wasm - ${{ if eq(parameters.monoAot_arm64_linux, true) }}: @@ -160,8 +154,6 @@ extends: - coreclr_x86_windows - ${{ if eq(parameters.coreclr_arm64_android, true) }}: - coreclr_arm64_android - - ${{ if eq(parameters.coreclr_arm64_ios, true) }}: - - coreclr_arm64_ios - ${{ if eq(parameters.wasm, true) }}: - wasm - ${{ if eq(parameters.monoAot_arm64_linux, true) }}: @@ -208,8 +200,6 @@ extends: - coreclr_x86_windows - ${{ if eq(parameters.coreclr_arm64_android, true) }}: - coreclr_arm64_android - - ${{ if eq(parameters.coreclr_arm64_ios, true) }}: - - coreclr_arm64_ios - ${{ if eq(parameters.wasm, true) }}: - wasm - ${{ if eq(parameters.monoAot_arm64_linux, true) }}: diff --git a/eng/pipelines/performance/templates/perf-coreclr-build-jobs.yml b/eng/pipelines/performance/templates/perf-coreclr-build-jobs.yml index 430afc47d4d28c..85704ada6a297e 100644 --- a/eng/pipelines/performance/templates/perf-coreclr-build-jobs.yml +++ b/eng/pipelines/performance/templates/perf-coreclr-build-jobs.yml @@ -5,7 +5,6 @@ parameters: windows_x86: false windows_arm64: false android_arm64: false - ios_arm64: false jobs: - ${{ if or(eq(parameters.linux_x64, true), eq(parameters.windows_x64, true), eq(parameters.windows_x86, true), eq(parameters.linux_arm64, true), eq(parameters.windows_arm64, true)) }}: @@ -57,21 +56,3 @@ jobs: - template: /eng/pipelines/performance/templates/build-perf-sample-apps.yml parameters: runtimeType: coreclr - - - ${{ if eq(parameters.ios_arm64, true) }}: - # build coreclr iOS scenarios - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - ios_arm64 - jobParameters: - buildArgs: -s clr+clr.runtime+libs+packs+libs.tests -c $(_BuildConfig) - nameSuffix: iOSCoreCLR - isOfficialBuild: false - postBuildSteps: - - template: /eng/pipelines/performance/templates/build-perf-sample-apps.yml - parameters: - runtimeType: coreclr diff --git a/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml b/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml index 85cff56fdc4c62..05f281b80d349b 100644 --- a/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml +++ b/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml @@ -1,6 +1,7 @@ parameters: hybridGlobalization: true mono: false + coreclr: false nativeAot: false jobs: @@ -22,6 +23,24 @@ jobs: parameters: hybridGlobalization: ${{ parameters.hybridGlobalization }} + - ${{ if eq(parameters.coreclr, false) }}: + # build CoreCLR iOS scenarios HybridGlobalization + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + runtimeFlavor: coreclr + platforms: + - ios_arm64 + jobParameters: + buildArgs: -s clr+clr.runtime+libs+packs -c $(_BuildConfig) + nameSuffix: iOSCoreCLR + isOfficialBuild: false + postBuildSteps: + - template: /eng/pipelines/performance/templates/build-perf-sample-apps.yml + parameters: + hybridGlobalization: ${{ parameters.hybridGlobalization }} + - ${{ if eq(parameters.nativeAot, true) }}: # build NativeAOT iOS scenarios HybridGlobalization - template: /eng/pipelines/common/platform-matrix.yml diff --git a/src/mono/msbuild/apple/build/AppleBuild.targets b/src/mono/msbuild/apple/build/AppleBuild.targets index ef599f766a4e7b..08f925649eb13f 100644 --- a/src/mono/msbuild/apple/build/AppleBuild.targets +++ b/src/mono/msbuild/apple/build/AppleBuild.targets @@ -314,7 +314,6 @@ NativeAOT CoreCLR MonoVM - true Date: Thu, 25 Sep 2025 14:10:04 +0200 Subject: [PATCH 03/24] Add runtimeType parameter --- .../performance/templates/perf-ios-scenarios-build-jobs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml b/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml index 05f281b80d349b..5dda0c83c4c232 100644 --- a/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml +++ b/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml @@ -40,6 +40,7 @@ jobs: - template: /eng/pipelines/performance/templates/build-perf-sample-apps.yml parameters: hybridGlobalization: ${{ parameters.hybridGlobalization }} + runtimeType: coreclr - ${{ if eq(parameters.nativeAot, true) }}: # build NativeAOT iOS scenarios HybridGlobalization From d21d346f91e1315fa538385125aa959d5049c057 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Thu, 25 Sep 2025 15:00:29 +0200 Subject: [PATCH 04/24] Test build --- .../performance/templates/build-perf-sample-apps.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/performance/templates/build-perf-sample-apps.yml b/eng/pipelines/performance/templates/build-perf-sample-apps.yml index d3ad51bd9547ec..161dd52c8f6838 100644 --- a/eng/pipelines/performance/templates/build-perf-sample-apps.yml +++ b/eng/pipelines/performance/templates/build-perf-sample-apps.yml @@ -212,10 +212,10 @@ steps: - ${{ if and(eq(parameters.osGroup, 'ios'), eq(parameters.runtimeType, 'coreclr')) }}: # CoreCLR Interpreter Build - - script: make build-appbundle TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false /p:UseMonoRuntime=false /p:RunAOTCompilation=false /p:MonoForceInterpreter=false + - script: ./dotnet.sh publish src/mono/sample/iOS/Program.csproj -c Release /p:TargetOS=ios /p:TargetArchitecture=arm64 /p:DeployAndRun=false /p:UseMonoRuntime=false /p:RunAOTCompilation=false /p:MonoForceInterpreter=false env: DevTeamProvisioning: '-' - workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS + workingDirectory: $(Build.SourcesDirectory) displayName: Build HelloiOS sample app - task: PublishBuildArtifacts@1 condition: succeededOrFailed() From ddac24f3b7430af260fcb8d53c86e455f9fc35e1 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Thu, 25 Sep 2025 15:31:59 +0200 Subject: [PATCH 05/24] Test build --- .../performance/templates/build-perf-sample-apps.yml | 4 ++-- src/mono/sample/iOS/Makefile | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/performance/templates/build-perf-sample-apps.yml b/eng/pipelines/performance/templates/build-perf-sample-apps.yml index 161dd52c8f6838..654b5c31324fc0 100644 --- a/eng/pipelines/performance/templates/build-perf-sample-apps.yml +++ b/eng/pipelines/performance/templates/build-perf-sample-apps.yml @@ -212,10 +212,10 @@ steps: - ${{ if and(eq(parameters.osGroup, 'ios'), eq(parameters.runtimeType, 'coreclr')) }}: # CoreCLR Interpreter Build - - script: ./dotnet.sh publish src/mono/sample/iOS/Program.csproj -c Release /p:TargetOS=ios /p:TargetArchitecture=arm64 /p:DeployAndRun=false /p:UseMonoRuntime=false /p:RunAOTCompilation=false /p:MonoForceInterpreter=false + - script: make build-appbundle TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false USE_MONO_RUNTIME=false AOT=false env: DevTeamProvisioning: '-' - workingDirectory: $(Build.SourcesDirectory) + workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS displayName: Build HelloiOS sample app - task: PublishBuildArtifacts@1 condition: succeededOrFailed() diff --git a/src/mono/sample/iOS/Makefile b/src/mono/sample/iOS/Makefile index b7e85dce7a26f2..a80b528cd004ea 100644 --- a/src/mono/sample/iOS/Makefile +++ b/src/mono/sample/iOS/Makefile @@ -10,6 +10,8 @@ DEPLOY_AND_RUN?=true APP_SANDBOX?=false STRIP_DEBUG_SYMBOLS?=false # only used when measuring SOD via build-appbundle make target HYBRID_GLOBALIZATION?=true +USE_MONO_RUNTIME?=true +AOT?=true #If DIAGNOSTIC_PORTS is enabled, @(RuntimeComponents) must also include 'diagnostics_tracing'. #If @(RuntimeComponents) includes 'diagnostics_tracing', DIAGNOSTIC_PORTS is optional. @@ -42,6 +44,8 @@ build-appbundle: clean appbuilder /p:StripDebugSymbols=$(STRIP_DEBUG_SYMBOLS) \ /p:DeployAndRun=false \ /p:HybridGlobalization=$(HYBRID_GLOBALIZATION) \ + /p:RunAOTCompilation=$(AOT) \ + /p:UseMonoRuntime=$(USE_MONO_RUNTIME) \ /bl run: clean appbuilder From 129785510ed65e3d3b9695d713f5d66b5f73b23d Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Thu, 25 Sep 2025 16:18:57 +0200 Subject: [PATCH 06/24] Test build --- eng/pipelines/performance/perf.yml | 1 + .../performance/templates/perf-ios-scenarios-build-jobs.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/performance/perf.yml b/eng/pipelines/performance/perf.yml index 17b77bffe7e16d..9eedbdad600d6f 100644 --- a/eng/pipelines/performance/perf.yml +++ b/eng/pipelines/performance/perf.yml @@ -28,6 +28,7 @@ resources: - repository: performance type: git name: internal/dotnet-performance + ref: feature/clr-ios-performance-benchmarks variables: - template: /eng/pipelines/common/variables.yml diff --git a/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml b/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml index 5dda0c83c4c232..bafdc74bc764dd 100644 --- a/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml +++ b/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml @@ -23,7 +23,7 @@ jobs: parameters: hybridGlobalization: ${{ parameters.hybridGlobalization }} - - ${{ if eq(parameters.coreclr, false) }}: + - ${{ if eq(parameters.coreclr, true) }}: # build CoreCLR iOS scenarios HybridGlobalization - template: /eng/pipelines/common/platform-matrix.yml parameters: From ff1eb1b5c5ff9183d723ca2c63d606b2759d36ea Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Fri, 26 Sep 2025 10:39:18 +0200 Subject: [PATCH 07/24] Remove branch --- eng/pipelines/performance/perf.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pipelines/performance/perf.yml b/eng/pipelines/performance/perf.yml index 9eedbdad600d6f..17b77bffe7e16d 100644 --- a/eng/pipelines/performance/perf.yml +++ b/eng/pipelines/performance/perf.yml @@ -28,7 +28,6 @@ resources: - repository: performance type: git name: internal/dotnet-performance - ref: feature/clr-ios-performance-benchmarks variables: - template: /eng/pipelines/common/variables.yml From 346e287ab89c3a01e4fe9eea2b468c0a147d36c7 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Fri, 26 Sep 2025 10:40:44 +0200 Subject: [PATCH 08/24] Update comment --- .../performance/templates/perf-ios-scenarios-build-jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml b/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml index bafdc74bc764dd..52393fd25eeca1 100644 --- a/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml +++ b/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml @@ -24,7 +24,7 @@ jobs: hybridGlobalization: ${{ parameters.hybridGlobalization }} - ${{ if eq(parameters.coreclr, true) }}: - # build CoreCLR iOS scenarios HybridGlobalization + # build CoreCLR iOS scenarios - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/common/global-build-job.yml From 894b13ea4103d8f1c20f331e0f6e5dd1157d57b0 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Fri, 26 Sep 2025 10:53:18 +0200 Subject: [PATCH 09/24] Fix ident --- src/mono/sample/iOS/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/sample/iOS/Makefile b/src/mono/sample/iOS/Makefile index a80b528cd004ea..03e3de5b8f0ee6 100644 --- a/src/mono/sample/iOS/Makefile +++ b/src/mono/sample/iOS/Makefile @@ -45,7 +45,7 @@ build-appbundle: clean appbuilder /p:DeployAndRun=false \ /p:HybridGlobalization=$(HYBRID_GLOBALIZATION) \ /p:RunAOTCompilation=$(AOT) \ - /p:UseMonoRuntime=$(USE_MONO_RUNTIME) \ + /p:UseMonoRuntime=$(USE_MONO_RUNTIME) \ /bl run: clean appbuilder From df79e010d6df811d13456d8df7137991be5281f0 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Mon, 29 Sep 2025 10:20:22 +0200 Subject: [PATCH 10/24] Test perf run --- eng/pipelines/performance/perf.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/performance/perf.yml b/eng/pipelines/performance/perf.yml index 17b77bffe7e16d..9eedbdad600d6f 100644 --- a/eng/pipelines/performance/perf.yml +++ b/eng/pipelines/performance/perf.yml @@ -28,6 +28,7 @@ resources: - repository: performance type: git name: internal/dotnet-performance + ref: feature/clr-ios-performance-benchmarks variables: - template: /eng/pipelines/common/variables.yml From 393c414c32cff6e245ce595b826138c24705d780 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Tue, 30 Sep 2025 09:27:37 +0200 Subject: [PATCH 11/24] Update iOS CoreCLR build configuration to use Checked --- .../performance/templates/build-perf-sample-apps.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/performance/templates/build-perf-sample-apps.yml b/eng/pipelines/performance/templates/build-perf-sample-apps.yml index 654b5c31324fc0..0ce0c18cde7ca4 100644 --- a/eng/pipelines/performance/templates/build-perf-sample-apps.yml +++ b/eng/pipelines/performance/templates/build-perf-sample-apps.yml @@ -212,7 +212,7 @@ steps: - ${{ if and(eq(parameters.osGroup, 'ios'), eq(parameters.runtimeType, 'coreclr')) }}: # CoreCLR Interpreter Build - - script: make build-appbundle TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false USE_MONO_RUNTIME=false AOT=false + - script: make build-appbundle TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Checked DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false USE_MONO_RUNTIME=false AOT=false env: DevTeamProvisioning: '-' workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS @@ -225,7 +225,7 @@ steps: artifactName: iOSCoreCLRArm64BuildLog - template: /eng/pipelines/common/upload-artifact-step.yml parameters: - rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/Bundle/HelloiOS/Release-iphoneos/HelloiOS.app + rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/Bundle/HelloiOS/Checked-iphoneos/HelloiOS.app includeRootFolder: true displayName: iOS Sample App artifactName: iOSSampleApp From c4fcbb27778728dd36f18eaf71a3654c01421e00 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Tue, 30 Sep 2025 09:28:08 +0200 Subject: [PATCH 12/24] Remove reference to feature/clr-ios-performance-benchmarks --- eng/pipelines/performance/perf.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pipelines/performance/perf.yml b/eng/pipelines/performance/perf.yml index 9eedbdad600d6f..17b77bffe7e16d 100644 --- a/eng/pipelines/performance/perf.yml +++ b/eng/pipelines/performance/perf.yml @@ -28,7 +28,6 @@ resources: - repository: performance type: git name: internal/dotnet-performance - ref: feature/clr-ios-performance-benchmarks variables: - template: /eng/pipelines/common/variables.yml From 2a614771dca906ef45ee4fa8f4580f3a15080e09 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Tue, 30 Sep 2025 10:13:29 +0200 Subject: [PATCH 13/24] Use Debug configuration --- eng/pipelines/performance/perf.yml | 1 + .../performance/templates/build-perf-sample-apps.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/performance/perf.yml b/eng/pipelines/performance/perf.yml index 17b77bffe7e16d..9eedbdad600d6f 100644 --- a/eng/pipelines/performance/perf.yml +++ b/eng/pipelines/performance/perf.yml @@ -28,6 +28,7 @@ resources: - repository: performance type: git name: internal/dotnet-performance + ref: feature/clr-ios-performance-benchmarks variables: - template: /eng/pipelines/common/variables.yml diff --git a/eng/pipelines/performance/templates/build-perf-sample-apps.yml b/eng/pipelines/performance/templates/build-perf-sample-apps.yml index 0ce0c18cde7ca4..92cbec4da8ec08 100644 --- a/eng/pipelines/performance/templates/build-perf-sample-apps.yml +++ b/eng/pipelines/performance/templates/build-perf-sample-apps.yml @@ -212,7 +212,7 @@ steps: - ${{ if and(eq(parameters.osGroup, 'ios'), eq(parameters.runtimeType, 'coreclr')) }}: # CoreCLR Interpreter Build - - script: make build-appbundle TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Checked DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false USE_MONO_RUNTIME=false AOT=false + - script: make build-appbundle TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Debug DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false USE_MONO_RUNTIME=false AOT=false env: DevTeamProvisioning: '-' workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS @@ -225,7 +225,7 @@ steps: artifactName: iOSCoreCLRArm64BuildLog - template: /eng/pipelines/common/upload-artifact-step.yml parameters: - rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/Bundle/HelloiOS/Checked-iphoneos/HelloiOS.app + rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/Bundle/HelloiOS/Debug-iphoneos/HelloiOS.app includeRootFolder: true displayName: iOS Sample App artifactName: iOSSampleApp From f997d6d1cc24737329865a24c80919f33583f091 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Tue, 30 Sep 2025 10:13:49 +0200 Subject: [PATCH 14/24] Remove reference to feature/clr-ios-performance-benchmarks --- eng/pipelines/performance/perf.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pipelines/performance/perf.yml b/eng/pipelines/performance/perf.yml index 9eedbdad600d6f..17b77bffe7e16d 100644 --- a/eng/pipelines/performance/perf.yml +++ b/eng/pipelines/performance/perf.yml @@ -28,7 +28,6 @@ resources: - repository: performance type: git name: internal/dotnet-performance - ref: feature/clr-ios-performance-benchmarks variables: - template: /eng/pipelines/common/variables.yml From 226582fa12221cec5edc8141e4bcd382ea8364f3 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Tue, 30 Sep 2025 10:41:40 +0200 Subject: [PATCH 15/24] Test Checked build --- eng/pipelines/performance/perf.yml | 1 + eng/pipelines/performance/templates/build-perf-sample-apps.yml | 2 +- .../performance/templates/perf-ios-scenarios-build-jobs.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/performance/perf.yml b/eng/pipelines/performance/perf.yml index 17b77bffe7e16d..9eedbdad600d6f 100644 --- a/eng/pipelines/performance/perf.yml +++ b/eng/pipelines/performance/perf.yml @@ -28,6 +28,7 @@ resources: - repository: performance type: git name: internal/dotnet-performance + ref: feature/clr-ios-performance-benchmarks variables: - template: /eng/pipelines/common/variables.yml diff --git a/eng/pipelines/performance/templates/build-perf-sample-apps.yml b/eng/pipelines/performance/templates/build-perf-sample-apps.yml index 92cbec4da8ec08..3c442e15bf49ed 100644 --- a/eng/pipelines/performance/templates/build-perf-sample-apps.yml +++ b/eng/pipelines/performance/templates/build-perf-sample-apps.yml @@ -212,7 +212,7 @@ steps: - ${{ if and(eq(parameters.osGroup, 'ios'), eq(parameters.runtimeType, 'coreclr')) }}: # CoreCLR Interpreter Build - - script: make build-appbundle TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Debug DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false USE_MONO_RUNTIME=false AOT=false + - script: make build-appbundle TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Checked DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false USE_MONO_RUNTIME=false AOT=false env: DevTeamProvisioning: '-' workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS diff --git a/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml b/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml index 52393fd25eeca1..d6eea615adc807 100644 --- a/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml +++ b/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml @@ -28,7 +28,7 @@ jobs: - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release + buildConfig: checked runtimeFlavor: coreclr platforms: - ios_arm64 From e94427569b65700640c902eb7776e48f5f386b49 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Tue, 30 Sep 2025 14:35:39 +0200 Subject: [PATCH 16/24] Remove reference to feature/clr-ios-performance-benchmarks --- eng/pipelines/performance/perf.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pipelines/performance/perf.yml b/eng/pipelines/performance/perf.yml index 9eedbdad600d6f..17b77bffe7e16d 100644 --- a/eng/pipelines/performance/perf.yml +++ b/eng/pipelines/performance/perf.yml @@ -28,7 +28,6 @@ resources: - repository: performance type: git name: internal/dotnet-performance - ref: feature/clr-ios-performance-benchmarks variables: - template: /eng/pipelines/common/variables.yml From a531573c9695a28e0f811f4e6ba746363ebb082a Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Tue, 30 Sep 2025 16:50:49 +0200 Subject: [PATCH 17/24] Add env variables --- eng/pipelines/performance/perf.yml | 1 + src/mono/sample/iOS/Program.csproj | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/eng/pipelines/performance/perf.yml b/eng/pipelines/performance/perf.yml index 17b77bffe7e16d..9eedbdad600d6f 100644 --- a/eng/pipelines/performance/perf.yml +++ b/eng/pipelines/performance/perf.yml @@ -28,6 +28,7 @@ resources: - repository: performance type: git name: internal/dotnet-performance + ref: feature/clr-ios-performance-benchmarks variables: - template: /eng/pipelines/common/variables.yml diff --git a/src/mono/sample/iOS/Program.csproj b/src/mono/sample/iOS/Program.csproj index ad1fa59aa6f906..48b9edf4605705 100644 --- a/src/mono/sample/iOS/Program.csproj +++ b/src/mono/sample/iOS/Program.csproj @@ -24,6 +24,10 @@ CopyFilesToPublishDirectory CopyFilesToPublishDirectory;Build Publish + + + + From ac90a5c4cd67dd29405869552a8f04174f53a125 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Tue, 30 Sep 2025 16:51:13 +0200 Subject: [PATCH 18/24] Remove reference to feature/clr-ios-performance-benchmarks --- eng/pipelines/performance/perf.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pipelines/performance/perf.yml b/eng/pipelines/performance/perf.yml index 9eedbdad600d6f..17b77bffe7e16d 100644 --- a/eng/pipelines/performance/perf.yml +++ b/eng/pipelines/performance/perf.yml @@ -28,7 +28,6 @@ resources: - repository: performance type: git name: internal/dotnet-performance - ref: feature/clr-ios-performance-benchmarks variables: - template: /eng/pipelines/common/variables.yml From 688f62386c235189c54d7f429e90f86d7151cb00 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 1 Oct 2025 10:29:41 +0200 Subject: [PATCH 19/24] Add CORECLR_TEST for conditional compilation in iOS project --- src/mono/sample/iOS/Program.cs | 15 +++++++++++---- src/mono/sample/iOS/Program.csproj | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/mono/sample/iOS/Program.cs b/src/mono/sample/iOS/Program.cs index 7b69b43a358f80..c1d2801a916675 100644 --- a/src/mono/sample/iOS/Program.cs +++ b/src/mono/sample/iOS/Program.cs @@ -21,8 +21,8 @@ public static class Program private static void SetText(string txt) { byte[] ascii = ASCIIEncoding.ASCII.GetBytes(txt); - - unsafe + + unsafe { fixed (byte* asciiPtr = ascii) { @@ -37,7 +37,13 @@ private static void OnButtonClick() { SetText("OnButtonClick! #" + counter++); } - +#if CORECLR_TEST + public static int Main(string[] args) + { + Console.WriteLine("Done!"); + return 42; + } +#else #if CI_TEST public static async Task Main(string[] args) #else @@ -63,6 +69,7 @@ public static async Task Main(string[] args) return 42; #else await Task.Delay(-1); -#endif +#endif } +#endif } diff --git a/src/mono/sample/iOS/Program.csproj b/src/mono/sample/iOS/Program.csproj index 48b9edf4605705..6e7073d15dd7e6 100644 --- a/src/mono/sample/iOS/Program.csproj +++ b/src/mono/sample/iOS/Program.csproj @@ -6,6 +6,7 @@ iossimulator $(TargetOS)-$(TargetArchitecture) $(DefineConstants);CI_TEST + $(DefineConstants);CORECLR_TEST HelloiOS $(AssemblyName).dll true From 6007107f581cb579d1fe98593936a74cd8a37afc Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 1 Oct 2025 10:30:11 +0200 Subject: [PATCH 20/24] Add branch reference for performance repository in perf.yml --- eng/pipelines/performance/perf.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/performance/perf.yml b/eng/pipelines/performance/perf.yml index 17b77bffe7e16d..7c669b028d733a 100644 --- a/eng/pipelines/performance/perf.yml +++ b/eng/pipelines/performance/perf.yml @@ -28,6 +28,7 @@ resources: - repository: performance type: git name: internal/dotnet-performance + branch: feature/clr-ios-performance-benchmarks variables: - template: /eng/pipelines/common/variables.yml From af3d86a64509c2cbe0f340a8d433f9650277dad0 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 1 Oct 2025 11:09:00 +0200 Subject: [PATCH 21/24] Move env variable to ItemGroup --- src/mono/sample/iOS/Program.csproj | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mono/sample/iOS/Program.csproj b/src/mono/sample/iOS/Program.csproj index 6e7073d15dd7e6..6e97cd8896e226 100644 --- a/src/mono/sample/iOS/Program.csproj +++ b/src/mono/sample/iOS/Program.csproj @@ -25,14 +25,13 @@ CopyFilesToPublishDirectory CopyFilesToPublishDirectory;Build Publish - - - - + + + From 8562fbb330019497eae4332a018a5eb8e2d4e2ee Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 1 Oct 2025 11:09:47 +0200 Subject: [PATCH 22/24] Update performance repository reference --- eng/pipelines/performance/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/performance/perf.yml b/eng/pipelines/performance/perf.yml index 7c669b028d733a..9eedbdad600d6f 100644 --- a/eng/pipelines/performance/perf.yml +++ b/eng/pipelines/performance/perf.yml @@ -28,7 +28,7 @@ resources: - repository: performance type: git name: internal/dotnet-performance - branch: feature/clr-ios-performance-benchmarks + ref: feature/clr-ios-performance-benchmarks variables: - template: /eng/pipelines/common/variables.yml From acf46623e918b85acbf9fdc9295a8011dec0c5b0 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 1 Oct 2025 14:05:50 +0200 Subject: [PATCH 23/24] Add sleep in Main --- src/mono/sample/iOS/Program.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/sample/iOS/Program.cs b/src/mono/sample/iOS/Program.cs index c1d2801a916675..e8b9d0658418b3 100644 --- a/src/mono/sample/iOS/Program.cs +++ b/src/mono/sample/iOS/Program.cs @@ -41,6 +41,7 @@ private static void OnButtonClick() public static int Main(string[] args) { Console.WriteLine("Done!"); + Thread.Sleep(Timeout.Infinite); return 42; } #else From 96d07a05de2224e2444f1b793dbdc39dab2b6180 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 1 Oct 2025 16:24:06 +0200 Subject: [PATCH 24/24] Remove branch --- eng/pipelines/performance/perf.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pipelines/performance/perf.yml b/eng/pipelines/performance/perf.yml index 9eedbdad600d6f..17b77bffe7e16d 100644 --- a/eng/pipelines/performance/perf.yml +++ b/eng/pipelines/performance/perf.yml @@ -28,7 +28,6 @@ resources: - repository: performance type: git name: internal/dotnet-performance - ref: feature/clr-ios-performance-benchmarks variables: - template: /eng/pipelines/common/variables.yml