Open
Show file tree
Hide file tree
Changes from all commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Failed to load files.
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,26 +98,26 @@ jobs:
id: cache_ndk
uses: actions/cache@v3
with:
path: /tmp/android-ndk-r21e
key: android-ndk-${{ matrix.os }}-r21e
path: /tmp/android-ndk-r23c
key: android-ndk-${{ matrix.os }}-r23c

- name: Check cached NDK
shell: bash
if: steps.cache_ndk.outputs.cache-hit != 'true'
run: |
# If the NDK failed to download from the cache, but there is a
# /tmp/android-ndk-r21e directory, it's incomplete, so remove it.
if [[ -d "/tmp/android-ndk-r21e" ]]; then
# /tmp/android-ndk-r23c directory, it's incomplete, so remove it.
if [[ -d "/tmp/android-ndk-r23c" ]]; then
echo "Removing incomplete download of NDK"
rm -rf /tmp/android-ndk-r21e
rm -rf /tmp/android-ndk-r23c
fi

- name: Install prerequisites
shell: bash
run: |
build_scripts/android/install_prereqs.sh
echo "NDK_ROOT=/tmp/android-ndk-r21e" >> $_ENV
echo "ANDROID_NDK_HOME=/tmp/android-ndk-r21e" >> $_ENV
echo "NDK_ROOT=/tmp/android-ndk-r23c" >> $_ENV
echo "ANDROID_NDK_HOME=/tmp/android-ndk-r23c" >> $_ENV

- name: Add strings.exe to PATH (Windows only)
if: startsWith(matrix.os, 'windows')
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -267,8 +267,8 @@ jobs:
id: cache_ndk
uses: actions/cache@v3
with:
path: /tmp/android-ndk-r21e
key: android-ndk-${{ runner.os }}-r21e
path: /tmp/android-ndk-r23c
key: android-ndk-${{ runner.os }}-r23c

- name: install prerequisites
run: sdk-src/build_scripts/android/install_prereqs.sh
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -436,8 +436,8 @@ jobs:
id: cache_ndk
uses: actions/cache@v3
with:
path: /tmp/android-ndk-r21e
key: android-ndk-${{ matrix.os }}-r21e
path: /tmp/android-ndk-r23c
key: android-ndk-${{ matrix.os }}-r23c
- name: Setup python
uses: actions/setup-python@v4
with:
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,15 +27,15 @@ absbuildpath=$( pwd -P )
cd "${origpath}"

# If NDK_ROOT is not set or is the wrong version, use to the version in /tmp.
if [[ -z "${NDK_ROOT}" || -z $(grep "Pkg\.Revision = 21\." "${NDK_ROOT}/source.properties") ]]; then
if [[ ! -d /tmp/android-ndk-r21e ]]; then
echo "Recommended NDK version r21e not present in /tmp."
if [[ -z "${NDK_ROOT}" || -z $(grep "Pkg\.Revision = 23\." "${NDK_ROOT}/source.properties") ]]; then
if [[ ! -d /tmp/android-ndk-r23c ]]; then
echo "Recommended NDK version r23c not present in /tmp."
echo "Please run install_prereqs.sh if you wish to use the recommended NDK version."
echo "Continuing with default NDK..."
sleep 2
fi
export NDK_ROOT=/tmp/android-ndk-r21e
export ANDROID_NDK_HOME=/tmp/android-ndk-r21e
export NDK_ROOT=/tmp/android-ndk-r23c
export ANDROID_NDK_HOME=/tmp/android-ndk-r23c
fi
cd "${sourcepath}"
set +e
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -60,13 +60,13 @@ if [[ -z "${ANDROID_HOME}" ]]; then
exit 1
fi

if [[ -z "${NDK_ROOT}" || -z $(grep "Pkg\.Revision = 21\." "${NDK_ROOT}/source.properties") ]]; then
if [[ -d /tmp/android-ndk-r21e && \
-n $(grep "Pkg\.Revision = 21\." "/tmp/android-ndk-r21e/source.properties") ]]; then
echo "Using NDK r21e in /tmp/android-ndk-r21e".
if [[ -z "${NDK_ROOT}" || -z $(grep "Pkg\.Revision = 23\." "${NDK_ROOT}/source.properties") ]]; then
if [[ -d /tmp/android-ndk-r23c && \
-n $(grep "Pkg\.Revision = 23\." "/tmp/android-ndk-r23c/source.properties") ]]; then
echo "Using NDK r23c in /tmp/android-ndk-r23c".
else
echo "NDK_ROOT environment variable is not set, or NDK version is incorrect."
echo "This build recommends NDK r21e, downloading..."
echo "This build recommends NDK r23c, downloading..."
if [[ -z $(which curl) ]]; then
echo "Error, could not run 'curl' to download NDK. Is it in your PATH?"
exit 1
Expand All@@ -77,12 +77,12 @@ if [[ -z "${NDK_ROOT}" || -z $(grep "Pkg\.Revision = 21\." "${NDK_ROOT}/source.p
for retry in {1..10} error; do
if [[ $retry == "error" ]]; then exit 5; fi
curl --http1.1 -LSs \
"https://dl.google.com/android/repository/android-ndk-r21e-${platform}-x86_64.zip" \
--output /tmp/android-ndk-r21e.zip && break
"https://dl.google.com/android/repository/android-ndk-r23c-${platform}.zip" \
--output /tmp/android-ndk-r23c.zip && break
sleep 300
done
set -e
(cd /tmp && unzip -oq android-ndk-r21e.zip && rm -f android-ndk-r21e.zip)
echo "NDK r21e has been downloaded into /tmp/android-ndk-r21e"
(cd /tmp && unzip -oq android-ndk-r23c.zip && rm -f android-ndk-r23c.zip)
echo "NDK r23c has been downloaded into /tmp/android-ndk-r23c"
fi
fi
Original file line numberDiff line numberDiff line change
Expand Up@@ -74,8 +74,8 @@ fi

if [[ "${TEST_ONLY}" == "" ]]; then
if [[ "${PLATFORM}" == "Android" ]]; then
echo "NDK_ROOT=/tmp/android-ndk-r21e" >> $_ENV
echo "ANDROID_NDK_HOME=/tmp/android-ndk-r21e" >> $_ENV
echo "NDK_ROOT=/tmp/android-ndk-r23c" >> $_ENV
echo "ANDROID_NDK_HOME=/tmp/android-ndk-r23c" >> $_ENV
build_scripts/android/install_prereqs.sh
elif [[ "${PLATFORM}" == "iOS" ]]; then
build_scripts/ios/install_prereqs.sh
Expand Down
Loading