32
32
# git checkout 1bb5ae1b34aeb74009b7b4b5ebefc957cddc30a6
33
33
echo "ldk-c-bindings commit hash:"
34
34
git rev-parse HEAD
35
- cd ..
36
- - name : Install Swift Toolchain
37
- run : |
38
- 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
39
- echo "Sha sum: $(sha256sum swift-5.6-RELEASE-ubuntu20.04.tar.gz | awk '{ print $1 }')"
40
- if [ "$(sha256sum swift-5.6-RELEASE-ubuntu20.04.tar.gz | awk '{ print $1 }')" != "${EXPECTED_SWIFT_SHASUM}" ]; then
41
- echo "Bad hash"
42
- echo "Contents: \n$(cat swift-5.6-RELEASE-ubuntu20.04.tar.gz)"
43
- exit 1
44
- fi
45
- tar xvvf swift-5.6-RELEASE-ubuntu20.04.tar.gz
46
- env :
47
- EXPECTED_SWIFT_SHASUM : 3f0d926bfc08eea00a69b1d992f2ab5e08155d97476096a3ef959fe7c4cbd58b
48
35
- name : Install native Rust toolchain, Valgrind, and build utilities
49
36
run : |
50
37
sudo apt-get update
59
46
pwd
60
47
./genbindings.sh ../rust-lightning true
61
48
cd ..
62
- - name : Check that the latest headers are in the swift repo
63
- run : |
64
- git diff --exit-code bindings/LDK ':(exclude)bindings/LDK/Bindings.swift'
65
- - name : Debug bindings target directory structure
66
- run : |
67
- cd ci
68
- pwd
69
- python ./walker.py ldk-c-bindings/lightning-c-bindings/target
70
49
- name : Copy new headers into bindings
71
50
run : |
72
51
cd ci
@@ -93,13 +72,28 @@ jobs:
93
72
env :
94
73
LDK_SWIFT_GENERATOR_INPUT_HEADER_PATH : ci/ldk-c-bindings/lightning-c-bindings/include/lightning.h
95
74
LDK_SWIFT_GENERATOR_OUTPUT_DIRECTORY_PATH : ci/LDKSwift/Sources/LDKSwift
75
+ - name : Debug generated Swift bindings directory structure
76
+ run : |
77
+ python ci/walker.py bindings/LDK
78
+ - name : Check that the latest auto-generated Swift files are in the repo
79
+ run : |
80
+ git diff --exit-code bindings/LDK ':(exclude)bindings/LDK/Bindings.swift'
96
81
- name : Fix Swift files
97
82
run : |
98
83
cd ci
99
84
python ./fix_swift_imports.py
100
- - name : Debug CI directory structure
85
+ - name : Install Swift Toolchain
101
86
run : |
102
- python ci/walker.py ci/
87
+ 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
88
+ echo "Sha sum: $(sha256sum swift-5.6-RELEASE-ubuntu20.04.tar.gz | awk '{ print $1 }')"
89
+ if [ "$(sha256sum swift-5.6-RELEASE-ubuntu20.04.tar.gz | awk '{ print $1 }')" != "${EXPECTED_SWIFT_SHASUM}" ]; then
90
+ echo "Bad hash"
91
+ echo "Contents: \n$(cat swift-5.6-RELEASE-ubuntu20.04.tar.gz)"
92
+ exit 1
93
+ fi
94
+ tar xvvf swift-5.6-RELEASE-ubuntu20.04.tar.gz
95
+ env :
96
+ EXPECTED_SWIFT_SHASUM : 3f0d926bfc08eea00a69b1d992f2ab5e08155d97476096a3ef959fe7c4cbd58b
103
97
- name : Build Swift bindings package
104
98
run : |
105
99
cd ci/LDKSwift
0 commit comments