Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
52ba42f
Add iOS CoreCLR performance benchmarks
kotlarmilos Sep 25, 2025
6538c53
Test build
kotlarmilos Sep 25, 2025
8ca20b8
Add runtimeType parameter
kotlarmilos Sep 25, 2025
d21d346
Test build
kotlarmilos Sep 25, 2025
ddac24f
Test build
kotlarmilos Sep 25, 2025
1297855
Test build
kotlarmilos Sep 25, 2025
ff1eb1b
Remove branch
kotlarmilos Sep 26, 2025
346e287
Update comment
kotlarmilos Sep 26, 2025
894b13e
Fix ident
kotlarmilos Sep 26, 2025
df79e01
Test perf run
kotlarmilos Sep 29, 2025
393c414
Update iOS CoreCLR build configuration to use Checked
kotlarmilos Sep 30, 2025
c4fcbb2
Remove reference to feature/clr-ios-performance-benchmarks
kotlarmilos Sep 30, 2025
2a61477
Use Debug configuration
kotlarmilos Sep 30, 2025
f997d6d
Remove reference to feature/clr-ios-performance-benchmarks
kotlarmilos Sep 30, 2025
226582f
Test Checked build
kotlarmilos Sep 30, 2025
e944275
Remove reference to feature/clr-ios-performance-benchmarks
kotlarmilos Sep 30, 2025
a531573
Add env variables
kotlarmilos Sep 30, 2025
ac90a5c
Remove reference to feature/clr-ios-performance-benchmarks
kotlarmilos Sep 30, 2025
688f623
Add CORECLR_TEST for conditional compilation in iOS project
kotlarmilos Oct 1, 2025
6007107
Add branch reference for performance repository in perf.yml
kotlarmilos Oct 1, 2025
af3d86a
Move env variable to ItemGroup
kotlarmilos Oct 1, 2025
8562fbb
Update performance repository reference
kotlarmilos Oct 1, 2025
acf4662
Add sleep in Main
kotlarmilos Oct 1, 2025
96d07a0
Remove branch
kotlarmilos Oct 1, 2025
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
25 changes: 25 additions & 0 deletions eng/pipelines/performance/templates/build-perf-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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=Checked DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false USE_MONO_RUNTIME=false AOT=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/Debug-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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
parameters:
hybridGlobalization: true
mono: false
coreclr: false
nativeAot: false

jobs:
Expand All @@ -22,6 +23,25 @@ jobs:
parameters:
hybridGlobalization: ${{ parameters.hybridGlobalization }}

- ${{ if eq(parameters.coreclr, true) }}:
# build CoreCLR iOS scenarios
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
buildConfig: checked
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 }}
runtimeType: coreclr

- ${{ if eq(parameters.nativeAot, true) }}:
# build NativeAOT iOS scenarios HybridGlobalization
- template: /eng/pipelines/common/platform-matrix.yml
Expand Down
4 changes: 4 additions & 0 deletions src/mono/sample/iOS/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
16 changes: 12 additions & 4 deletions src/mono/sample/iOS/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -37,7 +37,14 @@ private static void OnButtonClick()
{
SetText("OnButtonClick! #" + counter++);
}

#if CORECLR_TEST
public static int Main(string[] args)
{
Console.WriteLine("Done!");
Thread.Sleep(Timeout.Infinite);
return 42;
}
#else
#if CI_TEST
public static async Task<int> Main(string[] args)
#else
Expand All @@ -63,6 +70,7 @@ public static async Task Main(string[] args)
return 42;
#else
await Task.Delay(-1);
#endif
#endif
}
#endif
}
4 changes: 4 additions & 0 deletions src/mono/sample/iOS/Program.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<TargetOS Condition="'$(TargetOS)' == ''">iossimulator</TargetOS>
<RuntimeIdentifier>$(TargetOS)-$(TargetArchitecture)</RuntimeIdentifier>
<DefineConstants Condition="'$(ArchiveTests)' == 'true'">$(DefineConstants);CI_TEST</DefineConstants>
<DefineConstants Condition="'$(UseMonoRuntime)' != 'true'">$(DefineConstants);CORECLR_TEST</DefineConstants>
<AppName>HelloiOS</AppName>
<MainLibraryFileName>$(AssemblyName).dll</MainLibraryFileName>
<SelfContained>true</SelfContained>
Expand All @@ -28,6 +29,9 @@

<ItemGroup>
<RuntimeComponents Condition="'$(DiagnosticPorts)' != ''" Include="diagnostics_tracing" />
<EnvironmentVariables Condition="'$(UseMonoRuntime)' != 'true'" Include="DOTNET_InterpMode=3" />
<EnvironmentVariables Condition="'$(UseMonoRuntime)' != 'true'" Include="DOTNET_ReadyToRun=0" />
<EnvironmentVariables Condition="'$(UseMonoRuntime)' != 'true'" Include="DOTNET_InterpDump=*!*" />
</ItemGroup>

<Import Project="$(MonoProjectRoot)\msbuild\apple\build\AppleBuild.props" />
Expand Down
Loading