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

[Apple mobile] Enable trimming on build machines to match ILLink features #110966

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

kotlarmilos
Copy link
Member

@kotlarmilos kotlarmilos commented Dec 27, 2024

Description

This PR moves trimming from Helix to AzDo (build) machines to simplify ILLink feature alignment between AzDo and Helix. Previously, when an ILLink feature was added to the SDK, we needed to manually maintain an internal setup. This led to regressions, and time spend on investigation to identify the root cause, such as in:
#103594
#110771

Changes

Trimming is now moved trimming from Helix to AzDo (build) machines. Redundant code for maintaining ILLink features is removed.

This change introduces a 20min regression in build time for the complete set of library tests on runtime-extra-platforms pipeline, as they are now trimmed sequentially on build machines. However, it is expected to save time when investigating regressions caused by SDK changes.

Verification

The changes have been verified on the runtime and runtime-extra-platforms pipelines.

Fixes #110771 #104431 #110266

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Dec 27, 2024
@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos kotlarmilos added os-ios Apple iOS and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Dec 27, 2024
@kotlarmilos kotlarmilos added this to the 10.0.0 milestone Dec 27, 2024
@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos kotlarmilos marked this pull request as ready for review January 6, 2025 09:10
Copy link
Member

@matouskozak matouskozak left a comment

Choose a reason for hiding this comment

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

Thank you for this fix!

This change introduces a 20min regression in build time for the complete set of library tests on runtime-extra-platforms pipeline, as they are now trimmed sequentially on build machines.

Does this mean that each job that is building full library tests has 20 min slower build time or overall runtime-extra-platforms pipeline build got 20 min slower (combined across all library test jobs)?

Anyways, I suppose this should make the helix part of the CI faster (?) so if that is the case I think the regression is acceptable and worth the increase in CI stability.

src/libraries/tests.proj Show resolved Hide resolved
@@ -16,7 +16,7 @@
<!-- running aot-helix tests locally, so we can test with the same project file as CI -->
<_AOTBuildCommand Condition="'$(ContinuousIntegrationBuild)' != 'true'">$(_AOTBuildCommand) /p:RuntimeSrcDir=$(RepoRoot) /p:RuntimeConfig=$(Configuration)</_AOTBuildCommand>
<!-- The command below sets default properties for runtime and library tests -->
<_AOTBuildCommand>$(_AOTBuildCommand) /p:XHARNESS_EXECUTION_DIR=&quot;$XHARNESS_EXECUTION_DIR&quot; /p:RunAOTCompilation=$(RunAOTCompilation) /p:UseNativeAOTRuntime=$(UseNativeAOTRuntime) /p:TargetOS=$(TargetOS) /p:TargetArchitecture=$(TargetArchitecture) /p:MonoForceInterpreter=$(MonoForceInterpreter) /p:MonoEnableLLVM=true /p:DevTeamProvisioning=$(DevTeamProvisioning) /p:UsePortableRuntimePack=true /p:Configuration=$(Configuration) /p:EnableAggressiveTrimming=$(EnableAggressiveTrimming)</_AOTBuildCommand>
<_AOTBuildCommand>$(_AOTBuildCommand) /p:XHARNESS_EXECUTION_DIR=&quot;$XHARNESS_EXECUTION_DIR&quot; /p:RunAOTCompilation=$(RunAOTCompilation) /p:UseNativeAOTRuntime=$(UseNativeAOTRuntime) /p:TargetOS=$(TargetOS) /p:TargetArchitecture=$(TargetArchitecture) /p:MonoForceInterpreter=$(MonoForceInterpreter) /p:MonoEnableLLVM=true /p:DevTeamProvisioning=$(DevTeamProvisioning) /p:UsePortableRuntimePack=false /p:Configuration=$(Configuration) /p:EnableAggressiveTrimming=false</_AOTBuildCommand>
Copy link
Member

Choose a reason for hiding this comment

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

Why do we disable EnableAggressiveTrimming for local builds?

Copy link
Member Author

Choose a reason for hiding this comment

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

ILLink target is part of the publishing process and is performed before AOT compilation. The _AOTBuildCommand is used for AOT compilation both locally and on Helix. As trimming is performed before, it is not necessary to invoke it again.

Copy link
Member

@matouskozak matouskozak Jan 6, 2025

Choose a reason for hiding this comment

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

What's difference when we are running it on CI

buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=false /p:BuildDarwinFrameworks=true /p:IsManualOrRollingBuild=true /p:EnableAggressiveTrimming=true
where we are setting the /p:EnableAggressiveTrimming=true?

Do I understand it correctly that this performs trimming before AOT, so we are disabling it in _AOTBuildCommand to not run it twice?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct. The BuildArgs is used for publish on AzDo (build) machines. The _AOTBuildCommand is used for AOT on Helix.

@kotlarmilos
Copy link
Member Author

Does this mean that each job that is building full library tests has 20 min slower build time or overall runtime-extra-platforms pipeline build got 20 min slower (combined across all library test jobs)?

Each job that is building full library tests on Apple mobile. It impacts the total build time of runtime-extra-platforms but reduces maintenance costs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[mono][tvos] DataSet Xml serialization tests failing on tvos lanes
2 participants