Skip to content

Update version to 0.0.125 #137

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

Merged
merged 9 commits into from
Feb 26, 2025
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
23 changes: 17 additions & 6 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,27 @@ runs:
if: ${{ runner.os == 'macOS' }}
run: |
brew install gnu-sed
mkdir -p /tmp/gnu-bin
ln -s "$(command -v gsed)" /tmp/gnu-bin/sed
- name: Checkout Rust-Lightning and LDK-C-Bindings git
shell: bash
run: |
echo `pwd`
mkdir -p ${{ inputs.destination }}/bin
git clone --branch 0.0.124-bindings https://github.com/lightningdevkit/rust-lightning ${{ inputs.destination }}/rust-lightning
git clone --branch main https://github.com/lightningdevkit/ldk-c-bindings ${{ inputs.destination }}/ldk-c-bindings
git clone --branch 0.0.125-bindings https://github.com/lightningdevkit/rust-lightning ${{ inputs.destination }}/rust-lightning
git clone --branch 0.0.125 https://github.com/lightningdevkit/ldk-c-bindings ${{ inputs.destination }}/ldk-c-bindings
- name: Configure default Rust toolchain
shell: bash
run: |
rustup install 1.73.0
rustup default 1.73.0
- name: Install Rust, required targets
if: ${{ inputs.configureRustNightly == 'true' }}
shell: bash
run: |
rustup toolchain install nightly-2022-05-13
rustup toolchain install nightly-2022-06-24
rustup target add aarch64-apple-darwin aarch64-apple-ios x86_64-apple-ios
rustup component add rust-src --toolchain nightly-2022-05-13-x86_64-apple-darwin
rustup component add rust-src --toolchain nightly-2022-06-24-aarch64-apple-darwin
- name: Load Cache
if: ${{ inputs.configureRustNightly == 'true' }}
uses: actions/cache@v3
Expand All @@ -45,11 +52,15 @@ runs:
- name: Pin cbindgen v24
shell: bash
run: |
cargo install --version 0.24.5 cbindgen
echo "DEVELOPER_DIR:"
echo $DEVELOPER_DIR
cargo install --force --version 0.24.5 cbindgen
- name: Generate C Bindings
shell: bash
run: |
export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
# Alias sed as gsed, if applicable
export PATH="/tmp/gnu-bin:$PATH"

pushd ${{ inputs.destination }}/ldk-c-bindings
if [ "$RUNNER_OS" == "macOS" ]; then
./genbindings.sh ../rust-lightning true skip-tests
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/upload-xcframework-artifact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
python3 ./scripts/symlink_resolver.py /Users/runner/work/ldk-swift/ldk-swift/bindings/bin/release/LightningDevKit-no-symlinks.xcframework
ditto -c -k --sequesterRsrc --keepParent /Users/runner/work/ldk-swift/ldk-swift/bindings/bin/release/LightningDevKit-no-symlinks.xcframework LightningDevKit-no-symlinks.xcframework.zip
- name: Upload Framework Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: LightningDevKit
path: |
Expand Down
32 changes: 23 additions & 9 deletions .github/workflows/build-xcframework-parallel-archives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ concurrency:
jobs:
build-xcarchives:
name: Build xcarchive for ${{ matrix.configuration['human_readable_platform'] }}
runs-on: macos-12
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
Expand All @@ -34,14 +34,18 @@ jobs:
- destination: 'macOS,variant=Mac Catalyst'
human_readable_platform: 'catalyst'
env:
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.4.0.app/Contents/Developer
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/bindings/artifacts/ldk-c-bindings
LDK_C_BINDINGS_BINARY_DIRECTORY: ${{ github.workspace }}/bindings/artifacts/bin
steps:
- name: Configure Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
xcode-version: 15.4.0
- name: Print Xcode SDK availability
shell: bash
run:
xcodebuild -showsdks
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
Expand All @@ -57,27 +61,37 @@ jobs:
- name: Xcarchive hack
run: touch ./bindings_root.txt
- name: Upload xcarchive
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: bindings
name: bindings-${{ matrix.configuration['human_readable_platform'] }}
path: ./bindings/**/bin/release/${{ matrix.configuration['human_readable_platform'] }}/${{ matrix.configuration['human_readable_platform'] }}.xcarchive

generate:
name: Combine xcarchives into xcframework
runs-on: macos-12
runs-on: macos-latest
needs: [ build-xcarchives ]
env:
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.4.0.app/Contents/Developer
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/bindings/artifacts/ldk-c-bindings
steps:
- name: Configure Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
xcode-version: 15.4.0
- name: Checkout
uses: actions/checkout@v3
- name: Download xcarchives
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: ./bindings
- name: Print post-artifact-download directory structure
shell: bash
run: |
echo "Current path:"
pwd
echo "Recursive enumeration"
find "$PWD"
- name: Generate xcframework
shell: bash
run:
Expand Down
28 changes: 19 additions & 9 deletions .github/workflows/build-xcframework-parallel-libldk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ concurrency:
jobs:
build-libldks:
name: Build & lipo libldk.a for ${{ matrix.configuration['human_readable_platform'] }}
runs-on: macos-12
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.4.0.app/Contents/Developer
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/bindings/artifacts/ldk-c-bindings
strategy:
fail-fast: true
Expand All @@ -49,7 +49,7 @@ jobs:
if: matrix.configuration['human_readable_platform'] == 'catalyst'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
xcode-version: 15.4.0
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
Expand All @@ -65,29 +65,39 @@ jobs:
LLVM_TARGET_TRIPLE_SUFFIX: ${{ matrix.configuration['llvm_target_triple_suffix'] }}
ARCHS: ${{ matrix.configuration['architectures'] }}
- name: Upload binary
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: bindings
name: bindings-${{ matrix.configuration['human_readable_platform'] }}
path: |
./bindings/**/artifacts/ldk-c-bindings/lightning-c-bindings/include/*.h
./bindings/**/artifacts/ldk-c-bindings/ldk-net/ldk_net.*
./bindings/**/bin/release/${{ matrix.configuration['human_readable_platform'] }}/libldk.a
generate-parallel:
name: Build xcarchives and generate xcframework
needs: [ build-libldks ]
runs-on: macos-12
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.4.0.app/Contents/Developer
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/bindings/artifacts/ldk-c-bindings
steps:
- name: Configure Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
xcode-version: 15.4.0
- name: Checkout
uses: actions/checkout@v3
- name: Download libldks
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: ./bindings
- name: Print post-artifact-download directory structure
shell: bash
run: |
echo "Current path:"
pwd
echo "Recursive enumeration"
find "$PWD"
- name: Generate Swift Bindings
shell: bash
run: |
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/build-xcframework-sequential.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,20 @@ concurrency:
jobs:
generate-sequential:
name: Build libldks, build xcarchives, and combine into xcframework
runs-on: macos-12
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.4.0.app/Contents/Developer
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/bindings/artifacts/ldk-c-bindings
steps:
- name: Configure Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
xcode-version: 15.4.0
- name: Print Xcode SDK availability
shell: bash
run: |
xcodebuild -showsdks
ls /Applications/
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/direct-bindings-app-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ concurrency:
jobs:
build:
name: Build (${{ matrix.configuration['scheme'] }} - ${{ matrix.configuration['platform'] }})
runs-on: macos-12
runs-on: macos-latest
continue-on-error: true
strategy:
fail-fast: false
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Configure Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
xcode-version: 15.4.0
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ on:
jobs:
generate-xcframework:
name: Generate XCFramework
runs-on: macos-12
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.4.0.app/Contents/Developer
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/bindings/artifacts/ldk-c-bindings
steps:
- name: Configure Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
xcode-version: 15.4.0
- name: Checkout
uses: actions/checkout@v3
- name: Update Package.swift tag to ${{ github.event.inputs.tag }}
Expand Down
48 changes: 42 additions & 6 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ jobs:
sudo apt-get update
# sudo apt-get -y upgrade
sudo apt-get -y install cargo lld git g++ clang curl
rustup install 1.73.0
rustup default 1.73.0
- name: Print updated environment details
run: |
set -x
rustup --version
clang --version
clang --print-resource-dir
ls -ll "$(clang -print-resource-dir)"
ls -ll "$(clang -print-resource-dir)/lib/linux"
- name: Install Dependencies
uses: ./.github/actions/install-dependencies
with:
Expand Down Expand Up @@ -84,27 +94,53 @@ jobs:
- name: Verify generated output recency
run: |
git diff --exit-code out/ ':(exclude)out/VersionDescriptor.swift'
- name: Build Swift bindings package
- name: Build Swift bindings package with address sanitizer
run: |
cd ci/LDKSwift
# should be /usr/lib/llvm-18/lib/clang/18/lib/linux/libclang_rt.asan-x86_64.a
export LLVM_CLANG_ASAN_PATH="$(clang -print-resource-dir)/lib/linux/libclang_rt.asan-x86_64.a"
../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift build
env:
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings
LLVM_CLANG_ASAN_PATH: /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.asan-x86_64.a
RUST_BACKTRACE: 1
- name: Test Swift bindings package without address sanitizer
- name: Test Swift bindings package with address sanitizer
continue-on-error: true
run: |
cd ci/LDKSwift
# should be /usr/lib/llvm-18/lib/clang/18/lib/linux/libclang_rt.asan-x86_64.a
export LLVM_CLANG_ASAN_PATH="$(clang -print-resource-dir)/lib/linux/libclang_rt.asan-x86_64.a"
../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift test -v
env:
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings
RUST_BACKTRACE: 1
- name: Test Swift bindings package with address sanitizer
continue-on-error: true
- name: Prepare release-optimized rust binaries
run: |
env
pushd ${{ github.workspace }}/ci/ldk-c-bindings/lightning-c-bindings
cargo clean
cargo build --release --features std

# debug the target
find ./target
env:
RUST_BACKTRACE: 1
RUSTFLAGS: --cfg=c_bindings -C embed-bitcode=yes -C lto
CARGO_PROFILE_RELEASE_LTO: true
- name: Build Swift bindings package without address sanitizer
run: |
env
cd ci/LDKSwift
../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift build
env:
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings
LDK_C_BINDINGS_BINARY_DIRECTORY: ${{ github.workspace }}/ci/ldk-c-bindings/lightning-c-bindings/target/release
RUST_BACKTRACE: 1
- name: Test Swift bindings package without address sanitizer
run: |
env
cd ci/LDKSwift
../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift test -v
env:
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings
LLVM_CLANG_ASAN_PATH: /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.asan-x86_64.a
LDK_C_BINDINGS_BINARY_DIRECTORY: ${{ github.workspace }}/ci/ldk-c-bindings/lightning-c-bindings/target/release
RUST_BACKTRACE: 1
6 changes: 3 additions & 3 deletions .github/workflows/test-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
create-artifact:
name: Add ${{ matrix.configuration['human_readable_platform'] }} to artifact
runs-on: macos-12
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
Expand All @@ -32,14 +32,14 @@ jobs:
mkdir -p ./bindings/bin/release/${{ matrix.configuration['human_readable_platform'] }}
touch ./bindings/bin/release/${{ matrix.configuration['human_readable_platform'] }}/${{ matrix.configuration['human_readable_platform'] }}.xcarchive
- name: Upload emulated xcarchive
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: uploaded-artifact-name
path: ./bindings/**/bin/release/${{ matrix.configuration['human_readable_platform'] }}/${{ matrix.configuration['human_readable_platform'] }}.xcarchive

download-artifact:
name: Download artifact
runs-on: macos-12
runs-on: macos-latest
needs: [ create-artifact ]
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ In order to generate these bindings from scratch, you will need to clone two dep
**[rust-lightning](https://github.com/lightningdevkit/rust-lightning)**, (a specific branch built for bindings compatibility):

```shell
git clone --branch 0.0.124-bindings https://github.com/lightningdevkit/rust-lightning /path/to/rust-lightning
git clone --branch 0.0.125-bindings https://github.com/lightningdevkit/rust-lightning /path/to/rust-lightning
```

**[ldk-c-bindings](https://github.com/lightningdevkit/ldk-c-bindings)**:
Expand Down
Loading
Loading