Skip to content

Commit

Permalink
Temp: Test latest NDK with macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Mar 21, 2023
1 parent 916c019 commit 65e875e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/test-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,23 @@ on:
- "bdk-ffi/**"
- "bdk-android/**"

env:
ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/21.4.7075529
# env:
# ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/21.4.7075529
# ANDROID_NDK_ROOT: /Users/runner/Library/Android/sdk/ndk/23.2.8568313
# By default, the new ubuntu-20.04 images use the following ANDROID_NDK_ROOT
# ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/25.0.8775105

jobs:
build:
runs-on: ubuntu-20.04
runs-on: macos-12
# runs-on: ubuntu-20.04
steps:
- name: "Install Android NDK 21.4.7075529"
run: |
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
# - name: "Install Android NDK 21.4.7075529"
# run: |
# ANDROID_ROOT=/usr/local/lib/android
# ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
# SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
# echo "y" | $SDKMANAGER "ndk;21.4.7075529"

- name: "Check out PR branch"
uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ internal class UniFfiAndroidPlugin : Plugin<Project> {
// add build toolchain to PATH
Pair("PATH", "${System.getenv("PATH")}:${System.getenv("ANDROID_NDK_ROOT")}/toolchains/llvm/prebuilt/$llvmArchPath/bin"),
Pair("CFLAGS", "-D__ANDROID_MIN_SDK_VERSION__=21"),
Pair("AR", "llvm-ar"),
Pair("CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER", "aarch64-linux-android21-clang"),
Pair("CC", "aarch64-linux-android21-clang")
)
Expand Down Expand Up @@ -66,6 +67,7 @@ internal class UniFfiAndroidPlugin : Plugin<Project> {
// add build toolchain to PATH
Pair("PATH", "${System.getenv("PATH")}:${System.getenv("ANDROID_NDK_ROOT")}/toolchains/llvm/prebuilt/$llvmArchPath/bin"),
Pair("CFLAGS", "-D__ANDROID_MIN_SDK_VERSION__=21"),
Pair("AR", "llvm-ar"),
Pair("CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER", "x86_64-linux-android21-clang"),
Pair("CC", "x86_64-linux-android21-clang")
)
Expand Down Expand Up @@ -95,6 +97,7 @@ internal class UniFfiAndroidPlugin : Plugin<Project> {
// add build toolchain to PATH
Pair("PATH", "${System.getenv("PATH")}:${System.getenv("ANDROID_NDK_ROOT")}/toolchains/llvm/prebuilt/$llvmArchPath/bin"),
Pair("CFLAGS", "-D__ANDROID_MIN_SDK_VERSION__=21"),
Pair("AR", "llvm-ar"),
Pair("CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER", "armv7a-linux-androideabi21-clang"),
Pair("CC", "armv7a-linux-androideabi21-clang")
)
Expand Down

0 comments on commit 65e875e

Please sign in to comment.