|
33 | 33 | sudo apt-get update
|
34 | 34 | # sudo apt-get -y upgrade
|
35 | 35 | sudo apt-get -y install cargo lld git g++ clang curl
|
| 36 | + rustup install 1.73.0 |
| 37 | + rustup default 1.73.0 |
| 38 | + - name: Print updated environment details |
| 39 | + run: | |
| 40 | + set -x |
| 41 | + rustup --version |
| 42 | + clang --version |
| 43 | + clang --print-resource-dir |
| 44 | + ls -ll "$(clang -print-resource-dir)" |
| 45 | + ls -ll "$(clang -print-resource-dir)/lib/linux" |
36 | 46 | - name: Install Dependencies
|
37 | 47 | uses: ./.github/actions/install-dependencies
|
38 | 48 | with:
|
@@ -84,27 +94,53 @@ jobs:
|
84 | 94 | - name: Verify generated output recency
|
85 | 95 | run: |
|
86 | 96 | git diff --exit-code out/ ':(exclude)out/VersionDescriptor.swift'
|
87 |
| - - name: Build Swift bindings package |
| 97 | + - name: Build Swift bindings package with address sanitizer |
88 | 98 | run: |
|
89 | 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" |
90 | 102 | ../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift build
|
91 | 103 | env:
|
92 | 104 | LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings
|
93 |
| - LLVM_CLANG_ASAN_PATH: /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.asan-x86_64.a |
94 | 105 | RUST_BACKTRACE: 1
|
95 |
| - - name: Test Swift bindings package without address sanitizer |
| 106 | + - name: Test Swift bindings package with address sanitizer |
| 107 | + continue-on-error: true |
96 | 108 | run: |
|
97 | 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" |
98 | 112 | ../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift test -v
|
99 | 113 | env:
|
100 | 114 | LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings
|
101 | 115 | RUST_BACKTRACE: 1
|
102 |
| - - name: Test Swift bindings package with address sanitizer |
103 |
| - continue-on-error: true |
| 116 | + - name: Prepare release-optimized rust binaries |
| 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 |
| 132 | + cd ci/LDKSwift |
| 133 | + ../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift build |
| 134 | + env: |
| 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 |
| 137 | + RUST_BACKTRACE: 1 |
| 138 | + - name: Test Swift bindings package without address sanitizer |
104 | 139 | run: |
|
| 140 | + env |
105 | 141 | cd ci/LDKSwift
|
106 | 142 | ../../swift-5.7.2-RELEASE-ubuntu22.04/usr/bin/swift test -v
|
107 | 143 | env:
|
108 | 144 | LDK_C_BINDINGS_BASE: ${{ github.workspace }}/ci/ldk-c-bindings
|
109 |
| - LLVM_CLANG_ASAN_PATH: /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.asan-x86_64.a |
| 145 | + LDK_C_BINDINGS_BINARY_DIRECTORY: ${{ github.workspace }}/ci/ldk-c-bindings/lightning-c-bindings/target/release |
110 | 146 | RUST_BACKTRACE: 1
|
0 commit comments