Skip to content

Commit

Permalink
Update android ndk version to latest LTS(r23c): https://developer.and…
Browse files Browse the repository at this point in the history
  • Loading branch information
tiann committed Jun 22, 2022
1 parent f292633 commit b205ce8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
16 changes: 8 additions & 8 deletions ci/android-install-ndk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@

set -ex

NDK=android-ndk-r21d
wget --tries=20 -q https://dl.google.com/android/repository/${NDK}-linux-x86_64.zip
unzip -q ${NDK}-linux-x86_64.zip
NDK=android-ndk-r23c
wget --tries=20 -q https://dl.google.com/android/repository/${NDK}-linux.zip
unzip -q ${NDK}-linux.zip

case "$1" in
arm)
arch=arm
api=28
api=31
;;
armv7)
arch=arm
api=28
api=31
;;
aarch64)
arch=arm64
api=28
api=31
;;
i686)
arch=x86
api=28
api=31
;;
x86_64)
arch=x86_64
api=28
api=31
;;
*)
echo "invalid arch: $1"
Expand Down
5 changes: 3 additions & 2 deletions ci/docker/aarch64-linux-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ RUN chmod 777 -R /tmp/.android
RUN chmod 755 /android/sdk/cmdline-tools/tools/* /android/sdk/emulator/qemu/linux-x86_64/*

ENV PATH=$PATH:/rust/bin \
CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android28-clang \
CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android31-clang \
CARGO_TARGET_AARCH64_LINUX_ANDROID_RUNNER=/tmp/runtest \
CC_aarch64_linux_android=aarch64-linux-android28-clang \
CC_aarch64_linux_android=aarch64-linux-android31-clang \
AR_aarch64_linux_android=llvm-ar \
HOME=/tmp

ADD runtest-android.rs /tmp/runtest.rs
Expand Down
1 change: 1 addition & 0 deletions ci/docker/arm-linux-androideabi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ ENV PATH=$PATH:/rust/bin \
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_RUNNER=/tmp/runtest \
CC_arm_linux_androideabi=arm-linux-androideabi-gcc \
AR_arm-linux-androideabi=llvm-ar \
HOME=/tmp

ADD runtest-android.rs /tmp/runtest.rs
Expand Down
5 changes: 3 additions & 2 deletions ci/docker/i686-linux-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ RUN chmod 777 -R /tmp/.android
RUN chmod 755 /android/sdk/cmdline-tools/tools/* /android/sdk/emulator/qemu/linux-x86_64/*

ENV PATH=$PATH:/rust/bin \
CARGO_TARGET_I686_LINUX_ANDROID_LINKER=i686-linux-android-gcc \
CARGO_TARGET_I686_LINUX_ANDROID_LINKER=i686-linux-android31-clang \
CARGO_TARGET_I686_LINUX_ANDROID_RUNNER=/tmp/runtest \
CC_i686_linux_android=i686-linux-android-gcc \
CC_i686_linux_android=i686-linux-android31-clang \
AR_i686_linux_android=llvm-ar \
HOME=/tmp

ADD runtest-android.rs /tmp/runtest.rs
Expand Down
7 changes: 4 additions & 3 deletions ci/docker/x86_64-linux-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ COPY android-sysimage.sh /android/
RUN bash /android/android-sysimage.sh x86_64 x86_64-24_r07.zip

ENV PATH=$PATH:/rust/bin:/android/ndk-$ANDROID_ARCH/bin \
CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER=x86_64-linux-android-gcc \
CC_x86_64_linux_android=x86_64-linux-android-gcc \
CXX_x86_64_linux_android=x86_64-linux-android-g++ \
CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER=x86_64-linux-android31-clang \
CC_x86_64_linux_android=x86_64-linux-android31-clang \
AR_x86_64_linux_android=llvm-ar \
CXX_x86_64_linux_android=x86_64-linux-android31-clang++ \
HOME=/tmp

0 comments on commit b205ce8

Please sign in to comment.