Skip to content

Commit 005ab82

Browse files
committed
Add aarch64-android testing
Updating to NDK 26d and API 21 revealed that the most recent emulator no longer runs 32-bit devices at all. Indeed, Google stopped shipping 32-bit emulator images as of API level 31. Since this architecture is more used, and current images no longer have backcompat code for 32-bit code, testing aarch64 is both important for enabling developers to ship apps that run on modern devices and to future-proof us.
1 parent a1e538c commit 005ab82

File tree

6 files changed

+56
-7
lines changed

6 files changed

+56
-7
lines changed

src/bootstrap/src/utils/change_tracker.rs

+1
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
199199
change_id: 126701,
200200
severity: ChangeSeverity::Warning,
201201
summary: "`llvm.lld` is enabled by default for the dist profile. If set to false, `lld` will not be included in the dist build.",
202+
},
202203
ChangeInfo {
203204
change_id: 120593,
204205
severity: ChangeSeverity::Info,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
FROM ubuntu:23.04
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
COPY scripts/android-base-apt-get.sh /scripts/
5+
RUN sh /scripts/android-base-apt-get.sh
6+
7+
COPY scripts/android-ndk.sh /scripts/
8+
RUN . /scripts/android-ndk.sh && \
9+
download_ndk android-ndk-r26d-linux.zip
10+
11+
RUN dpkg --add-architecture i386 && \
12+
apt-get update && \
13+
apt-get install -y --no-install-recommends \
14+
libgl1-mesa-glx \
15+
libpulse0 \
16+
libstdc++6:i386 \
17+
openjdk-8-jre-headless \
18+
tzdata \
19+
wget \
20+
python3
21+
22+
COPY scripts/android-sdk.sh /scripts/
23+
COPY scripts/android-sdk-manager.py /scripts/
24+
COPY host-x86_64/aarch64-android/android-sdk.lock /android/sdk/android-sdk.lock
25+
RUN /scripts/android-sdk.sh
26+
27+
ENV PATH=$PATH:/android/sdk/emulator
28+
ENV PATH=$PATH:/android/sdk/tools
29+
ENV PATH=$PATH:/android/sdk/platform-tools
30+
31+
ENV TARGETS=aarch64-linux-android
32+
33+
ENV RUST_CONFIGURE_ARGS --android-ndk=/android/ndk/
34+
35+
ENV SCRIPT python3 ../x.py --stage 2 test --host='' --target $TARGETS
36+
37+
COPY scripts/sccache.sh /scripts/
38+
RUN sh /scripts/sccache.sh
39+
40+
COPY scripts/android-start-emulator.sh /scripts/
41+
ENTRYPOINT ["/scripts/android-start-emulator.sh", "arm64-v8a", "auto"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
emulator emulator-linux_x64-12038310.zip fe7a96bf6fbe7b026555dd7f76b713f22a07ec8b
2+
patcher;v4 3534162-studio.sdk-patcher.zip 046699c5e2716ae11d77e0bad814f7f33fab261e
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;arm64-v8a sys-img/android/arm64-v8a-21_r04.zip c4375f1b4b4cd21a8617660e25f621cedcbd8332
6+
tools sdk-tools-linux-4333796.zip 8c7c28554a32318461802c1291d76fccfafde054

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ COPY scripts/sccache.sh /scripts/
3838
RUN sh /scripts/sccache.sh
3939

4040
COPY scripts/android-start-emulator.sh /scripts/
41-
ENTRYPOINT ["/scripts/android-start-emulator.sh"]
41+
ENTRYPOINT ["/scripts/android-start-emulator.sh", "armeabi-v7a", "classic"]

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

+4-6
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ set -ex
66
# emulator identify the system
77
export SHELL=/bin/bash
88

9-
# Using the default qemu2 engine makes time::tests::since_epoch fails because
10-
# the emulator date is set to unix epoch (in armeabi-v7a-18 image). Using
11-
# classic engine the emulator starts with the current date and the tests run
12-
# fine. If another image is used, this need to be evaluated again.
13-
nohup nohup emulator @armeabi-v7a-18 \
14-
-engine classic -no-window -partition-size 2047 0<&- &>/dev/null &
9+
nohup nohup emulator @$1-21 \
10+
-engine $2 -no-window -no-audio -partition-size 2047 0<&- &>/dev/null &
11+
12+
shift 2
1513

1614
exec "$@"

src/ci/github-actions/jobs.yml

+3
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ auto:
115115
- image: arm-android
116116
<<: *job-linux-4c
117117

118+
- image: aarch64-android
119+
<<: *job-linux-8c
120+
118121
- image: armhf-gnu
119122
<<: *job-linux-4c
120123

0 commit comments

Comments
 (0)