@@ -15,56 +15,25 @@ jobs:
15
15
steps :
16
16
- name : Checkout source code
17
17
uses : actions/checkout@v2
18
- - name : Checkout Rust-Lightning and LDK-C-Bindings git
19
- run : |
20
- cd ./ci
21
- git config --global user.email "[email protected] "
22
- git config --global user.name "LDK CI"
23
- # Note this is a different endpoint, as we need one non-upstream commit!
24
- # git clone https://git.bitcoin.ninja/rust-lightning
25
- # git clone https://github.com/TheBlueMatt/rust-lightning
26
- git clone --branch 2022-07-109-java-bindings https://github.com/TheBlueMatt/rust-lightning
27
- cd rust-lightning
28
- echo "rust-lightning commit hash:"
29
- git rev-parse HEAD
30
- cd ..
31
- git clone --branch v0.0.109.0 https://github.com/lightningdevkit/ldk-c-bindings
32
- # git clone https://github.com/TheBlueMatt/ldk-c-bindings
33
- cd ldk-c-bindings
34
- echo "ldk-c-bindings commit hash:"
35
- git rev-parse HEAD
36
18
- name : Install native Rust toolchain, Valgrind, and build utilities
37
19
run : |
38
20
sudo apt-get update
39
21
sudo apt-get -y dist-upgrade
40
22
sudo apt-get -y install cargo valgrind lld git g++ clang curl
41
- - name : Install cbindgen
42
- run : cargo install --force cbindgen
43
- - name : Regenerate C bindings
44
- run : |
45
- pwd
46
- cd ci/ldk-c-bindings
47
- pwd
48
- ./genbindings.sh ../rust-lightning true
49
- cd ..
23
+ - name : Install Dependencies
24
+ uses : ./.github/actions/install-dependencies
25
+ with :
26
+ destination : ./ci
27
+ configureRustNightly : false
28
+ env :
29
+ LDK_SWIFT_GENERATOR_OUTPUT_DIRECTORY_PATH : ci/LDKSwift/Sources/LDKSwift/bindings
50
30
- name : Copy new headers into bindings
51
31
run : |
52
32
cd ci
53
33
mkdir -p ./LDKSwift/Sources/LDKHeaders/include
54
34
cp ldk-c-bindings/lightning-c-bindings/include/*.h ./LDKSwift/Sources/LDKHeaders/include/
55
35
cp ldk-c-bindings/ldk-net/ldk_net.h ./LDKSwift/Sources/LDKHeaders/include/
56
36
cp ldk-c-bindings/ldk-net/ldk_net.c ./LDKSwift/Sources/LDKHeaders/
57
- - name : Generate (copy for debugging) Swift bindings and copy batteries
58
- run : |
59
- pwd
60
- python3 ./ # Generate bindings into ci subdirectory
61
-
62
- # TODO: switch back to generation method after debugging
63
- # mkdir -p ci/LDKSwift/Sources/LDKSwift
64
- # cp -a bindings/LDK/. ci/LDKSwift/Sources/LDKSwift
65
- env :
66
- LDK_SWIFT_GENERATOR_INPUT_HEADER_PATH : ci/ldk-c-bindings/lightning-c-bindings/include/lightning.h
67
- LDK_SWIFT_GENERATOR_OUTPUT_DIRECTORY_PATH : ci/LDKSwift/Sources/LDKSwift/bindings
68
37
- name : Check that the latest auto-generated Swift files are in the repo
69
38
run : |
70
39
python3 ./ # Generate bindings into local directory
0 commit comments