Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Rust compiler to 1.73.0 and update uniffi to 0.25.1 #414

Merged
merged 4 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ jobs:
strategy:
matrix:
rust:
- version: 1.67.0
- version: 1.73.0
clippy: true
# TODO 1: Should we keep this? We'll need to pin dependencies
# - version: 1.61.0 # MSRV
steps:
- name: "Checkout"
uses: actions/checkout@v3
Expand Down Expand Up @@ -50,12 +48,6 @@ jobs:
- name: "Update toolchain"
run: rustup update

- name: "Pin dependencies for MSRV"
if: matrix.rust.version == '1.61.0'
run: |
cargo update -p hashlink --precise "0.8.1"
cargo update -p tokio --precise "1.29.1"
cargo update -p flate2 --precise "1.0.26"
- name: "Build"
run: cargo build

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/live-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,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: "Build bdk-jvm library"
run: |
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/publish-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish-jvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,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 aarch64 Rust target"
run: rustup target add aarch64-apple-darwin
Expand Down Expand Up @@ -54,8 +54,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 x86_64-pc-windows-msvc Rust target"
run: rustup target add x86_64-pc-windows-msvc
Expand Down Expand Up @@ -94,8 +94,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: "Build bdk-jvm library"
run: |
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/test-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-jvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,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: "Run JVM tests"
run: |
Expand Down
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,7 @@ The below directories (a separate repository in the case of bdk-swift) include i

## Minimum Supported Rust Version (MSRV)

This library should compile with any combination of features with Rust 1.61.0.

To build with the MSRV you will need to pin dependencies as follows:

```shell
# required for sqlite feature, hashlink 0.8.2 has MSRV 1.61.0
cargo update -p hashlink --precise "0.8.1"
# tokio 1.30.0 has MSRV 1.63.0
cargo update -p tokio --precise "1.29.1"
# flate2 1.0.27 and up do not work with Rust 1.61.0, but 1.0.26 does
cargo update -p flate2 --precise "1.0.26"
```
This library should compile with any combination of features with Rust 1.73.0.

## Contributing

Expand Down
8 changes: 4 additions & 4 deletions bdk-android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,21 @@ _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
rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi
```
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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Loading
Loading