Skip to content

Commit f6f92f3

Browse files
authored
Merge pull request #137 from arik-so/version-0.0.125
Update version to 0.0.125
2 parents 0e8a980 + c5cd72b commit f6f92f3

11 files changed

+136
-45
lines changed

.github/actions/install-dependencies/action.yml

+17-6
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,27 @@ runs:
1717
if: ${{ runner.os == 'macOS' }}
1818
run: |
1919
brew install gnu-sed
20+
mkdir -p /tmp/gnu-bin
21+
ln -s "$(command -v gsed)" /tmp/gnu-bin/sed
2022
- name: Checkout Rust-Lightning and LDK-C-Bindings git
2123
shell: bash
2224
run: |
2325
echo `pwd`
2426
mkdir -p ${{ inputs.destination }}/bin
25-
git clone --branch 0.0.124-bindings https://github.com/lightningdevkit/rust-lightning ${{ inputs.destination }}/rust-lightning
26-
git clone --branch main https://github.com/lightningdevkit/ldk-c-bindings ${{ inputs.destination }}/ldk-c-bindings
27+
git clone --branch 0.0.125-bindings https://github.com/lightningdevkit/rust-lightning ${{ inputs.destination }}/rust-lightning
28+
git clone --branch 0.0.125 https://github.com/lightningdevkit/ldk-c-bindings ${{ inputs.destination }}/ldk-c-bindings
29+
- name: Configure default Rust toolchain
30+
shell: bash
31+
run: |
32+
rustup install 1.73.0
33+
rustup default 1.73.0
2734
- name: Install Rust, required targets
2835
if: ${{ inputs.configureRustNightly == 'true' }}
2936
shell: bash
3037
run: |
31-
rustup toolchain install nightly-2022-05-13
38+
rustup toolchain install nightly-2022-06-24
3239
rustup target add aarch64-apple-darwin aarch64-apple-ios x86_64-apple-ios
33-
rustup component add rust-src --toolchain nightly-2022-05-13-x86_64-apple-darwin
40+
rustup component add rust-src --toolchain nightly-2022-06-24-aarch64-apple-darwin
3441
- name: Load Cache
3542
if: ${{ inputs.configureRustNightly == 'true' }}
3643
uses: actions/cache@v3
@@ -45,11 +52,15 @@ runs:
4552
- name: Pin cbindgen v24
4653
shell: bash
4754
run: |
48-
cargo install --version 0.24.5 cbindgen
55+
echo "DEVELOPER_DIR:"
56+
echo $DEVELOPER_DIR
57+
cargo install --force --version 0.24.5 cbindgen
4958
- name: Generate C Bindings
5059
shell: bash
5160
run: |
52-
export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
61+
# Alias sed as gsed, if applicable
62+
export PATH="/tmp/gnu-bin:$PATH"
63+
5364
pushd ${{ inputs.destination }}/ldk-c-bindings
5465
if [ "$RUNNER_OS" == "macOS" ]; then
5566
./genbindings.sh ../rust-lightning true skip-tests

.github/actions/upload-xcframework-artifact/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414
python3 ./scripts/symlink_resolver.py /Users/runner/work/ldk-swift/ldk-swift/bindings/bin/release/LightningDevKit-no-symlinks.xcframework
1515
ditto -c -k --sequesterRsrc --keepParent /Users/runner/work/ldk-swift/ldk-swift/bindings/bin/release/LightningDevKit-no-symlinks.xcframework LightningDevKit-no-symlinks.xcframework.zip
1616
- name: Upload Framework Artifact
17-
uses: actions/upload-artifact@v3
17+
uses: actions/upload-artifact@v4
1818
with:
1919
name: LightningDevKit
2020
path: |

.github/workflows/build-xcframework-parallel-archives.yml

+23-9
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ concurrency:
2020
jobs:
2121
build-xcarchives:
2222
name: Build xcarchive for ${{ matrix.configuration['human_readable_platform'] }}
23-
runs-on: macos-12
23+
runs-on: macos-latest
2424
strategy:
2525
fail-fast: false
2626
matrix:
@@ -34,14 +34,18 @@ jobs:
3434
- destination: 'macOS,variant=Mac Catalyst'
3535
human_readable_platform: 'catalyst'
3636
env:
37-
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
37+
DEVELOPER_DIR: /Applications/Xcode_15.4.0.app/Contents/Developer
3838
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/bindings/artifacts/ldk-c-bindings
3939
LDK_C_BINDINGS_BINARY_DIRECTORY: ${{ github.workspace }}/bindings/artifacts/bin
4040
steps:
4141
- name: Configure Xcode
4242
uses: maxim-lobanov/setup-xcode@v1
4343
with:
44-
xcode-version: latest
44+
xcode-version: 15.4.0
45+
- name: Print Xcode SDK availability
46+
shell: bash
47+
run:
48+
xcodebuild -showsdks
4549
- name: Checkout
4650
uses: actions/checkout@v3
4751
- name: Install Dependencies
@@ -57,27 +61,37 @@ jobs:
5761
- name: Xcarchive hack
5862
run: touch ./bindings_root.txt
5963
- name: Upload xcarchive
60-
uses: actions/upload-artifact@v3
64+
uses: actions/upload-artifact@v4
6165
with:
62-
name: bindings
66+
name: bindings-${{ matrix.configuration['human_readable_platform'] }}
6367
path: ./bindings/**/bin/release/${{ matrix.configuration['human_readable_platform'] }}/${{ matrix.configuration['human_readable_platform'] }}.xcarchive
6468

6569
generate:
6670
name: Combine xcarchives into xcframework
67-
runs-on: macos-12
71+
runs-on: macos-latest
6872
needs: [ build-xcarchives ]
6973
env:
70-
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
74+
DEVELOPER_DIR: /Applications/Xcode_15.4.0.app/Contents/Developer
7175
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/bindings/artifacts/ldk-c-bindings
7276
steps:
7377
- name: Configure Xcode
7478
uses: maxim-lobanov/setup-xcode@v1
7579
with:
76-
xcode-version: latest
80+
xcode-version: 15.4.0
7781
- name: Checkout
7882
uses: actions/checkout@v3
7983
- name: Download xcarchives
80-
uses: actions/download-artifact@v3
84+
uses: actions/download-artifact@v4
85+
with:
86+
merge-multiple: true
87+
path: ./bindings
88+
- name: Print post-artifact-download directory structure
89+
shell: bash
90+
run: |
91+
echo "Current path:"
92+
pwd
93+
echo "Recursive enumeration"
94+
find "$PWD"
8195
- name: Generate xcframework
8296
shell: bash
8397
run:

.github/workflows/build-xcframework-parallel-libldk.yml

+19-9
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ concurrency:
2020
jobs:
2121
build-libldks:
2222
name: Build & lipo libldk.a for ${{ matrix.configuration['human_readable_platform'] }}
23-
runs-on: macos-12
23+
runs-on: macos-latest
2424
env:
25-
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
25+
DEVELOPER_DIR: /Applications/Xcode_15.4.0.app/Contents/Developer
2626
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/bindings/artifacts/ldk-c-bindings
2727
strategy:
2828
fail-fast: true
@@ -49,7 +49,7 @@ jobs:
4949
if: matrix.configuration['human_readable_platform'] == 'catalyst'
5050
uses: maxim-lobanov/setup-xcode@v1
5151
with:
52-
xcode-version: latest
52+
xcode-version: 15.4.0
5353
- name: Checkout
5454
uses: actions/checkout@v3
5555
- name: Install Dependencies
@@ -65,29 +65,39 @@ jobs:
6565
LLVM_TARGET_TRIPLE_SUFFIX: ${{ matrix.configuration['llvm_target_triple_suffix'] }}
6666
ARCHS: ${{ matrix.configuration['architectures'] }}
6767
- name: Upload binary
68-
uses: actions/upload-artifact@v3
68+
uses: actions/upload-artifact@v4
6969
with:
70-
name: bindings
70+
name: bindings-${{ matrix.configuration['human_readable_platform'] }}
7171
path: |
7272
./bindings/**/artifacts/ldk-c-bindings/lightning-c-bindings/include/*.h
7373
./bindings/**/artifacts/ldk-c-bindings/ldk-net/ldk_net.*
7474
./bindings/**/bin/release/${{ matrix.configuration['human_readable_platform'] }}/libldk.a
7575
generate-parallel:
7676
name: Build xcarchives and generate xcframework
7777
needs: [ build-libldks ]
78-
runs-on: macos-12
78+
runs-on: macos-latest
7979
env:
80-
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
80+
DEVELOPER_DIR: /Applications/Xcode_15.4.0.app/Contents/Developer
8181
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/bindings/artifacts/ldk-c-bindings
8282
steps:
8383
- name: Configure Xcode
8484
uses: maxim-lobanov/setup-xcode@v1
8585
with:
86-
xcode-version: latest
86+
xcode-version: 15.4.0
8787
- name: Checkout
8888
uses: actions/checkout@v3
8989
- name: Download libldks
90-
uses: actions/download-artifact@v3
90+
uses: actions/download-artifact@v4
91+
with:
92+
merge-multiple: true
93+
path: ./bindings
94+
- name: Print post-artifact-download directory structure
95+
shell: bash
96+
run: |
97+
echo "Current path:"
98+
pwd
99+
echo "Recursive enumeration"
100+
find "$PWD"
91101
- name: Generate Swift Bindings
92102
shell: bash
93103
run: |

.github/workflows/build-xcframework-sequential.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,20 @@ concurrency:
2020
jobs:
2121
generate-sequential:
2222
name: Build libldks, build xcarchives, and combine into xcframework
23-
runs-on: macos-12
23+
runs-on: macos-latest
2424
env:
25-
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
25+
DEVELOPER_DIR: /Applications/Xcode_15.4.0.app/Contents/Developer
2626
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/bindings/artifacts/ldk-c-bindings
2727
steps:
2828
- name: Configure Xcode
2929
uses: maxim-lobanov/setup-xcode@v1
3030
with:
31-
xcode-version: latest
31+
xcode-version: 15.4.0
32+
- name: Print Xcode SDK availability
33+
shell: bash
34+
run: |
35+
xcodebuild -showsdks
36+
ls /Applications/
3237
- name: Checkout
3338
uses: actions/checkout@v3
3439
- name: Install Dependencies

.github/workflows/direct-bindings-app-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ concurrency:
2020
jobs:
2121
build:
2222
name: Build (${{ matrix.configuration['scheme'] }} - ${{ matrix.configuration['platform'] }})
23-
runs-on: macos-12
23+
runs-on: macos-latest
2424
continue-on-error: true
2525
strategy:
2626
fail-fast: false
@@ -41,7 +41,7 @@ jobs:
4141
- name: Configure Xcode
4242
uses: maxim-lobanov/setup-xcode@v1
4343
with:
44-
xcode-version: latest
44+
xcode-version: 15.4.0
4545
- name: Checkout
4646
uses: actions/checkout@v2
4747
- name: Install Dependencies

.github/workflows/release-framework.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ on:
1616
jobs:
1717
generate-xcframework:
1818
name: Generate XCFramework
19-
runs-on: macos-12
19+
runs-on: macos-latest
2020
env:
21-
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
21+
DEVELOPER_DIR: /Applications/Xcode_15.4.0.app/Contents/Developer
2222
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/bindings/artifacts/ldk-c-bindings
2323
steps:
2424
- name: Configure Xcode
2525
uses: maxim-lobanov/setup-xcode@v1
2626
with:
27-
xcode-version: latest
27+
xcode-version: 15.4.0
2828
- name: Checkout
2929
uses: actions/checkout@v3
3030
- name: Update Package.swift tag to ${{ github.event.inputs.tag }}

.github/workflows/swift.yml

+42-6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ jobs:
3333
sudo apt-get update
3434
# sudo apt-get -y upgrade
3535
sudo apt-get -y install cargo lld git g++ clang curl
36+
rustup install 1.73.0
37+
rustup default 1.73.0
38+
- name: Print updated environment details
39+
run: |
40+
set -x
41+
rustup --version
42+
clang --version
43+
clang --print-resource-dir
44+
ls -ll "$(clang -print-resource-dir)"
45+
ls -ll "$(clang -print-resource-dir)/lib/linux"
3646
- name: Install Dependencies
3747
uses: ./.github/actions/install-dependencies
3848
with:
@@ -84,27 +94,53 @@ jobs:
8494
- name: Verify generated output recency
8595
run: |
8696
git diff --exit-code out/ ':(exclude)out/VersionDescriptor.swift'
87-
- name: Build Swift bindings package
97+
- name: Build Swift bindings package with address sanitizer
8898
run: |
8999
cd ci/LDKSwift
100+
# should be /usr/lib/llvm-18/lib/clang/18/lib/linux/libclang_rt.asan-x86_64.a
101+
export LLVM_CLANG_ASAN_PATH="$(clang -print-resource-dir)/lib/linux/libclang_rt.asan-x86_64.a"
90102
../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift build
91103
env:
92104
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings
93-
LLVM_CLANG_ASAN_PATH: /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.asan-x86_64.a
94105
RUST_BACKTRACE: 1
95-
- name: Test Swift bindings package without address sanitizer
106+
- name: Test Swift bindings package with address sanitizer
107+
continue-on-error: true
96108
run: |
97109
cd ci/LDKSwift
110+
# should be /usr/lib/llvm-18/lib/clang/18/lib/linux/libclang_rt.asan-x86_64.a
111+
export LLVM_CLANG_ASAN_PATH="$(clang -print-resource-dir)/lib/linux/libclang_rt.asan-x86_64.a"
98112
../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift test -v
99113
env:
100114
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings
101115
RUST_BACKTRACE: 1
102-
- name: Test Swift bindings package with address sanitizer
103-
continue-on-error: true
116+
- name: Prepare release-optimized rust binaries
117+
run: |
118+
env
119+
pushd ${{ github.workspace }}/ci/ldk-c-bindings/lightning-c-bindings
120+
cargo clean
121+
cargo build --release --features std
122+
123+
# debug the target
124+
find ./target
125+
env:
126+
RUST_BACKTRACE: 1
127+
RUSTFLAGS: --cfg=c_bindings -C embed-bitcode=yes -C lto
128+
CARGO_PROFILE_RELEASE_LTO: true
129+
- name: Build Swift bindings package without address sanitizer
130+
run: |
131+
env
132+
cd ci/LDKSwift
133+
../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift build
134+
env:
135+
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings
136+
LDK_C_BINDINGS_BINARY_DIRECTORY: ${{ github.workspace }}/ci/ldk-c-bindings/lightning-c-bindings/target/release
137+
RUST_BACKTRACE: 1
138+
- name: Test Swift bindings package without address sanitizer
104139
run: |
140+
env
105141
cd ci/LDKSwift
106142
../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift test -v
107143
env:
108144
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings
109-
LLVM_CLANG_ASAN_PATH: /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.asan-x86_64.a
145+
LDK_C_BINDINGS_BINARY_DIRECTORY: ${{ github.workspace }}/ci/ldk-c-bindings/lightning-c-bindings/target/release
110146
RUST_BACKTRACE: 1

.github/workflows/test-artifacts.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
create-artifact:
1313
name: Add ${{ matrix.configuration['human_readable_platform'] }} to artifact
14-
runs-on: macos-12
14+
runs-on: macos-latest
1515
strategy:
1616
fail-fast: false
1717
matrix:
@@ -32,14 +32,14 @@ jobs:
3232
mkdir -p ./bindings/bin/release/${{ matrix.configuration['human_readable_platform'] }}
3333
touch ./bindings/bin/release/${{ matrix.configuration['human_readable_platform'] }}/${{ matrix.configuration['human_readable_platform'] }}.xcarchive
3434
- name: Upload emulated xcarchive
35-
uses: actions/upload-artifact@v3
35+
uses: actions/upload-artifact@v4
3636
with:
3737
name: uploaded-artifact-name
3838
path: ./bindings/**/bin/release/${{ matrix.configuration['human_readable_platform'] }}/${{ matrix.configuration['human_readable_platform'] }}.xcarchive
3939

4040
download-artifact:
4141
name: Download artifact
42-
runs-on: macos-12
42+
runs-on: macos-latest
4343
needs: [ create-artifact ]
4444
steps:
4545
- name: Checkout

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ In order to generate these bindings from scratch, you will need to clone two dep
5858
**[rust-lightning](https://github.com/lightningdevkit/rust-lightning)**, (a specific branch built for bindings compatibility):
5959

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

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

0 commit comments

Comments
 (0)