From: Matt Corallo Date: Wed, 24 Mar 2021 02:53:26 +0000 (-0400) Subject: wip X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=68d75d41b35c39bb6acaf909233827c27f8918d5;p=ldk-java wip --- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 72ff307a..400ec53b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: run: | apt-get update apt-get -y dist-upgrade - apt-get -y install cargo libstd-rust-dev-wasm32 valgrind lld git g++ clang openjdk-11-jdk maven + apt-get -y install cargo libstd-rust-dev-wasm32 valgrind lld git g++ clang - name: Checkout source code uses: actions/checkout@v2 - name: Install cbindgen @@ -30,12 +30,34 @@ jobs: cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - sed -i 's|# Now cd to lightning-c-bindings, build the generated bindings, and call cbindgen to build a C header file|export RUSTFLAGS="--remap-path-prefix $LIGHTNING_PATH=rust-lightning --remap-path-prefix $HOME/.cargo= -Z no-parallel-llvm"\nexport RUSTC_BOOTSTRAP=1|' genbindings.sh - cd .. + sed -i 's|# Now cd to lightning-c-bindings, build the generated bindings, and call cbindgen to build a C header file|export RUSTFLAGS="--remap-path-prefix $LIGHTNING_PATH=rust-lightning --remap-path-prefix $HOME/.cargo= -C target-cpu=generic"\nwhich rustc|' genbindings.sh - name: Rebuild C bindings, and check the sample app builds + links - run: cd ldk-c-bindings && ./genbindings.sh ../rust-lightning && cd .. + run: | + export PATH="$(pwd)/ci:$PATH" + cd ldk-c-bindings + export CC=clang + #export CFLAGS=-flto + export CFLAGS_wasm32_wasi="-target wasm32" + which rustc + echo "OK...$PATH" + ./genbindings.sh ../rust-lightning + cd lightning-c-bindings + sha256sum target/debug/libldk.a target/debug/libldk.so + sha256sum target/release/libldk.a target/release/libldk.so + sha256sum target/wasm32-wasi/release/ldk.wasm target/wasm32-wasi/release/libldk.a + cd ../.. + - name: Upload builds to compare 0 + uses: actions/upload-artifact@v2 + with: + name: wasm_bindings + path: ldk-c-bindings/lightning-c-bindings/target/wasm32-wasi/*/*ldk* + - name: Upload builds to compare 4 + uses: actions/upload-artifact@v2 + with: + name: c_bindings + path: ldk-c-bindings/lightning-c-bindings/log* - name: Build Java/TS Debug Bindings - 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 + run: exit 1 && export SOURCE_DATE_EPOCH=1616474792 && ./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 - name: Run Java Tests against Debug Bindings run: | rm liblightningjni.so @@ -46,7 +68,17 @@ jobs: mvn test git checkout liblightningjni.so - name: Build Java/TS Release Bindings - 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 + run: export SOURCE_DATE_EPOCH=1616474792 && ./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 + - name: Upload builds to compare + uses: actions/upload-artifact@v2 + with: + name: jni_release + path: liblightningjni_release.so + - name: Upload builds to compare 2 + uses: actions/upload-artifact@v2 + with: + name: jni_debug + path: liblightningjni_debug.so - name: Check latest headers are in git run: | git diff --exit-code