Skip to content

Commit

Permalink
CI: Install the latest (currently) version of the LTS NDK.
Browse files Browse the repository at this point in the history
  • Loading branch information
briansmith committed Feb 16, 2023
1 parent ffcd828 commit 95948b3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mk/cargo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ qemu_mipsel="qemu-mipsel -L /usr/mipsel-linux-gnu"
# directory like `clang` that would conflict with the same-named tools that may
# be needed to compile the build script, or to compile for other targets.
if [ -n "${ANDROID_HOME-}" ]; then
ndk_version=25.1.8937393
# Keep the next line in sync with the corresponding line in install-build-tools.sh.
ndk_version=25.2.9519653
ANDROID_NDK_ROOT=${ANDROID_NDK_ROOT:-${ANDROID_HOME}/ndk/$ndk_version}
fi
if [ -n "${ANDROID_NDK_ROOT-}" ]; then
Expand Down
16 changes: 15 additions & 1 deletion mk/install-build-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,22 @@ function install_packages {
use_clang=
case $target in
--target*android*)
# https://blog.rust-lang.org/2023/01/09/android-ndk-update-r25.html says
# "Going forward the Android platform will target the most recent LTS NDK,
# allowing Rust developers to access platform features sooner. These updates
# should occur yearly and will be announced in release notes." Assume that
# means that we should always prefer to be using the latest 25.x.y version of
# the NDK until the Rust project announces that we should use a higher major
# version number.
#
# TODO: This should probably be implemented as a map of Rust toolchain version
# to NDK version; e.g. our MSRV might (only) support an older NDK than the
# latest stable Rust toolchain.
#
# Keep the following line in sync with the corresponding line in cargo.sh.
ndk_version=25.2.9519653

mkdir -p "${ANDROID_HOME}/licenses"
ndk_version=25.1.8937393
android_license_file="${ANDROID_HOME}/licenses/android-sdk-license"
accept_android_license=24333f8a63b6825ea9c5514f83c2829b004d1fee
grep --quiet --no-messages "$accept_android_license" "$android_license_file" \
Expand Down

0 comments on commit 95948b3

Please sign in to comment.