diff --git a/.github/workflows/cln-integration.yml b/.github/workflows/cln-integration.yml index 2c427cbde..32e7b74c0 100644 --- a/.github/workflows/cln-integration.yml +++ b/.github/workflows/cln-integration.yml @@ -2,6 +2,10 @@ name: CI Checks - CLN Integration Tests on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: check-cln: runs-on: ubuntu-latest diff --git a/.github/workflows/kotlin.yml b/.github/workflows/kotlin.yml index a1711ba49..01a840d60 100644 --- a/.github/workflows/kotlin.yml +++ b/.github/workflows/kotlin.yml @@ -2,6 +2,10 @@ name: CI Checks - Kotlin Tests on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: check-kotlin: runs-on: ubuntu-latest diff --git a/.github/workflows/lnd-integration.yml b/.github/workflows/lnd-integration.yml index 219e929b1..f913e92ad 100644 --- a/.github/workflows/lnd-integration.yml +++ b/.github/workflows/lnd-integration.yml @@ -2,6 +2,10 @@ name: CI Checks - LND Integration Tests on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: check-lnd: runs-on: ubuntu-latest @@ -49,4 +53,4 @@ jobs: run: LND_CERT_PATH=$LND_DATA_DIR/tls.cert LND_MACAROON_PATH=$LND_DATA_DIR/data/chain/bitcoin/regtest/admin.macaroon RUSTFLAGS="--cfg lnd_test" cargo test --test integration_tests_lnd -- --exact --show-output env: - LND_DATA_DIR: ${{ env.LND_DATA_DIR }} \ No newline at end of file + LND_DATA_DIR: ${{ env.LND_DATA_DIR }} diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 21c0139a2..d9bc978d1 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -2,6 +2,10 @@ name: CI Checks - Python Tests on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: check-python: runs-on: ubuntu-latest diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml new file mode 100644 index 000000000..3410d09aa --- /dev/null +++ b/.github/workflows/swift.yml @@ -0,0 +1,21 @@ +name: CI Checks - Swift Tests + +on: [push, pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + check-swift: + runs-on: macos-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set default Rust version to stable + run: rustup default stable + + - name: Generate Swift bindings + run: ./scripts/uniffi_bindgen_generate_swift.sh diff --git a/bindings/ldk_node.udl b/bindings/ldk_node.udl index 9da0d89b6..ab2f483a1 100644 --- a/bindings/ldk_node.udl +++ b/bindings/ldk_node.udl @@ -771,7 +771,7 @@ interface Offer { constructor([ByRef] string offer_str); OfferId id(); boolean is_expired(); - string? description(); + string? offer_description(); string? issuer(); OfferAmount? amount(); boolean is_valid_quantity(u64 quantity); @@ -787,7 +787,7 @@ interface Offer { interface Refund { [Throws=NodeError, Name=from_str] constructor([ByRef] string refund_str); - string description(); + string refund_description(); u64? absolute_expiry_seconds(); boolean is_expired(); string? issuer(); @@ -810,7 +810,7 @@ interface Bolt12Invoice { u64? absolute_expiry_seconds(); u64 relative_expiry(); boolean is_expired(); - string? description(); + string? invoice_description(); string? issuer(); string? payer_note(); sequence? metadata(); diff --git a/src/ffi/types.rs b/src/ffi/types.rs index b64bd730e..3c88a665f 100644 --- a/src/ffi/types.rs +++ b/src/ffi/types.rs @@ -159,7 +159,7 @@ impl Offer { /// A complete description of the purpose of the payment. /// /// Intended to be displayed to the user but with the caveat that it has not been verified in any way. - pub fn description(&self) -> Option { + pub fn offer_description(&self) -> Option { self.inner.description().map(|printable| printable.to_string()) } @@ -288,7 +288,7 @@ impl Refund { /// A complete description of the purpose of the refund. /// /// Intended to be displayed to the user but with the caveat that it has not been verified in any way. - pub fn description(&self) -> String { + pub fn refund_description(&self) -> String { self.inner.description().to_string() } @@ -466,7 +466,7 @@ impl Bolt12Invoice { /// /// [`Offer::description`]: lightning::offers::offer::Offer::description /// [`Refund::description`]: lightning::offers::refund::Refund::description - pub fn description(&self) -> Option { + pub fn invoice_description(&self) -> Option { self.inner.description().map(|printable| printable.to_string()) } @@ -1359,7 +1359,7 @@ mod tests { #[test] fn test_offer() { let (ldk_offer, wrapped_offer) = create_test_offer(); - match (ldk_offer.description(), wrapped_offer.description()) { + match (ldk_offer.description(), wrapped_offer.offer_description()) { (Some(ldk_desc), Some(wrapped_desc)) => { assert_eq!(ldk_desc.to_string(), wrapped_desc); }, @@ -1481,7 +1481,7 @@ mod tests { fn test_refund_properties() { let (ldk_refund, wrapped_refund) = create_test_refund(); - assert_eq!(ldk_refund.description().to_string(), wrapped_refund.description()); + assert_eq!(ldk_refund.description().to_string(), wrapped_refund.refund_description()); assert_eq!(ldk_refund.amount_msats(), wrapped_refund.amount_msats()); assert_eq!(ldk_refund.is_expired(), wrapped_refund.is_expired()); @@ -1572,7 +1572,7 @@ mod tests { assert_eq!(ldk_invoice.relative_expiry().as_secs(), wrapped_invoice.relative_expiry()); - match (ldk_invoice.description(), wrapped_invoice.description()) { + match (ldk_invoice.description(), wrapped_invoice.invoice_description()) { (Some(ldk_desc), Some(wrapped_desc)) => { assert_eq!(ldk_desc.to_string(), wrapped_desc); },