Skip to content

Commit 625937c

Browse files
bors[bot]Bromeon
andauthored
Merge #934
934: Automatically detect latest installed Android NDK r=Bromeon a=Bromeon bors r+ Co-authored-by: Jan Haller <[email protected]>
2 parents e55c804 + ec4f97b commit 625937c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/full-ci.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,16 @@ jobs:
244244
sudo apt-get update
245245
sudo apt-get install llvm-dev libclang-dev clang g++-multilib gcc-multilib libc6-dev libc6-dev-arm64-cross
246246
247+
# Relies on ls listing alphabetically, NDK versions having fixed
248+
# digits, and the folder not containing any other files
249+
- name: "Find highest Android NDK version"
250+
run: |
251+
highestNdk=$(ls $ANDROID_SDK_ROOT/ndk | tail -n1)
252+
echo "Highest Android NDK: $highestNdk"
253+
echo "ANDROID_NDK_VERSION=$highestNdk" >> $GITHUB_ENV
254+
247255
# See https://github.com/godot-rust/godot-rust/pull/920
248-
- name: "Workaround Android NDK due to Rust bug"
256+
- name: "Found version ${{ env.ANDROID_NDK_VERSION }}. Workaround Rust bug..."
249257
run: >
250258
find -L $ANDROID_SDK_ROOT/ndk/$ANDROID_NDK_VERSION -name libunwind.a
251259
-execdir sh -c 'echo "INPUT(-lunwind)" > libgcc.a' \;
@@ -256,8 +264,6 @@ jobs:
256264
export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=$ANDROID_SDK_ROOT/ndk/$ANDROID_NDK_VERSION/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang++
257265
cargo build --target aarch64-linux-android --release
258266
cargo build --target armv7-linux-androideabi --release
259-
env:
260-
ANDROID_NDK_VERSION: 25.0.8775105
261267
262268
integration-test-godot:
263269
name: itest-godot-${{ matrix.godot }}${{ matrix.postfix }}

0 commit comments

Comments
 (0)