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 ndk version to r23c #1692

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/android.yml
Original file line number Diff line number Diff 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" >> $GITHUB_ENV
echo "ANDROID_NDK_HOME=/tmp/android-ndk-r21e" >> $GITHUB_ENV
echo "NDK_ROOT=/tmp/android-ndk-r23c" >> $GITHUB_ENV
echo "ANDROID_NDK_HOME=/tmp/android-ndk-r23c" >> $GITHUB_ENV

- name: Add strings.exe to PATH (Windows only)
if: startsWith(matrix.os, 'windows')
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cpp-packaging.yml
Original file line number Diff line number Diff 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
4 changes: 2 additions & 2 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff 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
10 changes: 5 additions & 5 deletions build_scripts/android/build.sh
Original file line number Diff line number Diff 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
18 changes: 9 additions & 9 deletions build_scripts/android/install_prereqs.sh
Original file line number Diff line number Diff 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
5 changes: 5 additions & 0 deletions release_build_files/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,11 @@ workflow use only during the development of your app, not for publicly shipping
code.

## Release Notes
### Upcoming
- Changes
- GGeneral (Android): Firebase C++ on Android is now built against NDK
version r23c.

### 12.6.0
- Changes
- General (iOS): Update to Firebase Cocoapods version 11.8.1.
Expand Down
4 changes: 2 additions & 2 deletions scripts/gha/install_test_workflow_prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ fi

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