From 6d142e8dfb9fa7985f9f416f9f6f6ae260ec6763 Mon Sep 17 00:00:00 2001 From: Kangping Date: Thu, 4 Aug 2022 22:23:18 +0800 Subject: [PATCH] [build] fix Android builds (#231) 1. `android/sdk/ndk-bundle` was moved to `android/sdk/ndk/$API` 2. macos-10.15 was deprecated by macos-12 --- .github/workflows/android-app-build.yml | 4 ++-- .github/workflows/android-app-release.yml | 4 ++-- .github/workflows/build.yml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/android-app-build.yml b/.github/workflows/android-app-build.yml index 23e4c7921..4f9c779a2 100644 --- a/.github/workflows/android-app-build.yml +++ b/.github/workflows/android-app-build.yml @@ -37,7 +37,7 @@ jobs: matrix: android-api: [24] android-abi: [x86, x86_64] - os: [macos-10.15, ubuntu-20.04] + os: [macos-12, ubuntu-20.04] steps: - uses: actions/checkout@v2 - name: Bootstrap @@ -46,7 +46,7 @@ jobs: - name: Build run: | cd android - ANDROID_ABI=${{ matrix.android-abi }} ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle ./build-commissioner-libs.sh + ANDROID_ABI=${{ matrix.android-abi }} ANDROID_NDK_HOME=$(find $ANDROID_HOME/ndk -name "24.*") ./build-commissioner-libs.sh cd openthread_commissioner ./gradlew build - name: Tests diff --git a/.github/workflows/android-app-release.yml b/.github/workflows/android-app-release.yml index 00aae91aa..a94b18843 100644 --- a/.github/workflows/android-app-release.yml +++ b/.github/workflows/android-app-release.yml @@ -49,8 +49,8 @@ jobs: - name: Build APK run: | cd android - ANDROID_ABI=armeabi-v7a ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle ./build-commissioner-libs.sh - ANDROID_ABI=arm64-v8a ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle ./build-commissioner-libs.sh + ANDROID_ABI=armeabi-v7a ANDROID_NDK_HOME=$(find $ANDROID_HOME/ndk -name "24.*") ./build-commissioner-libs.sh + ANDROID_ABI=arm64-v8a ANDROID_NDK_HOME=$(find $ANDROID_HOME/ndk -name "24.*") ./build-commissioner-libs.sh cd openthread_commissioner ./gradlew assembleDebug diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8a486f01..ba06193d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -126,7 +126,7 @@ jobs: ./tests/interpreter-test macos: - runs-on: macos-10.15 + runs-on: macos-12 steps: - uses: actions/checkout@v2 - name: Bootstrap @@ -161,7 +161,7 @@ jobs: run: | mkdir build && cd build cmake -GNinja \ - -DCMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/ndk-bundle/build/cmake/android.toolchain.cmake \ + -DCMAKE_TOOLCHAIN_FILE=$(find $ANDROID_HOME/ndk -name "24.*")/build/cmake/android.toolchain.cmake \ -DANDROID_ABI="armeabi-v7a" \ -DANDROID_ARM_NEON=ON \ -DANDROID_NATIVE_API_LEVEL=21 \ @@ -177,7 +177,7 @@ jobs: ninja java-binding: - runs-on: macos-10.15 + runs-on: macos-12 steps: - uses: actions/checkout@v2 - name: Bootstrap