Skip to content

Commit 78383ca

Browse files
committed
Improve error messaging and update swift CI action to latest branch.
1 parent 70aa8fe commit 78383ca

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

.github/workflows/swift.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,14 @@ jobs:
2121
# Note this is a different endpoint, as we need one non-upstream commit!
2222
# git clone https://git.bitcoin.ninja/rust-lightning
2323
# git clone https://github.com/TheBlueMatt/rust-lightning
24-
# git clone --branch 2021-03-java-bindings-base https://github.com/TheBlueMatt/rust-lightning
25-
git clone --branch 2022-05-107-bindings-scratch https://github.com/TheBlueMatt/rust-lightning
24+
git clone --branch 2022-06-108-java-bindings https://github.com/TheBlueMatt/rust-lightning
2625
cd rust-lightning
27-
# git checkout origin/2021-03-java-bindings-base
28-
# git checkout v0.0.100
29-
# git checkout 8966f8d3d4911e034621c6d3c3d20140d3a7e76a
3026
echo "rust-lightning commit hash:"
3127
git rev-parse HEAD
3228
cd ..
33-
# git clone https://github.com/lightningdevkit/ldk-c-bindings
34-
git clone https://github.com/TheBlueMatt/ldk-c-bindings
29+
git clone --branch https://github.com/lightningdevkit/ldk-c-bindings
30+
# git clone https://github.com/TheBlueMatt/ldk-c-bindings
3531
cd ldk-c-bindings
36-
# git checkout 1bb5ae1b34aeb74009b7b4b5ebefc957cddc30a6
3732
echo "ldk-c-bindings commit hash:"
3833
git rev-parse HEAD
3934
- name: Install native Rust toolchain, Valgrind, and build utilities
@@ -59,10 +54,6 @@ jobs:
5954
cp ldk-c-bindings/ldk-net/ldk_net.c ./LDKSwift/Sources/LDKHeaders/
6055
- name: Set up Python
6156
uses: actions/setup-python@v2
62-
- name: Fix header files
63-
run: |
64-
cd ci
65-
python ./fix_header_includes.py
6657
- name: Generate (copy for debugging) Swift bindings and copy batteries
6758
run: |
6859
pwd
@@ -71,22 +62,16 @@ jobs:
7162
# TODO: switch back to generation method after debugging
7263
# mkdir -p ci/LDKSwift/Sources/LDKSwift
7364
# cp -a bindings/LDK/. ci/LDKSwift/Sources/LDKSwift
74-
75-
cp -R bindings/batteries ci/LDKSwift/Sources/LDKSwift
7665
env:
7766
LDK_SWIFT_GENERATOR_INPUT_HEADER_PATH: ci/ldk-c-bindings/lightning-c-bindings/include/lightning.h
78-
LDK_SWIFT_GENERATOR_OUTPUT_DIRECTORY_PATH: ci/LDKSwift/Sources/LDKSwift
67+
LDK_SWIFT_GENERATOR_OUTPUT_DIRECTORY_PATH: ci/LDKSwift/Sources/LDKSwift/bindings
7968
- name: (Suspended) Check that the latest auto-generated Swift files are in the repo
8069
run: |
8170
python ./ # Generate bindings into local directory
8271
# python ci/walker.py bindings/LDK
8372
# git diff --exit-code bindings/LDK ':(exclude)bindings/LDK/Bindings.swift'
8473
env:
8574
LDK_SWIFT_GENERATOR_INPUT_HEADER_PATH: ci/ldk-c-bindings/lightning-c-bindings/include/lightning.h
86-
- name: Fix Swift files
87-
run: |
88-
cd ci
89-
python ./fix_swift_imports.py
9075
- name: Install Swift Toolchain
9176
run: |
9277
curl --verbose -L -o swift-5.6-RELEASE-ubuntu20.04.tar.gz https://download.swift.org/swift-5.6-release/ubuntu2004/swift-5.6-RELEASE/swift-5.6-RELEASE-ubuntu20.04.tar.gz

ci/build_libldk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ usage() {
1313
exit 1
1414
}
1515

16-
[ "${LDK_DIRECTORY}" = "" ] && echo "Usage: ./compile_dependency_binaries.sh /path/to/ldk-c-bindings" && exit 1;
16+
[ "${LDK_DIRECTORY}" = "" ] && echo "Usage: ./build_libldk.sh /path/to/ldk-c-bindings" && exit 1;
1717
[ ! -d "${LDK_DIRECTORY}" ] && echo "Provided directory does not exist" && exit 1;
1818

1919
if ! [[ -x "$(command -v cargo)" ]]; then

0 commit comments

Comments
 (0)