Skip to content

Commit 6ef11b8

Browse files
committed
Auto merge of #120593 - maurer:android-bump, r=Mark-Simulacrum,workingjubilee
Update Android in CI We are currently using a 10+ year old Android image, and it has caused trouble when working on #120326. Our current NDK (25) only supports API 19+, so we were already out of spec. This PR: 1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets. 2. Bumps the NDK to 26b try-job: arm-android
2 parents 48bbe12 + 8bf9aea commit 6ef11b8

File tree

7 files changed

+15
-12
lines changed

7 files changed

+15
-12
lines changed

config.example.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@
395395
#metrics = false
396396

397397
# Specify the location of the Android NDK. Used when targeting Android.
398-
#android-ndk = "/path/to/android-ndk-r25b"
398+
#android-ndk = "/path/to/android-ndk-r26d"
399399

400400
# =============================================================================
401401
# General install configuration options

src/bootstrap/src/utils/cc_detect.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -247,18 +247,16 @@ pub(crate) fn ndk_compiler(compiler: Language, triple: &str, ndk: &Path) -> Path
247247
triple.to_string()
248248
};
249249

250-
// API 19 is the earliest API level supported by NDK r25b but AArch64 and x86_64 support
251-
// begins at API level 21.
252-
let api_level =
253-
if triple.contains("aarch64") || triple.contains("x86_64") { "21" } else { "19" };
250+
// The earliest API supported by NDK r26d is 21.
251+
let api_level = "21";
254252
let compiler = format!("{}{}-{}", triple_translated, api_level, compiler.clang());
255253
let host_tag = if cfg!(target_os = "macos") {
256254
// The NDK uses universal binaries, so this is correct even on ARM.
257255
"darwin-x86_64"
258256
} else if cfg!(target_os = "windows") {
259257
"windows-x86_64"
260258
} else {
261-
// NDK r25b only has official releases for macOS, Windows and Linux.
259+
// NDK r26d only has official releases for macOS, Windows and Linux.
262260
// Try the Linux directory everywhere else, on the assumption that the OS has an
263261
// emulation layer that can cope (e.g. BSDs).
264262
"linux-x86_64"

src/bootstrap/src/utils/change_tracker.rs

+5
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
210210
severity: ChangeSeverity::Info,
211211
summary: "the `wasm-component-ld` tool is now built as part of `build.extended` and can be a member of `build.tools`",
212212
},
213+
ChangeInfo {
214+
change_id: 120593,
215+
severity: ChangeSeverity::Info,
216+
summary: "Removed android-ndk r25b support in favor of android-ndk r26d.",
217+
},
213218
];

src/ci/docker/host-x86_64/arm-android/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN sh /scripts/android-base-apt-get.sh
66

77
COPY scripts/android-ndk.sh /scripts/
88
RUN . /scripts/android-ndk.sh && \
9-
download_ndk android-ndk-r25b-linux.zip
9+
download_ndk android-ndk-r26d-linux.zip
1010

1111
RUN dpkg --add-architecture i386 && \
1212
apt-get update && \
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
emulator emulator-linux-5264690.zip 48c1cda2bdf3095d9d9d5c010fbfb3d6d673e3ea
22
patcher;v4 3534162-studio.sdk-patcher.zip 046699c5e2716ae11d77e0bad814f7f33fab261e
3-
platform-tools platform-tools_r28.0.2-linux.zip 46a4c02a9b8e4e2121eddf6025da3c979bf02e28
4-
platforms;android-18 android-18_r03.zip e6b09b3505754cbbeb4a5622008b907262ee91cb
5-
system-images;android-18;default;armeabi-v7a sys-img/android/armeabi-v7a-18_r05.zip 580b583720f7de671040d5917c8c9db0c7aa03fd
3+
platform-tools platform-tools_r34.0.5-linux.zip 96097475cf7b279fdd8f218f5d043ffe94104ec3
4+
platforms;android-21 android-21_r02.zip 53536556059bb29ae82f414fd2e14bc335a4eb4c
5+
system-images;android-21;default;armeabi-v7a sys-img/android/armeabi-v7a-21_r04.zip 8c606f81306564b65e41303d2603e4c42ded0d10
66
tools sdk-tools-linux-4333796.zip 8c7c28554a32318461802c1291d76fccfafde054

src/ci/docker/host-x86_64/dist-android/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN sh /scripts/android-base-apt-get.sh
66
# ndk
77
COPY scripts/android-ndk.sh /scripts/
88
RUN . /scripts/android-ndk.sh && \
9-
download_ndk android-ndk-r25b-linux.zip
9+
download_ndk android-ndk-r26d-linux.zip
1010

1111
# env
1212
ENV TARGETS=arm-linux-androideabi

src/ci/docker/scripts/android-start-emulator.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export SHELL=/bin/bash
1010
# the emulator date is set to unix epoch (in armeabi-v7a-18 image). Using
1111
# classic engine the emulator starts with the current date and the tests run
1212
# fine. If another image is used, this need to be evaluated again.
13-
nohup nohup emulator @armeabi-v7a-18 \
13+
nohup nohup emulator @armeabi-v7a-21 \
1414
-engine classic -no-window -partition-size 2047 0<&- &>/dev/null &
1515

1616
exec "$@"

0 commit comments

Comments
 (0)