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

[ci] Reduce overhead for MSBuildIntegration unit test jobs. #7832

Merged
merged 7 commits into from
Mar 2, 2023

Conversation

jpobst
Copy link
Contributor

@jpobst jpobst commented Feb 27, 2023

There are 2 opportunities for speeding up the MSBuildIntegration unit test stage: removing SmokeTests that we also run in a different stage, and opting out of installing dependencies that these jobs do not need.

  • Don't run SmokeTests in this stage, as they are run in the dedicated Smoke Tests stage.
  • Refactor start emulator and stop emulator into reusable templates, and update them to use dotnet build instead of mono.
  • Opt out of installing unneeded dependencies:
    • nunit-console
    • .NET 6
    • apkdiff
    • Unneeded Android SDK Platforms: 19,21,26,32
    • Mono: theoretically this stage isn't using Mono anymore. Regardless, Mono is now included in the default Mac VM image (it's a newer version (6.12.0.188) than we are installing (6.12.0.145)), so we don't need this unless we decide in the future we need a newer version than the default.
      • By updating our required Mono version to 6.12.0.188, xaprepare will not need to downgrade it anymore on the current Mac images, saving time for all jobs that install Mono.

Current main:
image

This PR:
image

@jpobst jpobst force-pushed the emulator-cleanup branch 3 times, most recently from f72dda5 to 1cd212a Compare February 28, 2023 19:11
@jpobst jpobst marked this pull request as ready for review March 2, 2023 16:28
@jpobst jpobst merged commit 6fec194 into main Mar 2, 2023
@jpobst jpobst deleted the emulator-cleanup branch March 2, 2023 22:30
grendello added a commit to grendello/xamarin-android that referenced this pull request Mar 6, 2023
* main:
  Bump to dotnet/installer@632ddca 8.0.100-preview.3.23128.1 (dotnet#7836)
  LEGO: Merge pull request 7852
  [ci] Reduce overhead for MSBuildIntegration unit test jobs. (dotnet#7832)
  [ci] Allow dynamic`$(NuGetArtifactName)` values (dotnet#7848)
  [Xamarin.Android.Build.Tasks] guard `AutoImport.props` against empty values (dotnet#7837)
  [Mono.Android] Print type & member remapping info (dotnet#7844)
  [Mono.Android] Tweak AndroidMessageHandler behavior for WCF support (dotnet#7785)
  LEGO: Merge pull request 7845
  Localized file check-in by OneLocBuild Task (dotnet#7842)
  [ci] Use compliance stage template (dotnet#7818)
  [build] pass `--skip-sign-check` to `dotnet workload` (dotnet#7840)
grendello added a commit to grendello/xamarin-android that referenced this pull request Mar 6, 2023
* main:
  Bump to dotnet/installer@632ddca 8.0.100-preview.3.23128.1 (dotnet#7836)
  LEGO: Merge pull request 7852
  [ci] Reduce overhead for MSBuildIntegration unit test jobs. (dotnet#7832)
  [ci] Allow dynamic`$(NuGetArtifactName)` values (dotnet#7848)
  [Xamarin.Android.Build.Tasks] guard `AutoImport.props` against empty values (dotnet#7837)
  [Mono.Android] Print type & member remapping info (dotnet#7844)
  [Mono.Android] Tweak AndroidMessageHandler behavior for WCF support (dotnet#7785)
  LEGO: Merge pull request 7845
  Localized file check-in by OneLocBuild Task (dotnet#7842)
  [ci] Use compliance stage template (dotnet#7818)
  [build] pass `--skip-sign-check` to `dotnet workload` (dotnet#7840)
  Replace K4os.Hash.xxHash with System.IO.Hashing (dotnet#7831)
  $(AndroidPackVersionSuffix)=preview.3; net8 is 34.0.0-preview.3 (dotnet#7839)
grendello added a commit to grendello/xamarin-android that referenced this pull request Mar 6, 2023
* main: (22 commits)
  Bump to dotnet/installer@632ddca 8.0.100-preview.3.23128.1 (dotnet#7836)
  LEGO: Merge pull request 7852
  [ci] Reduce overhead for MSBuildIntegration unit test jobs. (dotnet#7832)
  [ci] Allow dynamic`$(NuGetArtifactName)` values (dotnet#7848)
  [Xamarin.Android.Build.Tasks] guard `AutoImport.props` against empty values (dotnet#7837)
  [Mono.Android] Print type & member remapping info (dotnet#7844)
  [Mono.Android] Tweak AndroidMessageHandler behavior for WCF support (dotnet#7785)
  LEGO: Merge pull request 7845
  Localized file check-in by OneLocBuild Task (dotnet#7842)
  [ci] Use compliance stage template (dotnet#7818)
  [build] pass `--skip-sign-check` to `dotnet workload` (dotnet#7840)
  Replace K4os.Hash.xxHash with System.IO.Hashing (dotnet#7831)
  $(AndroidPackVersionSuffix)=preview.3; net8 is 34.0.0-preview.3 (dotnet#7839)
  [Xamarin.Android.Build.Tasks] Remove support for mkbundle (dotnet#7772)
  [Xamarin.Android.Build.Tasks] `unable to open file as zip archive`? (dotnet#7759)
  [monodroid] Properly process satellite assemblies (dotnet#7823)
  Bump to xamarin/java.interop/main@77800dda (dotnet#7824)
  [ci] Use AZDO built-in parallelization strategy. (dotnet#7804)
  Bump to dotnet/installer@e3ab0b5 8.0.100-preview.2.23123.10 (dotnet#7813)
  [ci] Run nunit tests with stable .NET version (dotnet#7826)
  ...
jpobst added a commit that referenced this pull request Mar 10, 2023
Bring the AzDO parallelization from #7804 and environment setup improvements from #7832 to `Xamarin.Android.Build.Tests.csproj` based test suites.  This includes both the main `MSBuild` stage and the `Smoke Tests` jobs.

Increases parallelization of all jobs as many were approaching ~90 minutes.

As there is no longer a place in the `MSBuild` stage to run `Xamarin.Android.Tools.Aidl-Tests` tests, it was moved to the `macOS > Tests > APKs .NET` stage.  This suite should be fine to only run on Mac and not Windows.  (Note this test assembly was also updated to .NET 7. This required moving it from `Xamarin.Android-Tests.sln` which is currently built with Mono which cannot build .NET 7+ projects. It now is built via `Xamarin.Android.sln`.)
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants