-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Do not set CrossBuild to true when building runtime tests for Android #55641
Conversation
Tagging subscribers to this area: @directhex Issue Details
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure Issue Details
|
This change makes FreeBSD build failing though. Need to investigate further. |
cc @am11 |
Strange that it didn't showed up in CI runs. Was it excluded for some other reason? If changing package RID is fixing the "Building Targeting Pack" issue on Android, while all other platforms are fine, I think we should find the reason why Android with CrossBuild=true is expecting package restore RID to be same as target, rather than host? |
Does deleting this override line fix Android test build: Line 651 in b937677
|
No the failure happened before reaching to this point. |
The Android arm64 lane only run on rolling build. That's why it didn't fail for the PR checks. |
Is rolling build different than the official build? We did ran official build in that PR.
Alright, then this particular leg of Android is different than anything else we have in PR, official and unofficial platform matrix. We are not passing -cross and explicitly setting /CrossBuild=false, when it is clearly cross-compilation on Ubuntu for Android. I think we should try to fix this leg's configuration, rather than changing the meaning of things again. |
I just did some more investigation and found that for the android arm64 runtime test build, both |
Unfortunately yes but fortunately they are public builds. Rolling builds are ones that are triggered when a PR is merged, they run on the main branch. Because of the low number of hardware available for certain configurations we can't run all configurations per PR which is why some only run on rolling builds. We usually only have about 10-15 rolling builds per day (as those are batched together as well).
Why is PortableBuild=true passed in at all? It's already true by default: Line 111 in e60882e
|
It was set at The runtime test infrastructure is a complicated beast. Actually, I don't know exactly why it |
Ah, ok. I was looking at (https://dev.azure.com/dnceng/public/_build/results?buildId=1237622&view=logs&j=1fbc174f-133f-57a8-dcec-0de15ad033b4&t=827c0caa-5f6d-5c33-e064-1c275c207b92) Build Product step and there we have:
I don't know how to explain it based on what we understood. If we are cross compiling then /p:CrossBuild should be true (or just pass -cross) and ROOTFS_DIR environment variable should be set. Similarly, in test build step:
should have -cross flag set rather than setting it somewhere in the middle of the build? Then we won't be needing one-off workarounds like Line 651 in b937677
if something is not working with ROOTFS_DIR and -cross (which has been the cross build way in runtime/coreclr/corefx/core-setup repos for a while now), we can investigate it and fix to make it work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Looks great. :)
Android cross-build seems a bit different than other platforms, as while it is a cross build, we don't set -cross arguments (and set ROOTFS_DIR
environment variable) for it. It is probably to workaround something, but IMHO, we should try to fix the reason of workaround at some point, so we could cross-build mono as well as coreclr for Android alike (#32800).
Co-authored-by: Adeel Mujahid <[email protected]>
Do you mean the build for Mono Android product itself or the runtime test build script that I am fixing here? |
You have added an exception in test build script which reads "do not consider Android's cross build as typical cross-build". |
Ah, gotcha! |
@am11 If this change looks good to you, do you mind approving it? |
@ViktorHofer if you could give a green light on this too that would be great. :) |
Hello @fanyang-mono! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Fixes #55669