From 13f521386bf641bc43ab74c06e3df21e61293fe1 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Wed, 21 Aug 2024 12:57:00 -0400 Subject: [PATCH 1/9] cargokit.yml updated --- rust/Cargo.lock | 2 +- rust/Cargo.toml | 2 +- rust/cargokit.yaml | 11 ++++++++--- rust/rust-toolchain.toml | 3 +++ 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 rust/rust-toolchain.toml diff --git a/rust/Cargo.lock b/rust/Cargo.lock index f28aa68..96c2e58 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1795,7 +1795,7 @@ dependencies = [ [[package]] name = "payjoin_ffi" version = "0.20.0" -source = "git+https://github.com/LtbLightning/payjoin-ffi?branch=main#9e797708487661564336a8fec871c1b8b88198e7" +source = "git+https://github.com/nucode-Tech/payjoin-ffi?branch=v0.20.0#e1538f8aac8981ba160f8f8705c3eb2a96d9f8eb" dependencies = [ "base64 0.22.1", "hex", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 5109d0a..77783f5 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -16,7 +16,7 @@ bitcoincore-rpc = "0.19.0" anyhow = "1.0.68" [dependencies] ohttp = { version = "0.5.1" } -payjoin_ffi = { git = "https://github.com/LtbLightning/payjoin-ffi", branch = "main" } +payjoin_ffi = { git = "https://github.com/nucode-Tech/payjoin-ffi", branch = "v0.20.0" } flutter_rust_bridge = "=2.0.0" anyhow = "1.0.68" tokio = "1.36.0" diff --git a/rust/cargokit.yaml b/rust/cargokit.yaml index 87c82f9..81bdfee 100644 --- a/rust/cargokit.yaml +++ b/rust/cargokit.yaml @@ -1,6 +1,11 @@ cargo: - release: - toolchain: stable + debug: # Configuration of cargo execution during debug builds + toolchain: stable # default + release: # Configuration of cargo execution for release builds + toolchain: nightly # rustup will be invoked with nightly toolchain + extra_flags: # extra arguments passed to cargo build + - -Z + - build-std=panic_abort,std precompiled_binaries: url_prefix: https://github.com/LtbLightning/payjoin-flutter/releases/download/precompiled_ - public_key: acc9fbea1d5cca0660ed71b0e516663d36f0180a9826a6e5ba06ca26d4850de7 + public_key: acc9fbea1d5cca0660ed71b0e516663d36f0180a9826a6e5ba06ca26d4850de7 \ No newline at end of file diff --git a/rust/rust-toolchain.toml b/rust/rust-toolchain.toml new file mode 100644 index 0000000..d973514 --- /dev/null +++ b/rust/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "nightly-2024-07-24" +components = ["rustfmt"] \ No newline at end of file From b9939d7d5be092e94bc7751c37230d0c80b4d75a Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Wed, 21 Aug 2024 15:49:00 -0400 Subject: [PATCH 2/9] payjoin_ffi updated --- rust/Cargo.lock | 2 +- rust/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 96c2e58..f28aa68 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1795,7 +1795,7 @@ dependencies = [ [[package]] name = "payjoin_ffi" version = "0.20.0" -source = "git+https://github.com/nucode-Tech/payjoin-ffi?branch=v0.20.0#e1538f8aac8981ba160f8f8705c3eb2a96d9f8eb" +source = "git+https://github.com/LtbLightning/payjoin-ffi?branch=main#9e797708487661564336a8fec871c1b8b88198e7" dependencies = [ "base64 0.22.1", "hex", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 77783f5..5109d0a 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -16,7 +16,7 @@ bitcoincore-rpc = "0.19.0" anyhow = "1.0.68" [dependencies] ohttp = { version = "0.5.1" } -payjoin_ffi = { git = "https://github.com/nucode-Tech/payjoin-ffi", branch = "v0.20.0" } +payjoin_ffi = { git = "https://github.com/LtbLightning/payjoin-ffi", branch = "main" } flutter_rust_bridge = "=2.0.0" anyhow = "1.0.68" tokio = "1.36.0" From 56f71a10b23da32b138e82aedf9052ac27027f58 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Wed, 21 Aug 2024 17:51:00 -0400 Subject: [PATCH 3/9] --repository updated From 8c9782e435770403750045891a3bf94533d456b5 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Wed, 21 Aug 2024 18:09:00 -0400 Subject: [PATCH 4/9] v0.20.0 added to branches --- .github/workflows/precompile_binaries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/precompile_binaries.yml b/.github/workflows/precompile_binaries.yml index c2b99fb..711dba7 100644 --- a/.github/workflows/precompile_binaries.yml +++ b/.github/workflows/precompile_binaries.yml @@ -1,6 +1,6 @@ on: push: - branches: [main] + branches: [main, v0.20.0] name: Precompile Binaries From 6c425527c9020af832443867c528001eb5464092 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Wed, 21 Aug 2024 20:43:00 -0400 Subject: [PATCH 5/9] precompile_binaries updated --- .github/workflows/precompile_binaries.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/precompile_binaries.yml b/.github/workflows/precompile_binaries.yml index 711dba7..758ced9 100644 --- a/.github/workflows/precompile_binaries.yml +++ b/.github/workflows/precompile_binaries.yml @@ -16,19 +16,6 @@ jobs: - windows-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - name: Configure Cargo.toml optimizations - run: | - mkdir -p .cargo - echo "[profile.release]" >> .cargo/config.toml - echo "opt-level = 'z'" >> .cargo/config.toml - echo "lto = true" >> .cargo/config.toml - echo "codegen-units = 1" >> .cargo/config.toml - echo "panic = 'abort'" >> .cargo/config.toml - uses: dart-lang/setup-dart@v1 - uses: subosito/flutter-action@v2 with: From 8a082e5b50899e820199922f322ce770c89f8b40 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Wed, 21 Aug 2024 22:12:00 -0400 Subject: [PATCH 6/9] debugging ndk path --- .github/workflows/precompile_binaries.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/precompile_binaries.yml b/.github/workflows/precompile_binaries.yml index 758ced9..717d4ec 100644 --- a/.github/workflows/precompile_binaries.yml +++ b/.github/workflows/precompile_binaries.yml @@ -16,10 +16,25 @@ jobs: - windows-latest steps: - uses: actions/checkout@v4 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true - uses: dart-lang/setup-dart@v1 - uses: subosito/flutter-action@v2 with: channel: 'stable' + - name: Update NDK + run: sdkmanager --update + - name: Set NDK Toolchain Path + run: | + export PATH=$PATH:/usr/local/lib/android/sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin + echo "Toolchain Path Set" + - name: Debug NDK Path + run: | + echo "NDK Path: /usr/local/lib/android/sdk/ndk/24.0.8215888" + ls -la /usr/local/lib/android/sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/ - name: Install GTK if: (matrix.os == 'ubuntu-20.04') run: sudo apt-get update && sudo apt-get install libgtk-3-dev From 16cdfdfe101adea3b472e57281526f7168a85651 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Thu, 22 Aug 2024 00:01:00 -0400 Subject: [PATCH 7/9] added Set up Android SDK --- .github/workflows/precompile_binaries.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/precompile_binaries.yml b/.github/workflows/precompile_binaries.yml index 717d4ec..ad97b45 100644 --- a/.github/workflows/precompile_binaries.yml +++ b/.github/workflows/precompile_binaries.yml @@ -25,8 +25,12 @@ jobs: - uses: subosito/flutter-action@v2 with: channel: 'stable' - - name: Update NDK - run: sdkmanager --update + - name: Set up Android SDK + if: (matrix.os == 'ubuntu-20.04') + uses: android-actions/setup-android@v2 + - name: Install GTK + if: (matrix.os == 'ubuntu-20.04') + run: sudo apt-get update && sudo apt-get install libgtk-3-dev - name: Set NDK Toolchain Path run: | export PATH=$PATH:/usr/local/lib/android/sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin @@ -34,10 +38,10 @@ jobs: - name: Debug NDK Path run: | echo "NDK Path: /usr/local/lib/android/sdk/ndk/24.0.8215888" - ls -la /usr/local/lib/android/sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/ - - name: Install GTK + ls -la /usr/local/lib/android/sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/ + - name: Install Specific NDK if: (matrix.os == 'ubuntu-20.04') - run: sudo apt-get update && sudo apt-get install libgtk-3-dev + run: sdkmanager --install "ndk;24.0.8215888" - name: Precompile (with iOS) if: (matrix.os == 'macOS-latest') || (matrix.os == 'windows-latest') run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/payjoin-flutter From 0b54ddc2bf40a98c53d86406b61159f9a95c17be Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Thu, 22 Aug 2024 00:24:00 -0400 Subject: [PATCH 8/9] code cleanup --- .github/workflows/precompile_binaries.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/precompile_binaries.yml b/.github/workflows/precompile_binaries.yml index ad97b45..83ef638 100644 --- a/.github/workflows/precompile_binaries.yml +++ b/.github/workflows/precompile_binaries.yml @@ -31,19 +31,17 @@ jobs: - name: Install GTK if: (matrix.os == 'ubuntu-20.04') run: sudo apt-get update && sudo apt-get install libgtk-3-dev - - name: Set NDK Toolchain Path - run: | - export PATH=$PATH:/usr/local/lib/android/sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin - echo "Toolchain Path Set" + - name: Install Specific NDK + if: (matrix.os == 'ubuntu-20.04') + run: sdkmanager --install "ndk;24.0.8215888" - name: Debug NDK Path + if: (matrix.os == 'ubuntu-20.04') run: | echo "NDK Path: /usr/local/lib/android/sdk/ndk/24.0.8215888" ls -la /usr/local/lib/android/sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/ - - name: Install Specific NDK - if: (matrix.os == 'ubuntu-20.04') - run: sdkmanager --install "ndk;24.0.8215888" + - name: Precompile (with iOS) - if: (matrix.os == 'macOS-latest') || (matrix.os == 'windows-latest') + if: (matrix.os == 'macOS-latest') run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/payjoin-flutter working-directory: cargokit/build_tool env: From 4f48ed4df6238ed4f0359baa5219ce4fcfa726b0 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Thu, 22 Aug 2024 01:47:00 -0400 Subject: [PATCH 9/9] removed GTK install; code cleanup --- .github/workflows/precompile_binaries.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/precompile_binaries.yml b/.github/workflows/precompile_binaries.yml index 83ef638..6f83ff5 100644 --- a/.github/workflows/precompile_binaries.yml +++ b/.github/workflows/precompile_binaries.yml @@ -28,18 +28,9 @@ jobs: - name: Set up Android SDK if: (matrix.os == 'ubuntu-20.04') uses: android-actions/setup-android@v2 - - name: Install GTK - if: (matrix.os == 'ubuntu-20.04') - run: sudo apt-get update && sudo apt-get install libgtk-3-dev - name: Install Specific NDK if: (matrix.os == 'ubuntu-20.04') run: sdkmanager --install "ndk;24.0.8215888" - - name: Debug NDK Path - if: (matrix.os == 'ubuntu-20.04') - run: | - echo "NDK Path: /usr/local/lib/android/sdk/ndk/24.0.8215888" - ls -la /usr/local/lib/android/sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/ - - name: Precompile (with iOS) if: (matrix.os == 'macOS-latest') run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/payjoin-flutter