Skip to content

Document NDK upgrade process #112885

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

Merged
merged 8 commits into from
Apr 23, 2025
Merged

Document NDK upgrade process #112885

merged 8 commits into from
Apr 23, 2025

Conversation

jkurdek
Copy link
Contributor

@jkurdek jkurdek commented Feb 24, 2025

The PR documents the process of upgrading the NDK on runtime CI.

@jkurdek jkurdek added the documentation Documentation bug or enhancement, does not impact product or test code label Feb 24, 2025
@jkurdek jkurdek self-assigned this Feb 24, 2025
@Copilot Copilot AI review requested due to automatic review settings February 24, 2025 22:57
@ghost ghost added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Feb 24, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

@@ -22,7 +22,7 @@ Android SDK and NDK can be automatically installed via the following script:
#!/usr/bin/env bash
set -e

NDK_VER=r23c
NDK_VER=r27c
Copy link
Member

Choose a reason for hiding this comment

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

Should we update our codespaces container definition? (I can do it, just want to make sure its the right thing to do)

Copy link
Contributor Author

@jkurdek jkurdek Feb 25, 2025

Choose a reason for hiding this comment

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

Yes we should update the codespaces, we have upgraded the NDK version to 27c on the CI. This is also true about .NET 9.


The Android NDK LTS version is released annually. CI pipelines retrieve the NDK version from Docker images hosted in the [dotnet-buildtools-prereqs-docker](https://github.com/dotnet/dotnet-buildtools-prereqs-docker) repository.
For reference, see an example Dockerfile:
[Azure Linux 3.0 .NET 10.0 Android Dockerfile](https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/main/src/azurelinux/3.0/net10.0/android/amd64/Dockerfile).
Copy link
Member

Choose a reason for hiding this comment

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

Best to use sha-specific links.

- Ensure **AOT** and **AOT_WITH_LIBRARY_FILES** are enabled in the build.

### 2. Test the New NDK in CI and Fix Issues
- Create a new Docker image containing the updated NDK version.
Copy link
Member

Choose a reason for hiding this comment

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

This seems to be missing some important steps. How does that related to the prereqs repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bumping version of the NDK in the prereqs repo will automatically propagate it to all CI runs. What we need is a mechanism of verifying that bumping the NDK will not break the CI before doing that. Since NDK version is defined in a separate repo this becomes a bit messy.

There are several ways of doing this:

  • Create a mock image based on the one coming from prereqs and run another PR to test the CI (CI is verified in a separate PR which is not ideal)
  • Create a new image in prereqs repo and update the reference to it on runtime side (change is verified in the same PR but now we need to create a new image every time we bump a dependency)
  • Modify the original image to have multiple NDK versions and in the runtime PR change the env variable to point to the new one, remove the old NDK version after the runtime change is verified. (A lot of modifications for one change)

Copy link
Member

Choose a reason for hiding this comment

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

Do you mean "new" or "existing" image? Your response seems to suggest "existing". How do you know that you've updated all of them?
 
We're having that same discussion here: dotnet/dotnet-buildtools-prereqs-docker#1371


## Upgrading the Android NDK Version in CI Pipelines

The Android NDK LTS version is released annually. CI pipelines retrieve the NDK version from Docker images hosted in the [dotnet-buildtools-prereqs-docker](https://github.com/dotnet/dotnet-buildtools-prereqs-docker) repository.
Copy link
Member

Choose a reason for hiding this comment

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

It would be good to cover:

  • Which month (or quarter) we expect this in and if adopting RCs is important.
  • What we need to do in main vs release/ and if the MAUI support timeframe gives us a degree of freedom in release/.

@am11 am11 added area-Meta os-android and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Apr 22, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-meta
See info in area-owners.md if you want to be subscribed.

@akoeplinger
Copy link
Member

/ba-g markdown change, skipped pipelines

@vitek-karas vitek-karas merged commit 3da7264 into dotnet:main Apr 23, 2025
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Meta documentation Documentation bug or enhancement, does not impact product or test code os-android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants