Skip to content

Commit 20758e5

Browse files
committed
Auto merge of #825 - malbarbo:android-fix-ci, r=alexcrichton
Fix android ci
2 parents 42b24bf + a9115d5 commit 20758e5

File tree

5 files changed

+21
-33
lines changed

5 files changed

+21
-33
lines changed

ci/android-accept-licenses.sh

-15
This file was deleted.

ci/android-install-sdk.sh

+15-12
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ set -ex
1919
# which apparently magically accepts the licenses.
2020

2121
mkdir sdk
22-
curl https://dl.google.com/android/repository/tools_r25.2.5-linux.zip -O
23-
unzip -d sdk tools_r25.2.5-linux.zip
24-
25-
filter="platform-tools,android-24"
22+
curl https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip -O
23+
unzip -d sdk sdk-tools-linux-3859397.zip
2624

2725
case "$1" in
2826
arm | armv7)
@@ -47,11 +45,16 @@ case "$1" in
4745
;;
4846
esac;
4947

50-
filter="$filter,sys-img-$abi-android-24"
51-
52-
./android-accept-licenses.sh "android - update sdk -a --no-ui --filter $filter --no-https"
53-
54-
echo "no" | android create avd \
55-
--name $1 \
56-
--target android-24 \
57-
--abi $abi
48+
# --no_https avoids
49+
# javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
50+
echo "yes" | \
51+
./sdk/tools/bin/sdkmanager --no_https \
52+
"emulator" \
53+
"platform-tools" \
54+
"platforms;android-24" \
55+
"system-images;android-24;default;$abi"
56+
57+
echo "no" |
58+
./sdk/tools/bin/avdmanager create avd \
59+
--name $1 \
60+
--package "system-images;android-24;default;$abi"

ci/docker/aarch64-linux-android/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
2525
RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
2626
RUN mv /root/.android /tmp
2727
RUN chmod 777 -R /tmp/.android
28-
RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
28+
RUN chmod 755 /android/sdk/tools/* /android/sdk/emulator/qemu/linux-x86_64/*
2929

3030
ENV PATH=$PATH:/rust/bin \
3131
CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android-gcc \
@@ -38,7 +38,7 @@ ENTRYPOINT [ \
3838
"-c", \
3939
# set SHELL so android can detect a 64bits system, see
4040
# http://stackoverflow.com/a/41789144
41-
"SHELL=/bin/dash emulator @aarch64 -no-window & \
41+
"SHELL=/bin/dash /android/sdk/emulator/emulator @aarch64 -no-window & \
4242
rustc /tmp/runtest.rs -o /tmp/runtest && \
4343
exec \"$@\"", \
4444
"--" \

ci/docker/arm-linux-androideabi/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
2525
RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
2626
RUN mv /root/.android /tmp
2727
RUN chmod 777 -R /tmp/.android
28-
RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
28+
RUN chmod 755 /android/sdk/tools/* /android/sdk/emulator/qemu/linux-x86_64/*
2929

3030
ENV PATH=$PATH:/rust/bin \
3131
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \
@@ -38,7 +38,7 @@ ENTRYPOINT [ \
3838
"-c", \
3939
# set SHELL so android can detect a 64bits system, see
4040
# http://stackoverflow.com/a/41789144
41-
"SHELL=/bin/dash emulator @arm -no-window & \
41+
"SHELL=/bin/dash /android/sdk/emulator/emulator @arm -no-window & \
4242
rustc /tmp/runtest.rs -o /tmp/runtest && \
4343
exec \"$@\"", \
4444
"--" \

ci/docker/i686-linux-android/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
2525
RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
2626
RUN mv /root/.android /tmp
2727
RUN chmod 777 -R /tmp/.android
28-
RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
28+
RUN chmod 755 /android/sdk/tools/* /android/sdk/emulator/qemu/linux-x86_64/*
2929

3030
ENV PATH=$PATH:/rust/bin \
3131
CARGO_TARGET_I686_LINUX_ANDROID_LINKER=i686-linux-android-gcc \
@@ -38,7 +38,7 @@ ENTRYPOINT [ \
3838
"-c", \
3939
# set SHELL so android can detect a 64bits system, see
4040
# http://stackoverflow.com/a/41789144
41-
"SHELL=/bin/dash emulator @i686 -no-window -no-accel & \
41+
"SHELL=/bin/dash /android/sdk/emulator/emulator @i686 -no-window -no-accel & \
4242
rustc /tmp/runtest.rs -o /tmp/runtest && \
4343
exec \"$@\"", \
4444
"--" \

0 commit comments

Comments
 (0)