36
36
- name : Install Swift Toolchain
37
37
run : |
38
38
pwd
39
- echo `pwd`
39
+ cd ci
40
40
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
41
41
echo "Sha sum: $(sha256sum swift-5.6-RELEASE-ubuntu20.04.tar.gz | awk '{ print $1 }')"
42
42
if [ "$(sha256sum swift-5.6-RELEASE-ubuntu20.04.tar.gz | awk '{ print $1 }')" != "${EXPECTED_SWIFT_SHASUM}" ]; then
@@ -56,14 +56,19 @@ jobs:
56
56
run : cargo install --force cbindgen
57
57
- name : Regenerate C bindings
58
58
run : |
59
+ pwd
59
60
cd ci/ldk-c-bindings
61
+ pwd
60
62
./genbindings.sh ../rust-lightning true
61
63
cd ..
62
64
- name : Debug bindings target directory structure
63
65
run : |
66
+ cd ci
67
+ pwd
64
68
python ./walker.py ldk-c-bindings/lightning-c-bindings/target
65
69
- name : Copy new headers into bindings
66
70
run : |
71
+ cd ci
67
72
mkdir -p ./LDKSwift/Sources/LDKHeaders/include
68
73
cp ldk-c-bindings/lightning-c-bindings/include/*.h ./LDKSwift/Sources/LDKHeaders/include/
69
74
cp ldk-c-bindings/ldk-net/ldk_net.h ./LDKSwift/Sources/LDKHeaders/include/
@@ -72,32 +77,32 @@ jobs:
72
77
uses : actions/setup-python@v2
73
78
- name : Fix header files
74
79
run : |
80
+ cd ci
75
81
python ./fix_header_includes.py
76
82
- name : Generate (copy for debugging) Swift bindings and copy batteries
77
83
run : |
78
- cd ../
84
+ pwd
79
85
python ./ # Generate bindings
80
86
81
87
# TODO: switch back to generation method after debugging
82
88
# mkdir -p ci/LDKSwift/Sources/LDKSwift
83
89
# cp -a bindings/LDK/. ci/LDKSwift/Sources/LDKSwift
84
90
85
91
cp -R bindings/batteries ci/LDKSwift/Sources/LDKSwift
86
- cd ci
87
92
env :
88
93
LDK_SWIFT_GENERATOR_INPUT_HEADER_PATH : ldk-c-bindings/lightning-c-bindings/include/lightning.h
89
94
LDK_SWIFT_GENERATOR_OUTPUT_DIRECTORY_PATH : ci/LDKSwift/Sources/LDKSwift
90
95
- name : Fix Swift files
91
96
run : |
97
+ cd ci
92
98
python ./fix_swift_imports.py
93
99
- name : Debug CI directory structure
94
100
run : |
95
- python . /walker.py ci/
101
+ python ci /walker.py ci/
96
102
- name : Build Swift bindings package
97
103
run : |
98
- cd LDKSwift
104
+ cd ci/ LDKSwift
99
105
../swift-5.6-RELEASE-ubuntu20.04/usr/bin/swift build
100
- cd ../
101
106
env :
102
107
LDK_C_BINDINGS_BASE : /home/runner/work/ldk-swift/ldk-swift/ldk-c-bindings
103
108
LLVM_CLANG_ASAN_PATH : /usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.a
@@ -107,22 +112,21 @@ jobs:
107
112
uses : actions/upload-artifact@v3
108
113
with :
109
114
name : ci_archive
110
- path : ./
115
+ path : ci
111
116
112
117
- name : Test Swift bindings package without address sanitizer
113
118
run : |
114
- python . /toggle_address_sanitation_library.py off
115
- cd LDKSwift
119
+ python ci /toggle_address_sanitation_library.py off
120
+ cd ci/ LDKSwift
116
121
../swift-5.6-RELEASE-ubuntu20.04/usr/bin/swift test -v
117
- cd ../
118
122
env :
119
123
LDK_C_BINDINGS_BASE : /home/runner/work/ldk-swift/ldk-swift/ldk-c-bindings
120
124
LLVM_CLANG_ASAN_PATH : /usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.a
121
125
RUST_BACKTRACE : 1
122
126
- name : Test Swift bindings package with address sanitizer
123
127
run : |
124
- python . /toggle_address_sanitation_library.py on
125
- cd LDKSwift
128
+ python ci /toggle_address_sanitation_library.py on
129
+ cd ci/ LDKSwift
126
130
../swift-5.6-RELEASE-ubuntu20.04/usr/bin/swift test -v
127
131
env :
128
132
LDK_C_BINDINGS_BASE : /home/runner/work/ldk-swift/ldk-swift/ldk-c-bindings
0 commit comments