Merge bitcoindevkit/bdk-ffi#335: Use version 21 of the Android NDK in the CI test, build, and publish workflows

beb75dd5524c0f16f0715d979b685c56ba95c15d Use version 21 of the Android NDK in the CI test, build, and publish workflows (thunderbiscuit)

Pull request description:

  This PR reverts an update to our Android CI workflows.

  For info on why this is needed, see issues #242 and #243.

ACKs for top commit:
  notmandatory:
    ACK beb75dd5524c0f16f0715d979b685c56ba95c15d

Tree-SHA512: dfee0b1f335318b86fa490fa85e7ef5d7a032e01a78db64a186c5d75e9e77e8f0e2af58ee5407d4fe38a0aa3aabbc7b06b23189aef0dfaad1d246a354452870d
This commit is contained in:
Steve Myers 2023-04-12 21:37:45 -05:00
commit 0e6b472793
No known key found for this signature in database
GPG Key ID: 8105A46B22C2D051
2 changed files with 36 additions and 6 deletions

View File

@ -1,10 +1,24 @@
name: Publish bdk-android to Maven Central name: Publish bdk-android to Maven Central
on: [workflow_dispatch] on: [workflow_dispatch]
# The default Android NDK on the ubuntu-22.04 image is 25.2.9519653
# We replace the default environment variable ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/25.2.9519653
# with an older version of the NDK (21.4.7075529) using the fix proposed here: https://github.com/actions/runner-images/issues/5930
# For information on why this is needed at the moment see issues #242 and #243, and PR #282
env:
ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/21.4.7075529
jobs: jobs:
build: build:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: 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: "Check out PR branch" - name: "Check out PR branch"
uses: actions/checkout@v2 uses: actions/checkout@v2

View File

@ -9,10 +9,24 @@ on:
- "bdk-ffi/**" - "bdk-ffi/**"
- "bdk-android/**" - "bdk-android/**"
# The default Android NDK on the ubuntu-22.04 image is 25.2.9519653
# We replace the default environment variable ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/25.2.9519653
# with an older version of the NDK (21.4.7075529) using the fix proposed here: https://github.com/actions/runner-images/issues/5930
# For information on why this is needed at the moment see issues #242 and #243, and PR #282
env:
ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/21.4.7075529
jobs: jobs:
build: build:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: 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: "Check out PR branch" - name: "Check out PR branch"
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -34,7 +48,9 @@ jobs:
- name: "Install Rust Android targets" - name: "Install Rust Android targets"
run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi
- name: "Run Android tests" # There are currently no unit tests for bdk-android and the integration tests require the macOS image
run: | # which is not working with the older NDK version we are using, so for now we just make sure that the library builds.
cd bdk-android # - name: "Run Android unit tests"
./gradlew test --console=rich # run: |
# cd bdk-android
# ./gradlew test --console=rich