Skip to content

Commit 942077a

Browse files
cynthiajoanCynthia Jiang
andauthored
fix ndk build issue (#366)
* u3d version? * more print out for u3d * fix ndk build issue Co-authored-by: Cynthia Jiang <[email protected]>
1 parent 3015321 commit 942077a

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

.github/workflows/build_android.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,24 @@ jobs:
7474
with:
7575
python-version: '3.7'
7676

77+
- name: Cache NDK
78+
id: cache_ndk
79+
uses: actions/cache@v2
80+
with:
81+
path: /tmp/android-ndk-r21e
82+
key: android-ndk-${{ matrix.os }}-r21e
83+
84+
- name: Check cached NDK
85+
shell: bash
86+
if: steps.cache_ndk.outputs.cache-hit != 'true'
87+
run: |
88+
# If the NDK failed to download from the cache, but there is a
89+
# /tmp/android-ndk-r21e directory, it's incomplete, so remove it.
90+
if [[ -d "/tmp/android-ndk-r21e" ]]; then
91+
echo "Removing incomplete download of NDK"
92+
rm -rf /tmp/android-ndk-r21e
93+
fi
94+
7795
- name: Install prerequisites
7896
shell: bash
7997
run: |
@@ -82,13 +100,8 @@ jobs:
82100
python scripts/gha/install_prereqs_desktop.py
83101
build_scripts/android/install_prereqs.sh
84102
cd ..
85-
86-
- name: Cache NDK
87-
id: cache_ndk
88-
uses: actions/cache@v2
89-
with:
90-
path: /tmp/android-ndk-r21e
91-
key: android-ndk-${{ matrix.os }}-r21e
103+
echo "NDK_ROOT=/tmp/android-ndk-r21e" >> $GITHUB_ENV
104+
echo "ANDROID_NDK_HOME=/tmp/android-ndk-r21e" >> $GITHUB_ENV
92105
93106
- name: Install Unity installer (U3D)
94107
shell: bash

0 commit comments

Comments
 (0)