Skip to content

Commit

Permalink
Upgrade to NDK r27c for Android builds on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Nov 19, 2024
1 parent f9015bb commit 0c24c98
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/actions/deploy-ubuntu/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ runs:
fi
if [[ $CI_DEPLOY_PLATFORM == android-* ]]; then
curl -LO https://dl.google.com/android/repository/android-ndk-r21e-linux-x86_64.zip
unzip -qq android-ndk-r21e-linux-x86_64.zip
ln -sf android-ndk-r21e android-ndk
curl -LO https://dl.google.com/android/repository/android-ndk-r27c-linux.zip
unzip -qq android-ndk-r27c-linux.zip
ln -sf android-ndk-r27c android-ndk
export MAVEN_OPTIONS="-Djavacpp.platform.root=$(pwd)/android-ndk/ -Djava.library.path="
else
export MAVEN_OPTIONS="-Djavacpp.platform.compiler=$PREFIX-g++ -Djava.library.path=/usr/$PREFIX/lib/:/usr/lib/$PREFIX/:$USERLAND_PATH/build/lib/"
Expand Down
10 changes: 5 additions & 5 deletions ffmpeg/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export PATH=$INSTALL_PATH/bin:$PATH
export PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/

patch -Np1 -d $LAME < ../../lame.patch
patch -Np1 -d $OPENSSL < ../../openssl-android.patch
# patch -Np1 -d $OPENSSL < ../../openssl-android.patch
patch -Np1 -d ffmpeg-$FFMPEG_VERSION < ../../ffmpeg.patch
patch -Np1 -d ffmpeg-$FFMPEG_VERSION < ../../ffmpeg-vulkan.patch
# patch -Np1 -d ffmpeg-$FFMPEG_VERSION < ../../ffmpeg-flv-support-hevc-opus.patch
Expand Down Expand Up @@ -197,7 +197,7 @@ case $PLATFORM in
make install
cd ../$OPENSSL
PATH="${ANDROID_CC%/*}:$ANDROID_BIN/bin:$PATH" ./Configure --prefix=$INSTALL_PATH --libdir=lib android-arm no-shared no-tests -D__ANDROID_API__=24
ANDROID_DEV="$ANDROID_ROOT/usr" make -s -j $MAKEJ
PATH="${ANDROID_CC%/*}:$ANDROID_BIN/bin:$PATH" ANDROID_DEV="$ANDROID_ROOT/usr" make -s -j $MAKEJ
make install_dev
cd ../srt-$LIBSRT_VERSION
patch -Np1 < ../../../srt-android.patch || true
Expand Down Expand Up @@ -353,7 +353,7 @@ EOF
make install
cd ../$OPENSSL
PATH="${ANDROID_CC%/*}:$ANDROID_BIN/bin:$PATH" ./Configure --prefix=$INSTALL_PATH --libdir=lib android-arm64 no-shared no-tests -D__ANDROID_API__=24
ANDROID_DEV="$ANDROID_ROOT/usr" make -s -j $MAKEJ
PATH="${ANDROID_CC%/*}:$ANDROID_BIN/bin:$PATH" ANDROID_DEV="$ANDROID_ROOT/usr" make -s -j $MAKEJ
make install_dev
cd ../srt-$LIBSRT_VERSION
patch -Np1 < ../../../srt-android.patch || true
Expand Down Expand Up @@ -508,7 +508,7 @@ EOF
make install
cd ../$OPENSSL
PATH="${ANDROID_CC%/*}:$ANDROID_BIN/bin:$PATH" ./Configure --prefix=$INSTALL_PATH --libdir=lib android-x86 no-shared no-tests -D__ANDROID_API__=24
ANDROID_DEV="$ANDROID_ROOT/usr" make -s -j $MAKEJ
PATH="${ANDROID_CC%/*}:$ANDROID_BIN/bin:$PATH" ANDROID_DEV="$ANDROID_ROOT/usr" make -s -j $MAKEJ
make install_dev
cd ../srt-$LIBSRT_VERSION
patch -Np1 < ../../../srt-android.patch || true
Expand Down Expand Up @@ -660,7 +660,7 @@ EOF
make install
cd ../$OPENSSL
PATH="${ANDROID_CC%/*}:$ANDROID_BIN/bin:$PATH" ./Configure --prefix=$INSTALL_PATH --libdir=lib android-x86_64 no-shared no-tests -D__ANDROID_API__=24
ANDROID_DEV="$ANDROID_ROOT/usr" make -s -j $MAKEJ
PATH="${ANDROID_CC%/*}:$ANDROID_BIN/bin:$PATH" ANDROID_DEV="$ANDROID_ROOT/usr" make -s -j $MAKEJ
make install_dev
cd ../srt-$LIBSRT_VERSION
patch -Np1 < ../../../srt-android.patch || true
Expand Down
4 changes: 4 additions & 0 deletions tensorflow-lite/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,19 @@ cd build

case $PLATFORM in
android-arm)
export AR=ar
export CMAKE_FLAGS="-DCMAKE_TOOLCHAIN_FILE=${PLATFORM_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a -DANDROID_NATIVE_API_LEVEL=24 $CMAKE_FLAGS"
;;
android-arm64)
export AR=ar
export CMAKE_FLAGS="-DCMAKE_TOOLCHAIN_FILE=${PLATFORM_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DANDROID_NATIVE_API_LEVEL=24 -DXNNPACK_ENABLE_ARM_I8MM=OFF $CMAKE_FLAGS"
;;
android-x86)
export AR=ar
export CMAKE_FLAGS="-DCMAKE_TOOLCHAIN_FILE=${PLATFORM_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86 -DANDROID_NATIVE_API_LEVEL=24 $CMAKE_FLAGS"
;;
android-x86_64)
export AR=ar
export CMAKE_FLAGS="-DCMAKE_TOOLCHAIN_FILE=${PLATFORM_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64 -DANDROID_NATIVE_API_LEVEL=24 -DXNNPACK_ENABLE_AVXVNNI=OFF $CMAKE_FLAGS"
;;
linux-armhf)
Expand Down

0 comments on commit 0c24c98

Please sign in to comment.