Skip to content

Commit

Permalink
Temp 16: Revert back to uniffi 0.23.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Oct 5, 2023
1 parent 413ec98 commit 7c4e3b8
Show file tree
Hide file tree
Showing 18 changed files with 292 additions and 285 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ on:

jobs:
build-test:
name: Build and test
name: "Build and test"
runs-on: ubuntu-20.04
defaults:
run:
working-directory: bdk-ffi
strategy:
matrix:
rust:
- version: 1.72.1 # STABLE
- version: 1.67.0
clippy: true
# TODO: Should we keep this? We'll need to pin dependencies
# - version: 1.61.0 # MSRV
Expand All @@ -34,26 +37,26 @@ jobs:
target
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}

- name: Set default toolchain
- name: "Set default toolchain"
run: rustup default ${{ matrix.rust.version }}

- name: Set profile
- name: "Set profile"
run: rustup set profile minimal

- name: Add clippy
- name: "Add clippy"
if: ${{ matrix.rust.clippy }}
run: rustup component add clippy

- name: Update toolchain
- name: "Update toolchain"
run: rustup update

- name: Pin dependencies for MSRV
- 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
- name: "Build"
run: cargo build

- name: Clippy
Expand All @@ -64,7 +67,7 @@ jobs:
run: CLASSPATH=./tests/jna/jna-5.8.0.jar cargo test --features uniffi/bindgen-tests

fmt:
name: Rust fmt
name: "Rust fmt"
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.72.1"
run: rustup default 1.72.1
- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.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.72.1"
run: rustup default 1.72.1
- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.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.72.1"
run: rustup default 1.72.1
- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.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.72.1"
run: rustup default 1.72.1
- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0

- name: "Build bdk-jvm library"
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.72.1"
run: rustup default 1.72.1
- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0

- name: "Install Rust Android targets"
run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/test-jvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,10 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.72.1"
run: rustup default 1.72.1
- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0

- name: "Run JVM tests"
run: |
cd bdk-jvm
./gradlew buildJvmLib
./gradlew test
- name: "Print directory structure"
run: |
pwd
ls -R
4 changes: 2 additions & 2 deletions .github/workflows/test-swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: "Set default Rust version to 1.72.1"
run: rustup default 1.72.1
- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0

- name: Install Rust targets
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,14 @@ internal class UniFfiAndroidPlugin : Plugin<Project> {
val generateAndroidBindings by tasks.register<Exec>("generateAndroidBindings") {
dependsOn(moveNativeAndroidLibs)

val libraryPath = "${project.projectDir}/../../bdk-ffi/target/aarch64-linux-android/release-smaller/libbdkffi.so"
workingDir("${project.projectDir}/../../bdk-ffi")
// val libraryPath = "${project.projectDir}/../../bdk-ffi/target/aarch64-linux-android/release-smaller/libbdkffi.so"
// workingDir("${project.projectDir}/../../bdk-ffi")
// val cargoArgs: List<String> = listOf("run", "--bin", "uniffi-bindgen", "generate", "--library", libraryPath, "--language", "kotlin", "--out-dir", "../bdk-android/lib/src/main/kotlin", "--no-format")

val cargoArgs: List<String> = listOf("run", "--bin", "uniffi-bindgen", "generate", "--library", libraryPath, "--language", "kotlin", "--out-dir", "../bdk-android/lib/src/main/kotlin", "--no-format")
// The code above worked for uniffi 0.24.3 using the --library flag
// The code below works for uniffi 0.23.0
workingDir("${project.projectDir}/../../bdk-ffi")
val cargoArgs: List<String> = listOf("run", "--bin", "uniffi-bindgen", "generate", "src/bdk.udl", "--language", "kotlin", "--out-dir", "../bdk-android/lib/src/main/kotlin", "--no-format")

executable("cargo")
args(cargoArgs)
Expand Down
Loading

0 comments on commit 7c4e3b8

Please sign in to comment.