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

[build] Only build the latest API level #7786

Merged
merged 1 commit into from
Feb 22, 2023

Conversation

pjcollins
Copy link
Member

@pjcollins pjcollins commented Feb 10, 2023

Build timing from main:

make jenkins  219.78s user 62.79s system 21% cpu 21:56.92 total

Build timing from this branch:

make jenkins  178.66s user 47.24s system 36% cpu 10:22.81 total

It looks like this will shave off about 10 minutes from the Linux build and 10-15 minutes from the macOS build in CI as well.

Rather than remove the classic installers entirely, this seems like a good incremental step towards obsoletion.

The designer tests have been removed as they rely on API 30 or lower.

The wear test job has been moved to the emulator test stage rather than running in its own stage.

Multiple API levels are still used in the following projects, and could be cleaned up in the future:

  • build-tools/api-merge
  • build-tools/create-android-api

Build timing from main:

    make jenkins  219.78s user 62.79s system 21% cpu 21:56.92 total

Build timing from this branch:

    make jenkins  178.66s user 47.24s system 36% cpu 10:22.81 total
@pjcollins
Copy link
Member Author

pjcollins commented Feb 21, 2023

@jpobst as an FYI there may be some conflicts between this and #7796, so we may want to hold this one until 7796 is ready?

Copy link
Contributor

@jpobst jpobst left a comment

Choose a reason for hiding this comment

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

😍 Love it!

Since this is ready, it's fine if this goes before #7796. I can fix the conflicts if needed.

@pjcollins
Copy link
Member Author

Updated commit message:

Shaves ~10-15 minutes off of our Unix builds by only attempting to build
Mono.Android.dll for the latest API level.  A local `make jenkins` build
went from ~22 minutes to ~10 minutes with these changes, and CI builds
see a similar time saving.

This seems like a reasonable incremental step towards classic removal,
and allows us to continue to produce classic .vsix and .pkg installers
for the time being.

The designer test stages have been removed as they rely on API 30 or
lower.

The Wear OS test job has been moved into the emulator job stage rather
than running in its own stage.

@jonpryor jonpryor merged commit 618bd4a into dotnet:main Feb 22, 2023
grendello added a commit to grendello/xamarin-android that referenced this pull request Feb 22, 2023
* main:
  [build] Only build the latest API level (dotnet#7786)
  [Xamarin.Android.Build.Tasks] Improve aapt2+file not found handling (dotnet#7644)
grendello added a commit to grendello/xamarin-android that referenced this pull request Feb 22, 2023
* main:
  Add Unit Test for testOnly apps (dotnet#7637)
  [build] Only build the latest API level (dotnet#7786)
  [Xamarin.Android.Build.Tasks] Improve aapt2+file not found handling (dotnet#7644)
  [MSBuildDeviceIntegration] Fix duplicated test parameter (dotnet#7809)
grendello added a commit to grendello/xamarin-android that referenced this pull request Feb 22, 2023
* main:
  Add Unit Test for testOnly apps (dotnet#7637)
  [build] Only build the latest API level (dotnet#7786)
  [Xamarin.Android.Build.Tasks] Improve aapt2+file not found handling (dotnet#7644)
  [MSBuildDeviceIntegration] Fix duplicated test parameter (dotnet#7809)
  [tests] Bump NUnit versions to latest (dotnet#7802)
  [Microsoft.Android.Sdk.ILLink] target `net7.0` temporarily (dotnet#7803)
  [tests] `InstallAndroidDependenciesTest` can use `platform-tools` 34.0.0 (dotnet#7800)
  Bump to xamarin/Java.Interop/main@9e0a469 (dotnet#7797)
  [Xamarin.Android.Build.Tasks] FileWrites&libraryprojectimports.cache (dotnet#7780)
  Bump to dotnet/installer@d25a3bb 8.0.100-preview.2.23105.6 (dotnet#7769)
grendello added a commit to grendello/xamarin-android that referenced this pull request Feb 22, 2023
* main:
  Add Unit Test for testOnly apps (dotnet#7637)
  [build] Only build the latest API level (dotnet#7786)
  [Xamarin.Android.Build.Tasks] Improve aapt2+file not found handling (dotnet#7644)
  [MSBuildDeviceIntegration] Fix duplicated test parameter (dotnet#7809)
grendello added a commit to grendello/xamarin-android that referenced this pull request Feb 22, 2023
* main:
  Add Unit Test for testOnly apps (dotnet#7637)
  [build] Only build the latest API level (dotnet#7786)
  [Xamarin.Android.Build.Tasks] Improve aapt2+file not found handling (dotnet#7644)
  [MSBuildDeviceIntegration] Fix duplicated test parameter (dotnet#7809)
  [tests] Bump NUnit versions to latest (dotnet#7802)
  [Microsoft.Android.Sdk.ILLink] target `net7.0` temporarily (dotnet#7803)
  [tests] `InstallAndroidDependenciesTest` can use `platform-tools` 34.0.0 (dotnet#7800)
  Bump to xamarin/Java.Interop/main@9e0a469 (dotnet#7797)
  [Xamarin.Android.Build.Tasks] FileWrites&libraryprojectimports.cache (dotnet#7780)
  Bump to dotnet/installer@d25a3bb 8.0.100-preview.2.23105.6 (dotnet#7769)
  [lgtm] Fix LGTM-reported issues (dotnet#1074)
  [ci] Report issues in the API docs build log (dotnet#7784)
@pjcollins pjcollins deleted the fewer-api-levels branch February 22, 2023 17:10
grendello added a commit to grendello/xamarin-android that referenced this pull request Feb 23, 2023
* main:
  LEGO: Merge pull request 7825
  Bump to xamarin/Java.Interop/main@bbaeda6f (dotnet#7799)
  Bump NDK to r25c (dotnet#7808)
  [Xamarin.Android.Build.Tests] Improve logcat logging in failed tests (dotnet#7816)
  [Mono.Android] Update api-compat reference file for current API-33 (dotnet#7822)
  Localized file check-in by OneLocBuild Task (dotnet#7820)
  Add Unit Test for testOnly apps (dotnet#7637)
  [build] Only build the latest API level (dotnet#7786)
grendello added a commit to grendello/xamarin-android that referenced this pull request Feb 24, 2023
* main:
  LEGO: Merge pull request 7825
  Bump to xamarin/Java.Interop/main@bbaeda6f (dotnet#7799)
  Bump NDK to r25c (dotnet#7808)
  [Xamarin.Android.Build.Tests] Improve logcat logging in failed tests (dotnet#7816)
  [Mono.Android] Update api-compat reference file for current API-33 (dotnet#7822)
  Localized file check-in by OneLocBuild Task (dotnet#7820)
  Add Unit Test for testOnly apps (dotnet#7637)
  [build] Only build the latest API level (dotnet#7786)
@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.

5 participants