12
12
uses : actions/checkout@v2
13
13
- name : Checkout Rust-Lightning and LDK-C-Bindings git
14
14
run : |
15
+ ci ci
15
16
git config --global user.email "[email protected] "
16
17
git config --global user.name "LDK CI"
17
18
# Note this is a different endpoint, as we need one non-upstream commit!
@@ -58,60 +59,69 @@ jobs:
58
59
cd ..
59
60
- name : Debug bindings target directory structure
60
61
run : |
61
- python ci /walker.py ldk-c-bindings/lightning-c-bindings/target
62
+ python . /walker.py ldk-c-bindings/lightning-c-bindings/target
62
63
- name : Copy new headers into bindings
63
64
run : |
64
- mkdir -p ci /LDKSwift/Sources/LDKHeaders/include
65
- cp ldk-c-bindings/lightning-c-bindings/include/*.h ci /LDKSwift/Sources/LDKHeaders/include/
66
- cp ldk-c-bindings/ldk-net/ldk_net.h ci /LDKSwift/Sources/LDKHeaders/include/
67
- cp ldk-c-bindings/ldk-net/ldk_net.c ci /LDKSwift/Sources/LDKHeaders/
65
+ mkdir -p . /LDKSwift/Sources/LDKHeaders/include
66
+ cp ldk-c-bindings/lightning-c-bindings/include/*.h . /LDKSwift/Sources/LDKHeaders/include/
67
+ cp ldk-c-bindings/ldk-net/ldk_net.h . /LDKSwift/Sources/LDKHeaders/include/
68
+ cp ldk-c-bindings/ldk-net/ldk_net.c . /LDKSwift/Sources/LDKHeaders/
68
69
- name : Set up Python
69
70
uses : actions/setup-python@v2
70
71
- name : Fix header files
71
72
run : |
72
- python ci /fix_header_includes.py
73
+ python . /fix_header_includes.py
73
74
- name : Generate (copy for debugging) Swift bindings and copy batteries
74
75
run : |
76
+ cd ../
75
77
python ./ # Generate bindings
76
78
77
79
# TODO: switch back to generation method after debugging
78
80
# mkdir -p ci/LDKSwift/Sources/LDKSwift
79
81
# cp -a bindings/LDK/. ci/LDKSwift/Sources/LDKSwift
80
82
81
83
cp -R bindings/batteries ci/LDKSwift/Sources/LDKSwift
84
+ cd ci
82
85
env :
83
86
LDK_SWIFT_GENERATOR_INPUT_HEADER_PATH : ldk-c-bindings/lightning-c-bindings/include/lightning.h
84
87
LDK_SWIFT_GENERATOR_OUTPUT_DIRECTORY_PATH : ci/LDKSwift/Sources/LDKSwift
85
88
- name : Fix Swift files
86
89
run : |
87
- python ci /fix_swift_imports.py
90
+ python . /fix_swift_imports.py
88
91
- name : Debug CI directory structure
89
92
run : |
90
- python ci /walker.py ci/
93
+ python . /walker.py ci/
91
94
- name : Build Swift bindings package
92
95
run : |
93
- cd ci/ LDKSwift
94
- ../../ swift-5.6-RELEASE-ubuntu20.04/usr/bin/swift build
95
- cd ../../
96
+ cd LDKSwift
97
+ ../swift-5.6-RELEASE-ubuntu20.04/usr/bin/swift build
98
+ cd ../
96
99
env :
97
100
LDK_C_BINDINGS_BASE : /home/runner/work/ldk-swift/ldk-swift/ldk-c-bindings
98
101
LLVM_CLANG_ASAN_PATH : /usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.a
99
102
RUST_BACKTRACE : 1
103
+
104
+ - name : Archive code coverage results
105
+ uses : actions/upload-artifact@v3
106
+ with :
107
+ name : ci_archive
108
+ path : ./
109
+
100
110
- name : Test Swift bindings package without address sanitizer
101
111
run : |
102
- python ci /toggle_address_sanitation_library.py off
103
- cd ci/ LDKSwift
104
- ../../ swift-5.6-RELEASE-ubuntu20.04/usr/bin/swift test -v
105
- cd ../../
112
+ python . /toggle_address_sanitation_library.py off
113
+ cd LDKSwift
114
+ ../swift-5.6-RELEASE-ubuntu20.04/usr/bin/swift test -v
115
+ cd ../
106
116
env :
107
117
LDK_C_BINDINGS_BASE : /home/runner/work/ldk-swift/ldk-swift/ldk-c-bindings
108
118
LLVM_CLANG_ASAN_PATH : /usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.a
109
119
RUST_BACKTRACE : 1
110
120
- name : Test Swift bindings package with address sanitizer
111
121
run : |
112
- python ci /toggle_address_sanitation_library.py on
113
- cd ci/ LDKSwift
114
- ../../ swift-5.6-RELEASE-ubuntu20.04/usr/bin/swift test -v
122
+ python . /toggle_address_sanitation_library.py on
123
+ cd LDKSwift
124
+ ../swift-5.6-RELEASE-ubuntu20.04/usr/bin/swift test -v
115
125
env :
116
126
LDK_C_BINDINGS_BASE : /home/runner/work/ldk-swift/ldk-swift/ldk-c-bindings
117
127
LLVM_CLANG_ASAN_PATH : /usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.a
@@ -121,12 +131,9 @@ jobs:
121
131
run : |
122
132
git diff --exit-code
123
133
124
- test_bindings_with_sanitizer_prep :
125
- uses : ./.github/workflows/swift-prep.yml
126
-
127
134
test_bindings_with_sanitizer :
128
135
runs-on : ubuntu-20.04
129
- needs : test_bindings_with_sanitizer_prep
136
+ needs : check_bindings
130
137
steps :
131
138
- name : Test Swift bindings package without address sanitizer
132
139
run : |
0 commit comments