mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
[github-actions] remove android-ndk platform and CI job (#12654)
This commit removes the `android-ndk` platform support from the `script/cmake-build` script and deletes the associated CI job from the GitHub Actions workflow. The `android-ndk` build was used to verify OpenThread compatibility with the Android NDK. However, since OpenThread is now officially included in the Android platform, maintaining a separate NDK-based build in this repository is no longer necessary. Changes: - Remove `android-ndk` from `OT_PLATFORMS` in `script/cmake-build`. - Remove NDK-specific configuration logic in `script/cmake-build`. - Remove the `android-ndk` job from `.github/workflows/build.yml`.
This commit is contained in:
@@ -376,33 +376,3 @@ jobs:
|
||||
run: |
|
||||
script/check-posix-build
|
||||
script/check-simulation-build
|
||||
|
||||
android-ndk:
|
||||
name: android-ndk
|
||||
runs-on: ubuntu-24.04
|
||||
container:
|
||||
image: openthread/environment
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install unzip
|
||||
run: apt update && apt install -y unzip
|
||||
- name: Setup NDK
|
||||
id: setup-ndk
|
||||
uses: nttld/setup-ndk@afb4c9964b521afb97c864b7d40b11e6911bd410 # v1.5.0
|
||||
with:
|
||||
ndk-version: r25c
|
||||
local-cache: true
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
NDK: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||
run: |
|
||||
rm -rf build/ && OT_CMAKE_NINJA_TARGET="ot-daemon ot-ctl" script/cmake-build android-ndk
|
||||
rm -rf build/ && OT_CMAKE_NINJA_TARGET="ot-cli" script/cmake-build android-ndk
|
||||
|
||||
+1
-53
@@ -67,7 +67,7 @@ OT_CMAKE_NINJA_TARGET=${OT_CMAKE_NINJA_TARGET-}
|
||||
OT_SRCDIR="$(cd "$(dirname "$0")"/.. && pwd)"
|
||||
readonly OT_SRCDIR
|
||||
|
||||
OT_PLATFORMS=(simulation posix android-ndk)
|
||||
OT_PLATFORMS=(simulation posix)
|
||||
readonly OT_PLATFORMS
|
||||
|
||||
OT_CLEAN_INTERMEDIATES="${OT_CLEAN_INTERMEDIATES-${GITHUB_ACTION-}}"
|
||||
@@ -166,58 +166,6 @@ main()
|
||||
)
|
||||
|
||||
case "${platform}" in
|
||||
android-ndk)
|
||||
if [ -z "${NDK-}" ]; then
|
||||
echo "
|
||||
The 'NDK' environment variable needs to point to the Android NDK toolchain.
|
||||
Please ensure the NDK is downloaded and extracted then try to run this script again
|
||||
|
||||
For example:
|
||||
NDK=/opt/android-ndk-r25c ./script/cmake-build-android
|
||||
|
||||
You can download the NDK at https://developer.android.com/ndk/downloads
|
||||
|
||||
"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NDK_CMAKE_TOOLCHAIN_FILE="${NDK?}/build/cmake/android.toolchain.cmake"
|
||||
if [ ! -f "${NDK_CMAKE_TOOLCHAIN_FILE}" ]; then
|
||||
echo "
|
||||
Could not fild the Android NDK CMake toolchain file
|
||||
- NDK=${NDK}
|
||||
- NDK_CMAKE_TOOLCHAIN_FILE=${NDK_CMAKE_TOOLCHAIN_FILE}
|
||||
|
||||
"
|
||||
exit 2
|
||||
fi
|
||||
local_options+=(
|
||||
"-DOT_LOG_OUTPUT=PLATFORM_DEFINED"
|
||||
|
||||
# Add Android NDK flags
|
||||
"-DOT_ANDROID_NDK=1"
|
||||
"-DCMAKE_TOOLCHAIN_FILE=${NDK?}/build/cmake/android.toolchain.cmake"
|
||||
|
||||
# Android API needs to be >= android-24 for `getifsaddrs()`
|
||||
"-DANDROID_PLATFORM=android-24"
|
||||
|
||||
# Store thread settings in the CWD when executing ot-cli or ot-daemon
|
||||
'-DOT_POSIX_SETTINGS_PATH="./thread"'
|
||||
)
|
||||
|
||||
# Rewrite platform to posix
|
||||
platform="posix"
|
||||
|
||||
# Check if OT_DAEMON or OT_APP_CLI flags are needed
|
||||
if [[ ${OT_CMAKE_NINJA_TARGET[*]} =~ "ot-daemon" ]] || [[ ${OT_CMAKE_NINJA_TARGET[*]} =~ "ot-ctl" ]]; then
|
||||
local_options+=("-DOT_DAEMON=ON")
|
||||
elif [[ ${OT_CMAKE_NINJA_TARGET[*]} =~ "ot-cli" ]]; then
|
||||
local_options+=("-DOT_APP_CLI=ON")
|
||||
fi
|
||||
|
||||
options+=("${local_options[@]}")
|
||||
;;
|
||||
|
||||
posix)
|
||||
local_options+=(
|
||||
"-DOT_TCP=OFF"
|
||||
|
||||
Reference in New Issue
Block a user