|
61 | 61 | LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings |
62 | 62 | H_FILE_OUTPUT_DIRECTORY: ${{ github.workspace }}/ci/LDKSwift/Sources/LDKHeaders/include |
63 | 63 | C_FILE_OUTPUT_DIRECTORY: ${{ github.workspace }}/ci/LDKSwift/Sources/LDKHeaders |
64 | | - - name: Prepare rust binaries |
65 | | - run: | |
66 | | - env |
67 | | - pushd ${{ github.workspace }}/ci/ldk-c-bindings/lightning-c-bindings |
68 | | - cargo clean |
69 | | - cargo build --release --features std |
70 | | -
|
71 | | - # debug the target |
72 | | - find ./target |
73 | | - env: |
74 | | - RUST_BACKTRACE: 1 |
75 | | - RUSTFLAGS: --cfg=c_bindings -C embed-bitcode=yes -C lto |
76 | | - CARGO_PROFILE_RELEASE_LTO: true |
77 | 64 | - name: Install Swift Toolchain |
78 | 65 | run: | |
79 | 66 | curl --verbose -L -o swift-5.7.2-RELEASE-ubuntu22.04.tar.gz https://download.swift.org/swift-5.7.2-release/ubuntu2204/swift-5.7.2-RELEASE/swift-5.7.2-RELEASE-ubuntu22.04.tar.gz |
@@ -107,40 +94,53 @@ jobs: |
107 | 94 | - name: Verify generated output recency |
108 | 95 | run: | |
109 | 96 | git diff --exit-code out/ ':(exclude)out/VersionDescriptor.swift' |
110 | | - - name: Build Swift bindings package without address sanitizer |
| 97 | + - name: Build Swift bindings package with address sanitizer |
111 | 98 | run: | |
112 | | - env |
113 | 99 | cd ci/LDKSwift |
| 100 | + # should be /usr/lib/llvm-18/lib/clang/18/lib/linux/libclang_rt.asan-x86_64.a |
| 101 | + export LLVM_CLANG_ASAN_PATH="$(clang -print-resource-dir)/lib/linux/libclang_rt.asan-x86_64.a" |
114 | 102 | ../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift build |
115 | 103 | env: |
116 | 104 | LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings |
117 | | - LDK_C_BINDINGS_BINARY_DIRECTORY: ${{ github.workspace }}/ci/ldk-c-bindings/lightning-c-bindings/target/release |
118 | 105 | RUST_BACKTRACE: 1 |
119 | | - - name: Test Swift bindings package without address sanitizer |
| 106 | + - name: Test Swift bindings package with address sanitizer |
| 107 | + continue-on-error: true |
120 | 108 | run: | |
121 | | - env |
122 | 109 | cd ci/LDKSwift |
| 110 | + # should be /usr/lib/llvm-18/lib/clang/18/lib/linux/libclang_rt.asan-x86_64.a |
| 111 | + export LLVM_CLANG_ASAN_PATH="$(clang -print-resource-dir)/lib/linux/libclang_rt.asan-x86_64.a" |
123 | 112 | ../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift test -v |
124 | 113 | env: |
125 | 114 | LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings |
126 | | - LDK_C_BINDINGS_BINARY_DIRECTORY: ${{ github.workspace }}/ci/ldk-c-bindings/lightning-c-bindings/target/release |
127 | 115 | RUST_BACKTRACE: 1 |
128 | | - - name: Build Swift bindings package with address sanitizer |
| 116 | + - name: Prepare release-optimized rust binaries |
129 | 117 | run: | |
| 118 | + env |
| 119 | + pushd ${{ github.workspace }}/ci/ldk-c-bindings/lightning-c-bindings |
| 120 | + cargo clean |
| 121 | + cargo build --release --features std |
| 122 | +
|
| 123 | + # debug the target |
| 124 | + find ./target |
| 125 | + env: |
| 126 | + RUST_BACKTRACE: 1 |
| 127 | + RUSTFLAGS: --cfg=c_bindings -C embed-bitcode=yes -C lto |
| 128 | + CARGO_PROFILE_RELEASE_LTO: true |
| 129 | + - name: Build Swift bindings package without address sanitizer |
| 130 | + run: | |
| 131 | + env |
130 | 132 | cd ci/LDKSwift |
131 | | - # should be /usr/lib/llvm-18/lib/clang/18/lib/linux/libclang_rt.asan-x86_64.a |
132 | | - export LLVM_CLANG_ASAN_PATH="$(clang -print-resource-dir)/lib/linux/libclang_rt.asan-x86_64.a" |
133 | 133 | ../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift build |
134 | 134 | env: |
135 | 135 | LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings |
| 136 | + LDK_C_BINDINGS_BINARY_DIRECTORY: ${{ github.workspace }}/ci/ldk-c-bindings/lightning-c-bindings/target/release |
136 | 137 | RUST_BACKTRACE: 1 |
137 | | - - name: Test Swift bindings package with address sanitizer |
138 | | - continue-on-error: true |
| 138 | + - name: Test Swift bindings package without address sanitizer |
139 | 139 | run: | |
| 140 | + env |
140 | 141 | cd ci/LDKSwift |
141 | | - # should be /usr/lib/llvm-18/lib/clang/18/lib/linux/libclang_rt.asan-x86_64.a |
142 | | - export LLVM_CLANG_ASAN_PATH="$(clang -print-resource-dir)/lib/linux/libclang_rt.asan-x86_64.a" |
143 | 142 | ../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift test -v |
144 | 143 | env: |
145 | 144 | LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings |
| 145 | + LDK_C_BINDINGS_BINARY_DIRECTORY: ${{ github.workspace }}/ci/ldk-c-bindings/lightning-c-bindings/target/release |
146 | 146 | RUST_BACKTRACE: 1 |
0 commit comments