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

Enable iOS/tvOS simulators on arm64 #51536

Closed
wants to merge 12 commits into from
Closed
4 changes: 4 additions & 0 deletions eng/pipelines/libraries/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ jobs:
# iOS/tvOS simulator x64/x86
- ${{ if in(parameters.platform, 'iOSSimulator_x64', 'iOSSimulator_x86', 'tvOSSimulator_x64') }}:
- OSX.1015.Amd64.Open

# iOS/tvOS simulator arm64
- ${{ if in(parameters.platform, 'iOSSimulator_arm64', 'tvOSSimulator_arm64') }}:
- OSX.1100.ARM64.Open

# iOS devices
- ${{ if in(parameters.platform, 'iOS_arm64') }}:
Expand Down
42 changes: 41 additions & 1 deletion eng/pipelines/runtime-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,48 @@ jobs:
platforms:
- Android_x86
- Android_x64
variables:
# map dependencies variables to local variables
- name: librariesContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
- name: monoContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ]
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true
timeoutInMinutes: 180
condition: >-
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
eq(variables['isFullMatrix'], true))
# extra steps, run tests
extraStepsTemplate: /eng/pipelines/libraries/helix.yml
extraStepsParameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
condition: >-
or(
eq(variables['librariesContainsChange'], true),
eq(variables['monoContainsChange'], true),
eq(variables['isFullMatrix'], true))

#
# Build the whole product using Mono and run libraries tests for interp iOS
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
buildConfig: Release
runtimeFlavor: mono
platforms:
- iOSSimulator_x64
- iOSSimulator_arm64
- tvOSSimulator_x64
- tvOSSimulator_arm64
variables:
# map dependencies variables to local variables
- name: librariesContainsChange
Expand All @@ -77,7 +117,7 @@ jobs:
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:MonoForceInterpreter=true
timeoutInMinutes: 180
condition: >-
or(
Expand Down
2 changes: 1 addition & 1 deletion eng/testing/tests.mobile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@

<Target Condition="'$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator'" Name="BundleTestAppleApp">
<Error Condition="!Exists('$(MicrosoftNetCoreAppRuntimePackRidDir)')" Text="MicrosoftNetCoreAppRuntimePackRidDir=$(MicrosoftNetCoreAppRuntimePackRidDir) doesn't exist" />
<Error Condition="('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm' or '$(TargetOS)' == 'MacCatalyst') and '$(DevTeamProvisioning)' == ''"
<Error Condition="('$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'MacCatalyst') and '$(DevTeamProvisioning)' == ''"
Text="'DevTeamProvisioning' needs to be set for device builds. Set it to 'UBF8T346G9' if you're part of the Microsoft team account." />
<Error Condition="'$(TestArchiveTestsDir)' == ''" Text="TestArchiveTestsDir property to archive the test folder must be set." />

Expand Down
4 changes: 4 additions & 0 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\libraries\System.Buffers\tests\System.Buffers.Tests.csproj"
Exclude="@ProjectExclusions" />
<!--
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just temporarily commented out, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, once the sanity check passes, I'll enable the rest.

<ProjectReference Include="$(MSBuildThisFileDirectory)*\tests\**\*.Tests.csproj"
Exclude="@(ProjectExclusions)"
Condition="'$(TestAssemblies)' == 'true'" />
Expand All @@ -372,6 +375,7 @@
Exclude="@(ProjectExclusions)"
Condition="'$(TargetOS)' == 'Browser' and '$(RunAOTCompilation)' != 'true'"
BuildInParallel="false" />
-->
</ItemGroup>

<ItemGroup Condition="'$(ArchiveTests)' == 'true' and ('$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator')">
Expand Down
4 changes: 4 additions & 0 deletions src/tasks/AppleAppBuilder/Templates/CMakeLists.txt.template
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ if("${HARDENED_RUNTIME}")
set_target_properties(%ProjectName% PROPERTIES XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME "YES")
if("${HARDENED_RUNTIME_USE_ENTITLEMENTS_FILE}")
set_target_properties(%ProjectName% PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "app.entitlements")
add_custom_command(
TARGET %ProjectName% POST_BUILD
COMMAND codesign -fs "$CODE_SIGN_IDENTITY" "$CODESIGNING_FOLDER_PATH/Contents/Resources/*.dylib"
)
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/tasks/AppleAppBuilder/Xcode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public string GenerateXCode(
var entitlements = new List<KeyValuePair<string, string>>();

bool hardenedRuntime = false;
if (Target == TargetNames.MacCatalyst && !(forceInterpreter || forceAOT)) {
if (Target == TargetNames.MacCatalyst && !forceAOT) {
hardenedRuntime = true;

/* for mmmap MAP_JIT */
lambdageek marked this conversation as resolved.
Show resolved Hide resolved
Expand Down