Fix android ci
This commit is contained in:
parent
42b24bf704
commit
a9115d5e4b
|
@ -1,15 +0,0 @@
|
||||||
#!/usr/bin/expect -f
|
|
||||||
# ignore-license
|
|
||||||
|
|
||||||
set timeout 1800
|
|
||||||
set cmd [lindex $argv 0]
|
|
||||||
set licenses [lindex $argv 1]
|
|
||||||
|
|
||||||
spawn {*}$cmd
|
|
||||||
expect {
|
|
||||||
"Do you accept the license '*'*" {
|
|
||||||
exp_send "y\r"
|
|
||||||
exp_continue
|
|
||||||
}
|
|
||||||
eof
|
|
||||||
}
|
|
|
@ -19,10 +19,8 @@ set -ex
|
||||||
# which apparently magically accepts the licenses.
|
# which apparently magically accepts the licenses.
|
||||||
|
|
||||||
mkdir sdk
|
mkdir sdk
|
||||||
curl https://dl.google.com/android/repository/tools_r25.2.5-linux.zip -O
|
curl https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip -O
|
||||||
unzip -d sdk tools_r25.2.5-linux.zip
|
unzip -d sdk sdk-tools-linux-3859397.zip
|
||||||
|
|
||||||
filter="platform-tools,android-24"
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
arm | armv7)
|
arm | armv7)
|
||||||
|
@ -47,11 +45,16 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
esac;
|
esac;
|
||||||
|
|
||||||
filter="$filter,sys-img-$abi-android-24"
|
# --no_https avoids
|
||||||
|
# javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
|
||||||
|
echo "yes" | \
|
||||||
|
./sdk/tools/bin/sdkmanager --no_https \
|
||||||
|
"emulator" \
|
||||||
|
"platform-tools" \
|
||||||
|
"platforms;android-24" \
|
||||||
|
"system-images;android-24;default;$abi"
|
||||||
|
|
||||||
./android-accept-licenses.sh "android - update sdk -a --no-ui --filter $filter --no-https"
|
echo "no" |
|
||||||
|
./sdk/tools/bin/avdmanager create avd \
|
||||||
echo "no" | android create avd \
|
--name $1 \
|
||||||
--name $1 \
|
--package "system-images;android-24;default;$abi"
|
||||||
--target android-24 \
|
|
||||||
--abi $abi
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
|
||||||
RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
|
RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
|
||||||
RUN mv /root/.android /tmp
|
RUN mv /root/.android /tmp
|
||||||
RUN chmod 777 -R /tmp/.android
|
RUN chmod 777 -R /tmp/.android
|
||||||
RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
|
RUN chmod 755 /android/sdk/tools/* /android/sdk/emulator/qemu/linux-x86_64/*
|
||||||
|
|
||||||
ENV PATH=$PATH:/rust/bin \
|
ENV PATH=$PATH:/rust/bin \
|
||||||
CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android-gcc \
|
CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android-gcc \
|
||||||
|
@ -38,7 +38,7 @@ ENTRYPOINT [ \
|
||||||
"-c", \
|
"-c", \
|
||||||
# set SHELL so android can detect a 64bits system, see
|
# set SHELL so android can detect a 64bits system, see
|
||||||
# http://stackoverflow.com/a/41789144
|
# http://stackoverflow.com/a/41789144
|
||||||
"SHELL=/bin/dash emulator @aarch64 -no-window & \
|
"SHELL=/bin/dash /android/sdk/emulator/emulator @aarch64 -no-window & \
|
||||||
rustc /tmp/runtest.rs -o /tmp/runtest && \
|
rustc /tmp/runtest.rs -o /tmp/runtest && \
|
||||||
exec \"$@\"", \
|
exec \"$@\"", \
|
||||||
"--" \
|
"--" \
|
||||||
|
|
|
@ -25,7 +25,7 @@ RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
|
||||||
RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
|
RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
|
||||||
RUN mv /root/.android /tmp
|
RUN mv /root/.android /tmp
|
||||||
RUN chmod 777 -R /tmp/.android
|
RUN chmod 777 -R /tmp/.android
|
||||||
RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
|
RUN chmod 755 /android/sdk/tools/* /android/sdk/emulator/qemu/linux-x86_64/*
|
||||||
|
|
||||||
ENV PATH=$PATH:/rust/bin \
|
ENV PATH=$PATH:/rust/bin \
|
||||||
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \
|
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \
|
||||||
|
@ -38,7 +38,7 @@ ENTRYPOINT [ \
|
||||||
"-c", \
|
"-c", \
|
||||||
# set SHELL so android can detect a 64bits system, see
|
# set SHELL so android can detect a 64bits system, see
|
||||||
# http://stackoverflow.com/a/41789144
|
# http://stackoverflow.com/a/41789144
|
||||||
"SHELL=/bin/dash emulator @arm -no-window & \
|
"SHELL=/bin/dash /android/sdk/emulator/emulator @arm -no-window & \
|
||||||
rustc /tmp/runtest.rs -o /tmp/runtest && \
|
rustc /tmp/runtest.rs -o /tmp/runtest && \
|
||||||
exec \"$@\"", \
|
exec \"$@\"", \
|
||||||
"--" \
|
"--" \
|
||||||
|
|
|
@ -25,7 +25,7 @@ RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
|
||||||
RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
|
RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
|
||||||
RUN mv /root/.android /tmp
|
RUN mv /root/.android /tmp
|
||||||
RUN chmod 777 -R /tmp/.android
|
RUN chmod 777 -R /tmp/.android
|
||||||
RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
|
RUN chmod 755 /android/sdk/tools/* /android/sdk/emulator/qemu/linux-x86_64/*
|
||||||
|
|
||||||
ENV PATH=$PATH:/rust/bin \
|
ENV PATH=$PATH:/rust/bin \
|
||||||
CARGO_TARGET_I686_LINUX_ANDROID_LINKER=i686-linux-android-gcc \
|
CARGO_TARGET_I686_LINUX_ANDROID_LINKER=i686-linux-android-gcc \
|
||||||
|
@ -38,7 +38,7 @@ ENTRYPOINT [ \
|
||||||
"-c", \
|
"-c", \
|
||||||
# set SHELL so android can detect a 64bits system, see
|
# set SHELL so android can detect a 64bits system, see
|
||||||
# http://stackoverflow.com/a/41789144
|
# http://stackoverflow.com/a/41789144
|
||||||
"SHELL=/bin/dash emulator @i686 -no-window -no-accel & \
|
"SHELL=/bin/dash /android/sdk/emulator/emulator @i686 -no-window -no-accel & \
|
||||||
rustc /tmp/runtest.rs -o /tmp/runtest && \
|
rustc /tmp/runtest.rs -o /tmp/runtest && \
|
||||||
exec \"$@\"", \
|
exec \"$@\"", \
|
||||||
"--" \
|
"--" \
|
||||||
|
|
Loading…
Reference in New Issue