chore: bump rust compiler and android ndk versions
This commit is contained in:
parent
fd85d1d754
commit
fc4240ca38
16
.github/workflows/publish-android.yaml
vendored
16
.github/workflows/publish-android.yaml
vendored
@ -2,23 +2,11 @@ name: Publish bdk-android to Maven Central
|
||||
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:
|
||||
build:
|
||||
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: "Check out PR branch"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
@ -37,8 +25,8 @@ jobs:
|
||||
distribution: temurin
|
||||
java-version: 11
|
||||
|
||||
- name: "Set default Rust version to 1.67.0"
|
||||
run: rustup default 1.67.0
|
||||
- name: "Set default Rust version to 1.73.0"
|
||||
run: rustup default 1.73.0
|
||||
|
||||
- name: "Install Rust Android targets"
|
||||
run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi
|
||||
|
17
.github/workflows/test-android.yaml
vendored
17
.github/workflows/test-android.yaml
vendored
@ -11,22 +11,13 @@ on:
|
||||
- "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:
|
||||
build:
|
||||
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: "Show default version of NDK"
|
||||
run: echo $ANDROID_NDK_ROOT
|
||||
|
||||
- name: "Check out PR branch"
|
||||
uses: actions/checkout@v3
|
||||
@ -46,8 +37,8 @@ jobs:
|
||||
distribution: temurin
|
||||
java-version: 11
|
||||
|
||||
- name: "Set default Rust version to 1.67.0"
|
||||
run: rustup default 1.67.0
|
||||
- name: "Set default Rust version to 1.73.0"
|
||||
run: rustup default 1.73.0
|
||||
|
||||
- name: "Install Rust Android targets"
|
||||
run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi
|
||||
|
@ -55,10 +55,10 @@ _Note that Kotlin version `1.6.10` or later is required to build the library._
|
||||
git clone https://github.com/bitcoindevkit/bdk-ffi
|
||||
```
|
||||
2. Follow the "General" bdk-ffi ["Getting Started (Developer)"] instructions.
|
||||
3. Install Rust (note that we are currently building using Rust 1.67.0):
|
||||
3. Install Rust (note that we are currently building using Rust 1.73.0):
|
||||
```shell
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
rustup default 1.67.0
|
||||
rustup default 1.73.0
|
||||
```
|
||||
4. Install required targets
|
||||
```sh
|
||||
@ -66,10 +66,10 @@ rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-android
|
||||
```
|
||||
5. Install Android SDK and Build-Tools for API level 30+
|
||||
6. Setup `$ANDROID_SDK_ROOT` and `$ANDROID_NDK_ROOT` path variables (which are required by the
|
||||
build tool), for example (note that currently, NDK version 21.4.7075529 is required):
|
||||
build tool), for example (note that currently, NDK version 25.2.9519653 or above is required):
|
||||
```shell
|
||||
export ANDROID_SDK_ROOT=~/Android/Sdk
|
||||
export ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/21.4.7075529
|
||||
export ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/25.2.9519653
|
||||
```
|
||||
7. Build kotlin bindings
|
||||
```sh
|
||||
|
@ -1,9 +1,9 @@
|
||||
package org.bitcoindevkit
|
||||
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertTrue
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import org.junit.runner.RunWith
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class OfflineDescriptorTest {
|
||||
|
8
bdk-ffi/Cargo.lock
generated
8
bdk-ffi/Cargo.lock
generated
@ -762,18 +762,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.189"
|
||||
version = "1.0.192"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537"
|
||||
checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.189"
|
||||
version = "1.0.192"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5"
|
||||
checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -203,7 +203,7 @@ impl From<BdkTransaction> for Transaction {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) struct PartiallySignedTransaction {
|
||||
pub struct PartiallySignedTransaction {
|
||||
pub(crate) inner: Mutex<BdkPartiallySignedTransaction>,
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ impl DescriptorSecretKey {
|
||||
/// Get the private key as bytes.
|
||||
pub(crate) fn secret_bytes(&self) -> Vec<u8> {
|
||||
let inner = &self.inner;
|
||||
let secret_bytes: Vec<u8> = match inner.deref() {
|
||||
let secret_bytes: Vec<u8> = match inner {
|
||||
BdkDescriptorSecretKey::Single(_) => {
|
||||
unreachable!()
|
||||
}
|
||||
@ -206,7 +206,7 @@ impl DescriptorPublicKey {
|
||||
let descriptor_public_key = &self.inner;
|
||||
let path = path.inner_mutex.lock().unwrap().deref().clone();
|
||||
|
||||
match descriptor_public_key.deref() {
|
||||
match descriptor_public_key {
|
||||
BdkDescriptorPublicKey::Single(_) => Err(BdkError::Generic(
|
||||
"Cannot derive from a single key".to_string(),
|
||||
)),
|
||||
@ -235,7 +235,7 @@ impl DescriptorPublicKey {
|
||||
pub(crate) fn extend(&self, path: Arc<DerivationPath>) -> Result<Arc<Self>, BdkError> {
|
||||
let descriptor_public_key = &self.inner;
|
||||
let path = path.inner_mutex.lock().unwrap().deref().clone();
|
||||
match descriptor_public_key.deref() {
|
||||
match descriptor_public_key {
|
||||
BdkDescriptorPublicKey::Single(_) => Err(BdkError::Generic(
|
||||
"Cannot extend from a single key".to_string(),
|
||||
)),
|
||||
|
@ -259,7 +259,7 @@ pub struct Update(pub(crate) BdkUpdate);
|
||||
/// After creating the TxBuilder, you set options on it until finally calling finish to consume the builder and generate the transaction.
|
||||
/// Each method on the TxBuilder returns an instance of a new TxBuilder with the option set/added.
|
||||
#[derive(Clone, Debug)]
|
||||
pub(crate) struct TxBuilder {
|
||||
pub struct TxBuilder {
|
||||
pub(crate) recipients: Vec<(BdkScriptBuf, u64)>,
|
||||
// pub(crate) utxos: Vec<OutPoint>,
|
||||
// pub(crate) unspendable: HashSet<OutPoint>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user