1 name: Continuous Integration Checks
3 on: [push, pull_request]
8 # Ubuntu's version of rustc uses its own LLVM instead of being a real native package.
9 # This leaves us with an incompatible LLVM version when linking. Instead, use a real OS.
10 container: debian:bullseye
14 - name: Install native Rust toolchain, Valgrind, and build utilitis
17 apt-get -y dist-upgrade
18 apt-get -y install cargo libstd-rust-dev-wasm32 valgrind lld git g++ clang openjdk-11-jdk maven
19 - name: Checkout source code
20 uses: actions/checkout@v2
21 - name: Install cbindgen
22 run: cargo install --force cbindgen
23 - name: Checkout Rust-Lightning and LDK-C-Bindings git
25 git clone https://github.com/rust-bitcoin/rust-lightning
27 git remote add matt https://git.bitcoin.ninja/rust-lightning
29 git merge matt/2021-03-java-bindings-base
31 git clone https://github.com/lightningdevkit/ldk-c-bindings
32 - name: Rebuild C bindings, and check the sample app builds + links
33 run: cd ldk-c-bindings && ./genbindings.sh ../rust-lightning && cd ..
34 - name: Build Java/TS Debug Bindings
35 run: ./genbindings.sh ./ldk-c-bindings/ "-I/usr/lib/jvm/java-11-openjdk-amd64/include/ -I/usr/lib/jvm/java-11-openjdk-amd64/include/linux/" true false
36 - name: Run Java Tests against Debug Bindings
39 ln -s liblightningjni_debug.so liblightningjni.so
40 export LD_LIBRARY_PATH=.
41 export LD_PRELOAD=/usr/lib/llvm-11/lib/clang/11.0.1/lib/linux/libclang_rt.asan-x86_64.so
42 export ASAN_OPTIONS=detect_leaks=0
44 git checkout liblightningjni.so
45 - name: Build Java/TS Release Bindings
46 run: ./genbindings.sh ./ldk-c-bindings/ "-I/usr/lib/jvm/java-11-openjdk-amd64/include/ -I/usr/lib/jvm/java-11-openjdk-amd64/include/linux/" false false
47 - name: Check latest headers are in git
49 # For some reason the debug library is not deterministic, this may be fixed in a future rustc
50 git checkout liblightningjni_debug.so