From 1a7b3e0d03140b42ee8df432ab895d5422d89548 Mon Sep 17 00:00:00 2001 From: user Date: Thu, 21 Aug 2025 10:50:45 -0400 Subject: [PATCH 1/2] Override rustup command in macos based workflow The compilation step seemed to not be properly running with the 1.85.0 toolchain in our build script for mac. --- .github/workflows/dart.yml | 4 ++-- .github/workflows/python.yml | 4 ++-- payjoin-ffi/dart/scripts/generate_linux.sh | 10 +++++++--- payjoin-ffi/dart/scripts/generate_macos.sh | 12 ++++++++---- payjoin-ffi/python/scripts/generate_linux.sh | 10 +++++++--- payjoin-ffi/python/scripts/generate_macos.sh | 11 +++++++---- 6 files changed, 33 insertions(+), 18 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index b0b275a32..87d86bb39 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -31,9 +31,9 @@ jobs: - name: Generate bindings and binaries run: | if [ "${{ matrix.os }}" = "macos-13" ]; then - bash ./scripts/generate_macos.sh + bash ./scripts/generate_macos.sh 1.85.0 else - bash ./scripts/generate_linux.sh + bash ./scripts/generate_linux.sh 1.85.0 fi - name: Run tests diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index b8910df0d..f38ba902b 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -42,7 +42,7 @@ jobs: - name: "Generate payjoin-ffi.py and binaries" run: | PYBIN=$(dirname $(which python)) - PYBIN="$PYBIN" bash ./scripts/generate_linux.sh + PYBIN="$PYBIN" bash ./scripts/generate_linux.sh 1.85.0 - name: "Build wheel" run: python setup.py bdist_wheel --verbose @@ -81,7 +81,7 @@ jobs: uses: Swatinem/rust-cache@v2 - name: "Generate payjoin-ffi.py and binaries" - run: bash ./scripts/generate_macos.sh + run: bash ./scripts/generate_macos.sh 1.85.0 - name: "Build wheel" run: python3 setup.py bdist_wheel --verbose diff --git a/payjoin-ffi/dart/scripts/generate_linux.sh b/payjoin-ffi/dart/scripts/generate_linux.sh index 2bafc6893..2fc9a1d4a 100755 --- a/payjoin-ffi/dart/scripts/generate_linux.sh +++ b/payjoin-ffi/dart/scripts/generate_linux.sh @@ -1,5 +1,9 @@ #!/usr/bin/env bash set -euo pipefail + +TOOLCHAIN=${1:-1.85.0} +echo "Using Rust toolchain: $TOOLCHAIN" + dart --version dart pub get LIBNAME=libpayjoin_ffi.so @@ -8,13 +12,13 @@ LINUX_TARGET=x86_64-unknown-linux-gnu echo "Generating payjoin_ffi.dart..." cd ../ # This is a test script the actual release should not include the test utils feature -cargo build --profile release --features _test-utils -cargo run --profile release --features _test-utils --bin uniffi-bindgen -- --library target/release/$LIBNAME --language dart --out-dir dart/lib/ +cargo +$TOOLCHAIN build --profile release --features _test-utils +cargo +$TOOLCHAIN run --profile release --features _test-utils --bin uniffi-bindgen -- --library target/release/$LIBNAME --language dart --out-dir dart/lib/ echo "Generating native binaries..." rustup target add $LINUX_TARGET # This is a test script the actual release should not include the test utils feature -cargo build --profile release-smaller --target $LINUX_TARGET --features _test-utils +cargo +$TOOLCHAIN build --profile release-smaller --target $LINUX_TARGET --features _test-utils echo "Copying linux payjoin_ffi.so" cp target/$LINUX_TARGET/release-smaller/$LIBNAME dart/$LIBNAME diff --git a/payjoin-ffi/dart/scripts/generate_macos.sh b/payjoin-ffi/dart/scripts/generate_macos.sh index e1feb0d8d..84238ef43 100755 --- a/payjoin-ffi/dart/scripts/generate_macos.sh +++ b/payjoin-ffi/dart/scripts/generate_macos.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash set -euo pipefail + +TOOLCHAIN=${1:-1.85.0} +echo "Using Rust toolchain: $TOOLCHAIN" + dart --version dart pub get LIBNAME=libpayjoin_ffi.dylib @@ -8,18 +12,18 @@ LIBNAME=libpayjoin_ffi.dylib echo "Generating payjoin_ffi.dart..." cd ../ # This is a test script the actual release should not include the test utils feature -cargo build --features _test-utils --profile release -cargo run --features _test-utils --profile release --bin uniffi-bindgen -- --library target/release/$LIBNAME --language dart --out-dir dart/lib/ +cargo +$TOOLCHAIN build --features _test-utils --profile release +cargo +$TOOLCHAIN run --features _test-utils --profile release --bin uniffi-bindgen -- --library target/release/$LIBNAME --language dart --out-dir dart/lib/ echo "Generating native binaries..." rustup target add aarch64-apple-darwin x86_64-apple-darwin # This is a test script the actual release should not include the test utils feature -cargo build --profile release-smaller --target aarch64-apple-darwin --features _test-utils +cargo +$TOOLCHAIN build --profile release-smaller --target aarch64-apple-darwin --features _test-utils echo "Done building aarch64-apple-darwin" # This is a test script the actual release should not include the test utils feature -cargo build --profile release-smaller --target x86_64-apple-darwin --features _test-utils +cargo +$TOOLCHAIN build --profile release-smaller --target x86_64-apple-darwin --features _test-utils echo "Done building x86_64-apple-darwin" echo "Building macos fat library" diff --git a/payjoin-ffi/python/scripts/generate_linux.sh b/payjoin-ffi/python/scripts/generate_linux.sh index ffda52558..bf3de66d9 100755 --- a/payjoin-ffi/python/scripts/generate_linux.sh +++ b/payjoin-ffi/python/scripts/generate_linux.sh @@ -1,5 +1,9 @@ #!/usr/bin/env bash set -euo pipefail + +TOOLCHAIN=${1:-1.85.0} +echo "Using Rust toolchain: $TOOLCHAIN" + ${PYBIN}/python --version ${PYBIN}/pip install -r requirements.txt -r requirements-dev.txt LIBNAME=libpayjoin_ffi.so @@ -8,13 +12,13 @@ LINUX_TARGET=x86_64-unknown-linux-gnu echo "Generating payjoin_ffi.py..." cd ../ # This is a test script the actual release should not include the test utils feature -cargo build --profile release --features _test-utils -cargo run --profile release --features _test-utils --bin uniffi-bindgen generate --library target/release/$LIBNAME --language python --out-dir python/src/payjoin/ +cargo +$TOOLCHAIN build --profile release --features _test-utils +cargo +$TOOLCHAIN run --profile release --features _test-utils --bin uniffi-bindgen generate --library target/release/$LIBNAME --language python --out-dir python/src/payjoin/ echo "Generating native binaries..." rustup target add $LINUX_TARGET # This is a test script the actual release should not include the test utils feature -cargo build --profile release-smaller --target $LINUX_TARGET --features _test-utils +cargo +$TOOLCHAIN build --profile release-smaller --target $LINUX_TARGET --features _test-utils echo "Copying linux payjoin_ffi.so" cp target/$LINUX_TARGET/release-smaller/$LIBNAME python/src/payjoin/$LIBNAME diff --git a/payjoin-ffi/python/scripts/generate_macos.sh b/payjoin-ffi/python/scripts/generate_macos.sh index 4efb52d9e..9cdf6e113 100644 --- a/payjoin-ffi/python/scripts/generate_macos.sh +++ b/payjoin-ffi/python/scripts/generate_macos.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +TOOLCHAIN=${1:-1.85.0} +echo "Using Rust toolchain: $TOOLCHAIN" + set -euo pipefail python3 --version pip install -r requirements.txt -r requirements-dev.txt @@ -8,18 +11,18 @@ LIBNAME=libpayjoin_ffi.dylib echo "Generating payjoin_ffi.py..." cd ../ # This is a test script the actual release should not include the test utils feature -cargo build --features _test-utils --profile release -cargo run --features _test-utils --profile release --bin uniffi-bindgen generate --library target/release/$LIBNAME --language python --out-dir python/src/payjoin/ +cargo +$TOOLCHAIN build --features _test-utils --profile release +cargo +$TOOLCHAIN run --features _test-utils --profile release --bin uniffi-bindgen generate --library target/release/$LIBNAME --language python --out-dir python/src/payjoin/ echo "Generating native binaries..." rustup target add aarch64-apple-darwin x86_64-apple-darwin # This is a test script the actual release should not include the test utils feature -cargo build --profile release-smaller --target aarch64-apple-darwin --features _test-utils +cargo +$TOOLCHAIN build --profile release-smaller --target aarch64-apple-darwin --features _test-utils echo "Done building aarch64-apple-darwin" # This is a test script the actual release should not include the test utils feature -cargo build --profile release-smaller --target x86_64-apple-darwin --features _test-utils +cargo +$TOOLCHAIN build --profile release-smaller --target x86_64-apple-darwin --features _test-utils echo "Done building x86_64-apple-darwin" echo "Building macos fat library" From 61a5b818f4ce53e49e234f5739d4832815b93099 Mon Sep 17 00:00:00 2001 From: user Date: Thu, 21 Aug 2025 10:51:56 -0400 Subject: [PATCH 2/2] force workflow --- payjoin-ffi/python/test/test_payjoin_integration_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/payjoin-ffi/python/test/test_payjoin_integration_test.py b/payjoin-ffi/python/test/test_payjoin_integration_test.py index 36cec8b1b..836c077ee 100644 --- a/payjoin-ffi/python/test/test_payjoin_integration_test.py +++ b/payjoin-ffi/python/test/test_payjoin_integration_test.py @@ -277,7 +277,7 @@ class CheckInputsNotSeenCallback(IsOutputKnown): def __init__(self, connection: RpcClient): self.connection = connection - def callback(self, _outpoint): + def callback(self): return False class ProcessPsbtCallback(ProcessPsbt):