-
Couldn't load subscription status.
- Fork 1.9k
[tests] Try run device tests with CoreClr #30686
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
Conversation
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.
Pull Request Overview
This pull request introduces support for using CoreCLR runtime instead of Mono in Android device tests by adding a new useCoreClr parameter throughout the build pipeline. The changes enable the option to run Android tests with CoreCLR while maintaining backward compatibility with the default Mono runtime.
- Adds
useCoreClrparameter to pipeline templates and build scripts - Updates Android build logic to conditionally set MSBuild properties for CoreCLR
- Extends pipeline configurations to support CoreCLR testing workflows
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
eng/pipelines/common/device-tests.yml |
Adds new Android-specific block with CoreCLR parameter |
eng/pipelines/common/device-tests-steps.yml |
Passes useCoreClr parameter to build command |
eng/pipelines/common/device-tests-jobs.yml |
Adds CoreCLR parameter and updates display names |
eng/devices/android.cake |
Implements CoreCLR logic with MSBuild property configuration |
Comments suppressed due to low confidence (1)
eng/devices/android.cake:28
- The argument name 'coreclr' is inconsistent with the variable name 'useCoreClr' and the parameter name used throughout the pipeline templates. Consider using 'useCoreClr' for consistency.
var useCoreClr = Argument("coreclr", false);
| <RuntimeIdentifier Condition="$(TargetFramework.Contains('-maccatalyst'))">maccatalyst-x64</RuntimeIdentifier> | ||
| <RuntimeIdentifier Condition="$(TargetFramework.Contains('-maccatalyst')) and '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'arm64'">maccatalyst-arm64</RuntimeIdentifier> | ||
| <RuntimeIdentifiers Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">android-arm64;android-x86;android-x64</RuntimeIdentifiers> | ||
| <RuntimeIdentifiers Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">android-arm64;android-x64</RuntimeIdentifiers> |
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.
Just FYI, if you have tests that run on a really old API level somewhere (maybe main?), you might need android-x86 in some cases. It depends on if Google put out an x86_64 emulator image for each version.
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.
yeah on our main build we run from 23/33
|
/rebase |
347174c to
5349df4
Compare
|
@rmarinho is there a way we can merge this, but only run CoreCLR on the newer API levels? I think it's only broken on older ones, @simonrozsival is still investigating which one breaks. |
|
/rebase |
5856ad2 to
638afe9
Compare
|
/rebase |
638afe9 to
abc4b58
Compare
|
This is still waiting for dotnet/runtime#118161 so it runs on old devices |
|
@rmarinho .NET 10 dotnet/runtime, might be "done". It's past the "platform shutdown" date. Can we just run CoreCLR on the newest API level? Just a single one is enough. |
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.
@rmarinho Could you rebase and fix the conflict? Thanks in advance.
[ci] Review changes [ci] Fix job names try again Again Use core CLR
# Conflicts: # eng/pipelines/device-tests.yml
Description of Change
Change the pipelines to allow to run the tests with CoreCLR
This pull request introduces support for using CoreCLR in Android builds and tests. The changes include updates to the build script (
android.cake) to handle a newuseCoreClrargument, modifications to pipeline templates to propagate this parameter, and adjustments to build and test logic.Build Script Updates:
useCoreClrargument to theandroid.cakescript, defaulting tofalse. This argument is passed to theExecuteBuildmethod. [1] [2] [3]ExecuteBuildmethod to conditionally append the/p:UseMonoRuntime=falseMSBuild property whenuseCoreClris enabled.Pipeline Template Updates:
useCoreClrparameter indevice-tests-jobs.ymlanddevice-tests-steps.yml, defaulting tofalse. This parameter is passed through various pipeline configurations. [1] [2]useCoreClrparameter to build and test steps, ensuring it is included in thedotnet cakecommand. [1] [2]Android-Specific Pipeline Enhancements:
device-tests.ymlto handle Android-specific projects with theuseCoreClrparameter.Issues Fixed
Fixes #30277