Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the CI to use Android NDK r25b #2956

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 5 additions & 36 deletions ci/android-install-ndk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,9 @@

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-r25b
wget --tries=20 -q https://dl.google.com/android/repository/${NDK}-linux.zip
unzip -q ${NDK}-linux.zip
mv ${NDK} "/android/ndk-${1}"

case "$1" in
arm)
arch=arm
api=28
;;
armv7)
arch=arm
api=28
;;
aarch64)
arch=arm64
api=28
;;
i686)
arch=x86
api=28
;;
x86_64)
arch=x86_64
api=28
;;
*)
echo "invalid arch: $1"
exit 1
;;
esac;

python3 ${NDK}/build/tools/make_standalone_toolchain.py \
--install-dir "/android/ndk-${1}" \
--arch "${arch}" \
--api ${api}

rm -rf ./${NDK}-linux-x86_64.zip ./${NDK}
rm -rf ./${NDK}-linux.zip
4 changes: 2 additions & 2 deletions ci/docker/aarch64-linux-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ 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-android21-clang \
CARGO_TARGET_AARCH64_LINUX_ANDROID_RUNNER=/tmp/runtest \
CC_aarch64_linux_android=aarch64-linux-android28-clang \
CC_aarch64_linux_android=aarch64-linux-android21-clang \
HOME=/tmp

ADD runtest-android.rs /tmp/runtest.rs
Expand Down
4 changes: 2 additions & 2 deletions ci/docker/arm-linux-androideabi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ 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_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=armv7a-linux-androideabi19-clang \
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_RUNNER=/tmp/runtest \
CC_arm_linux_androideabi=arm-linux-androideabi-gcc \
CC_arm_linux_androideabi=armv7a-linux-androideabi19-clang \
HOME=/tmp

ADD runtest-android.rs /tmp/runtest.rs
Expand Down
4 changes: 2 additions & 2 deletions ci/docker/i686-linux-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ 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-android19-clang \
CARGO_TARGET_I686_LINUX_ANDROID_RUNNER=/tmp/runtest \
CC_i686_linux_android=i686-linux-android-gcc \
CC_i686_linux_android=i686-linux-android19-clang \
HOME=/tmp

ADD runtest-android.rs /tmp/runtest.rs
Expand Down
6 changes: 3 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,7 @@ 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-android21-clang \
CC_x86_64_linux_android=x86_64-linux-android21-clang \
CXX_x86_64_linux_android=x86_64-linux-android21-clang++ \
HOME=/tmp