Skip to content
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

[mono][tests] Run Mono iOS sample as functional test on the simulator and maccatalyst on Helix #86578

Merged
merged 31 commits into from
Jun 11, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
cdca223
Run Mono and Native AOT iOS sample on Helix
kotlarmilos May 22, 2023
0e4cae2
Merge branch 'dotnet:main' into feature/ios-sample-helix
kotlarmilos May 23, 2023
17d7dee
Run sample on iOS, tvOS, and maccatalyst
kotlarmilos May 23, 2023
14c2ff5
Disable Native AOT sample app
kotlarmilos May 23, 2023
f190a4a
Disable tvOS platform
kotlarmilos May 23, 2023
304896e
Add HelloiOS sample on iossimulator
kotlarmilos May 23, 2023
2ff8a3d
Enable AOT compilation on iossimulator
kotlarmilos May 23, 2023
da8630f
Use JustInterp AOTMode on iossimulator
kotlarmilos May 24, 2023
d844d59
Merge branch 'dotnet:main' into feature/ios-sample-helix
kotlarmilos May 26, 2023
2530db6
Remove custom tasks from the sample app
kotlarmilos May 29, 2023
12326b1
Merge branch 'feature/ios-sample-helix' of github.com:kotlarmilos/run…
kotlarmilos May 29, 2023
81d9528
Add ExcludeFromAppDir to AppleAppBuilderTask
kotlarmilos May 29, 2023
e31d036
Add BuildAppBundle target to invoke AOT compilation on CI
kotlarmilos May 29, 2023
f1450df
Use optimized flag in AppleAppBuilder and run CopySampleAppToHelixTes…
kotlarmilos May 29, 2023
b22546f
Update src/mono/sample/iOS/Program.csproj
kotlarmilos May 29, 2023
fd1a0f6
Enable ILStrip in Full AOT mode only
kotlarmilos May 30, 2023
b160c88
Merge branch 'dotnet:main' into feature/ios-sample-helix
kotlarmilos Jun 1, 2023
0987890
Update app bundle path
kotlarmilos Jun 1, 2023
1e52a6b
Change default values for TargetOS and DeployAndRun
kotlarmilos Jun 1, 2023
2151b27
Disable the functional test on a device
kotlarmilos Jun 1, 2023
6f8a02d
Avoid circular target reference
kotlarmilos Jun 1, 2023
232e579
Use different beforeTargets for _CustomAppleAotCompileProps according…
kotlarmilos Jun 2, 2023
6613ea9
Update BuildAppBundle target dependencies when run on the CI
kotlarmilos Jun 2, 2023
933bd08
Merge branch 'dotnet:main' into feature/ios-sample-helix
kotlarmilos Jun 5, 2023
83456ac
Test the CI with ProjectName=''
kotlarmilos Jun 5, 2023
a0dfebc
Use AppName as ProjectName in AppleBuild.targets
kotlarmilos Jun 5, 2023
5b211e1
Remove disabled runs
kotlarmilos Jun 6, 2023
aa100ee
Simplify .csproj file
kotlarmilos Jun 6, 2023
16e3e72
Use AssemblyName as MainLibraryFileName
kotlarmilos Jun 6, 2023
7abe5f4
Merge branch 'dotnet:main' into feature/ios-sample-helix
kotlarmilos Jun 7, 2023
5e2be8c
Set default props for the sample app. Use diagnostics_tracing and mar…
kotlarmilos Jun 10, 2023
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
12 changes: 6 additions & 6 deletions eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ steps:
artifactName: ${{ parameters.artifactName }}
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/Bundle/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App NoLLVM
artifactName: iOSSampleAppNoLLVMSymbols
Expand All @@ -72,7 +72,7 @@ steps:
artifactName: ${{ parameters.artifactName }}
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/Bundle/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App NoLLVM NoSymbols
artifactName: iOSSampleAppNoLLVMNoSymbols
Expand All @@ -94,7 +94,7 @@ steps:
artifactName: ${{ parameters.artifactName }}
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/Bundle/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App LLVM
artifactName: iOSSampleAppLLVMSymbols
Expand All @@ -116,7 +116,7 @@ steps:
artifactName: ${{ parameters.artifactName }}
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/Bundle/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App LLVM NoSymbols
artifactName: iOSSampleAppLLVMNoSymbols
Expand All @@ -137,7 +137,7 @@ steps:
artifactName: ${{ parameters.artifactName }}
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/Bundle/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App Symbols
artifactName: iOSSampleAppSymbols
Expand All @@ -159,7 +159,7 @@ steps:
artifactName: ${{ parameters.artifactName }}
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/Bundle/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App NoSymbols
artifactName: iOSSampleAppNoSymbols
Expand Down
10 changes: 4 additions & 6 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -625,9 +625,8 @@
</ItemGroup>

<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(RunSmokeTestsOnly)' != 'true' and '$(RunGrpcTestsOnly)' != 'true' and '$(TargetOS)' == 'iossimulator'">
<!-- https://github.com/dotnet/runtime/issues/57666 -->
<!-- <ProjectReference Include="$(MonoProjectRoot)sample\iOS\Program.csproj"
BuildInParallel="false" /> -->
<ProjectReference Include="$(MonoProjectRoot)sample\iOS\Program.csproj"
BuildInParallel="false" />
<ProjectReference Include="$(RepoRoot)\src\tests\FunctionalTests\iOS\Simulator\**\*.Test.csproj"
Exclude="@(ProjectExclusions)"
BuildInParallel="false" />
Expand All @@ -640,9 +639,8 @@
</ItemGroup>

<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(RunSmokeTestsOnly)' != 'true' and '$(RunGrpcTestsOnly)' != 'true' and '$(TargetOS)' == 'maccatalyst'">
<!-- https://github.com/dotnet/runtime/issues/57666 -->
<!-- <ProjectReference Include="$(MonoProjectRoot)sample\iOS\Program.csproj"
BuildInParallel="false" /> -->
<ProjectReference Include="$(MonoProjectRoot)sample\iOS\Program.csproj"
BuildInParallel="false" />
<ProjectReference Include="$(RepoRoot)\src\tests\FunctionalTests\iOS\Simulator\**\*.Test.csproj"
Exclude="@(ProjectExclusions)"
BuildInParallel="false" />
Expand Down
8 changes: 6 additions & 2 deletions src/mono/msbuild/apple/build/AppleBuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<BundleDir>$(AppleBundleDir)</BundleDir>
<_MonoHeaderPath>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'include', 'mono-2.0'))</_MonoHeaderPath>
<_AotModuleTablePath>$(AppleBundleDir)\modules.m</_AotModuleTablePath>
<AppName Condition="'$(AppName)' == ''">$(AssemblyName)</AppName>
</PropertyGroup>

<!-- common linker arguments for app and library builds -->
Expand Down Expand Up @@ -84,6 +85,7 @@
<PropertyGroup>
<_AppleRuntimeConfigFilePath Condition="'$(_AppleRuntimeConfigFilePath)' == ''">$([MSBuild]::NormalizePath($(AppleBuildDir), '$(AssemblyName).runtimeconfig.json'))</_AppleRuntimeConfigFilePath>
<_ParsedRuntimeConfigFilePath Condition="'$(_ParsedRuntimeConfigFilePath)' == ''">$([MSBuild]::NormalizePath($(AppleBuildDir), 'runtimeconfig.bin'))</_ParsedRuntimeConfigFilePath>
<UseConsoleUITemplate Condition="'$(UseConsoleUITemplate)' == ''">true</UseConsoleUITemplate>
</PropertyGroup>

<RemoveDir Directories="$(AppleBundleDir)" />
Expand Down Expand Up @@ -183,6 +185,7 @@
<AotArguments>@(MonoAOTCompilerDefaultAotArguments, ';')</AotArguments>
<ProcessArguments>@(MonoAOTCompilerDefaultProcessArguments, ';')</ProcessArguments>
</_AotInputAssemblies>
<_ExcludeFromAppDir Include="$(_iOSLikeDedupAssembly)" />
</ItemGroup>

<!--
Expand Down Expand Up @@ -255,10 +258,11 @@
NativeMainSource="$(NativeMainSource)"
Optimized="$(Optimized)"
OutputDirectory="$(AppleBundleDir)"
ProjectName="$(AssemblyName)"
ProjectName="$(AppName)"
RuntimeComponents="$(RuntimeComponents)"
TargetOS="$(TargetOS)"
UseConsoleUITemplate="True">
ExcludeFromAppDir="@(_ExcludeFromAppDir)"
UseConsoleUITemplate="$(UseConsoleUITemplate)">
<Output TaskParameter="AppBundlePath" PropertyName="AppBundlePath" />
<Output TaskParameter="XcodeProjectPath" PropertyName="XcodeProjectPath" />
</AppleAppBuilderTask>
Expand Down
77 changes: 40 additions & 37 deletions src/mono/sample/iOS/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ MONO_CONFIG?=Debug
MONO_ARCH?=x64
DOTNET := ../../../../dotnet.sh
USE_LLVM=true
AOT?=false
TARGET?=iossimulator
DEPLOY_AND_RUN?=true
APP_SANDBOX?=false
Expand All @@ -25,68 +24,72 @@ appbuilder:
$(DOTNET) build -c Debug $(TOOLS_DIR)/AppleAppBuilder/AppleAppBuilder.csproj

runtimepack:
../../../../build.sh Mono+Libs -os $(TARGET) -arch $(MONO_ARCH) -c $(MONO_CONFIG)
../../../../build.sh mono+libs -os $(TARGET) -arch $(MONO_ARCH) -c $(MONO_CONFIG)

run: clean appbuilder
build-appbundle: clean appbuilder
$(DOTNET) publish \
-c $(MONO_CONFIG) \
/p:TargetOS=ios \
/p:TargetOS=$(TARGET) \
/p:TargetArchitecture=$(MONO_ARCH) \
/p:UseLLVM=$(USE_LLVM) \
/p:ForceAOT=$(AOT) \
'/p:RuntimeComponents="$(RUNTIME_COMPONENTS)"' \
'/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \
'/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"'
/p:MonoEnableLLVM=$(USE_LLVM) \
/p:StripDebugSymbols=$(STRIP_DEBUG_SYMBOLS) \
/p:DeployAndRun=false \
/bl

run-sim: clean appbuilder
run: clean appbuilder
$(DOTNET) publish \
-c $(MONO_CONFIG) \
/p:TargetOS=iossimulator \
/p:TargetOS=ios \
/p:TargetArchitecture=$(MONO_ARCH) \
/p:UseLLVM=$(USE_LLVM) \
/p:ForceAOT=$(AOT) \
'/p:RuntimeComponents="$(RUNTIME_COMPONENTS)"' \
'/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \
'/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"'

build-appbundle: clean appbuilder
$(DOTNET) publish -c $(MONO_CONFIG) /p:TargetOS=$(TARGET) /p:TargetArchitecture=$(MONO_ARCH) \
'/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \
/p:StripDebugSymbols=$(STRIP_DEBUG_SYMBOLS) \
/p:UseLLVM=$(USE_LLVM) /p:ForceAOT=$(AOT) /bl \
/p:MonoEnableLLVM=$(USE_LLVM) \
/p:DeployAndRun=$(DEPLOY_AND_RUN) \
/p:RuntimeComponents="$(RUNTIME_COMPONENTS)" \
/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)" \
/bl

run-catalyst:
run-sim: clean appbuilder
$(DOTNET) publish \
-c $(MONO_CONFIG) \
/p:TargetOS=maccatalyst \
/p:TargetOS=iossimulator \
/p:TargetArchitecture=$(MONO_ARCH) \
'/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \
/p:UseLLVM=False \
/p:ForceAOT=True \
/p:EnableAppSandbox=$(APP_SANDBOX)
/p:MonoEnableLLVM=$(USE_LLVM) \
/p:DeployAndRun=$(DEPLOY_AND_RUN) \
/p:RuntimeComponents="$(RUNTIME_COMPONENTS)" \
/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)" \
/bl

run-sim-interp: clean appbuilder
$(DOTNET) publish \
-c $(MONO_CONFIG) \
/p:TargetOS=iossimulator \
/p:TargetArchitecture=$(MONO_ARCH) \
/p:UseLLVM=$(USE_LLVM) \
/p:ForceAOT=$(AOT) \
/p:MonoEnableLLVM=$(USE_LLVM) \
/p:MonoForceInterpreter=true \
'/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \
'/p:RuntimeComponents="$(RUNTIME_COMPONENTS)"' \
'/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"'
/p:DeployAndRun=$(DEPLOY_AND_RUN) \
/p:RuntimeComponents="$(RUNTIME_COMPONENTS)" \
/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)" \
/bl

run-catalyst-interp:
run-catalyst: clean appbuilder
$(DOTNET) publish \
-c $(MONO_CONFIG) \
/p:TargetOS=maccatalyst \
/p:TargetArchitecture=$(MONO_ARCH) \
/p:UseLLVM=False \
'/p:DeployAndRun="$(DEPLOY_AND_RUN)"' \
/p:ForceAOT=True \
/p:MonoEnableLLVM=false \
/p:DeployAndRun=$(DEPLOY_AND_RUN) \
/p:EnableAppSandbox=$(APP_SANDBOX) \
/bl

run-catalyst-interp: clean appbuilder
$(DOTNET) publish \
-c $(MONO_CONFIG) \
/p:TargetOS=maccatalyst \
/p:TargetArchitecture=$(MONO_ARCH) \
/p:MonoEnableLLVM=False \
/p:MonoForceInterpreter=true
/p:DeployAndRun=$(DEPLOY_AND_RUN) \
/p:EnableAppSandbox=$(APP_SANDBOX) \
/bl

clean:
rm -rf bin
Loading