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

[infra] Enable trimming on Helix for Apple mobile #100669

Merged
merged 19 commits into from
Apr 12, 2024

Conversation

kotlarmilos
Copy link
Member

@kotlarmilos kotlarmilos commented Apr 5, 2024

Description

This PR (fixes #91923) introduces the trimming of library tests on Helix for Apple mobile targets. With trimming enabled, the configuration more closely mirrors the experience of an end user when building Apple mobile applications.

This change results in a 20min (42%) reduction in CI job builds for iOS (a subset of tests) and a 22min (18%) reduction for tvOS (the complete coverage).

Initial work is available at #92719.

Test job run: https://dev.azure.com/dnceng-public/public/_build/results?buildId=622954&view=results

This commit introduces the EnableAggressiveTrimming parameter in the Apple mobile targets for build machines. It ensures that parameters and items used by the ILLink target are passed correctly.
This commit introduces the EnableAggressiveTrimming parameter in the proxy project. Additionally, it ensures that ILLink props and targets are included into the payload.
This commit adds ILLink descriptor files to preserve types needed for tests. Additionally, it disables tests that are not trim-compatible.
@kotlarmilos
Copy link
Member Author

/azp run runtime-ioslike

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-ioslike

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-ioslike

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-ioslike

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mdh1418
Copy link
Member

mdh1418 commented Apr 5, 2024

Are we going to still run iOSlike tests without EnableAggressiveTrimming=true? I think some of the test disabling for iOS may mislead to thinking that the tests don't work on iOS when actually the tests don't work because of trimming. So we should make it clear that those tests are being skipped when trimming.

@steveisok
Copy link
Member

Are we going to still run iOSlike tests without EnableAggressiveTrimming=true? I think some of the test disabling for iOS may mislead to thinking that the tests don't work on iOS when actually the tests don't work because of trimming. So we should make it clear that those tests are being skipped when trimming.

Since customers could theoretically turn it off, there is value in running w/o trimming. I don't think it needs to be run anywhere except the rolling build.

@kotlarmilos
Copy link
Member Author

/azp run runtime-ioslike

Copy link

Azure Pipelines failed to run 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-ioslike

Copy link

Azure Pipelines failed to run 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-ioslike

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

Since customers could theoretically turn it off, there is value in running w/o trimming. I don't think it needs to be run anywhere except the rolling build.

The trimming is enabled by default on PR builds and disabled on rolling builds.

Copy link
Member

@ivanpovazan ivanpovazan left a comment

Choose a reason for hiding this comment

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

I believe the only thing that is left is to remove references to EnableSoftTrimming.
Other than that I think we are good to go!

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@steveisok steveisok left a comment

Choose a reason for hiding this comment

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

Nice job!

@kotlarmilos kotlarmilos merged commit 59c583c into dotnet:main Apr 12, 2024
199 of 204 checks passed
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
* Add ILLink support to build machines

This commit introduces the EnableAggressiveTrimming parameter in the Apple mobile targets for build machines. It ensures that parameters and items used by the ILLink target are passed correctly.

* Add ILLink support on Helix

This commit introduces the EnableAggressiveTrimming parameter in the proxy project. Additionally, it ensures that ILLink props and targets are included into the payload.

* Fix trimming-related test failures

This commit adds ILLink descriptor files to preserve types needed for tests. Additionally, it disables tests that are not trim-compatible.

* Fix ILLinkTasksAssembly path in AppleBuild.LocalBuild.props

* Remove EnableSoftTrimming property

---------

Co-authored-by: Ivan Povazan <ivan.povazan@gmail.com>
@github-actions github-actions bot locked and limited conversation to collaborators May 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[mono] Update tests to be trim-compatible on ios/tvos platforms
4 participants