X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=.github%2Fworkflows%2Fbuild.yml;h=4dea1a4934ec6bc78c563a54beb8d58d6436f40a;hb=HEAD;hp=296c19dccef7598752fe21ca222b52ad803c2717;hpb=74d327a4273bdc6f6628a2d602e877ed703f793b;p=ldk-java diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 296c19dc..962bcbeb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,11 +40,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.123 cd lightning-c-bindings cargo update -p memchr --precise "2.5.0" --verbose - name: Rebuild C bindings without STD @@ -138,11 +138,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.123 cd lightning-c-bindings cargo update -p memchr --precise "2.5.0" --verbose - name: Rebuild C bindings with STD @@ -169,7 +169,7 @@ jobs: steps: - name: Install required dependencies run: | - dnf install -y mingw64-gcc git cargo dotnet clang llvm lld faketime rust-std-static-x86_64-pc-windows-gnu which diffutils + dnf install -y mingw64-gcc git cargo dotnet clang llvm lld faketime rust-std-static-x86_64-pc-windows-gnu which diffutils rust-src - name: Checkout source code uses: actions/checkout@v2 with: @@ -185,27 +185,43 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.123 + - name: Fetch MacOS SDK + run: | + curl -o Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz https://bitcoincore.org/depends-sources/sdks/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz + tar xvvf Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz - name: Rebuild C bindings with STD run: | + export MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers" cd ldk-c-bindings export LDK_C_BINDINGS_EXTRA_TARGETS=x86_64-pc-windows-gnu export LDK_C_BINDINGS_EXTRA_TARGET_CCS=`pwd`/deterministic-build-wrappers/clang-x86_64-windows + export LDK_C_BINDINGS_EXTRA_TARGET_LINK_LTO=true ./genbindings.sh ../rust-lightning true - name: Remove checked-in source to ensure its correctly checked-in run: rm c_sharp/src/org/ldk/enums/*.cs c_sharp/src/org/ldk/impl/*.cs c_sharp/src/org/ldk/structs/*.cs - name: Build Windows C# Bindings run: | export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)" - LDK_TARGET=x86_64-pc-windows-gnu ./genbindings.sh ./ldk-c-bindings/ c_sharp false false + LDK_TARGET=x86_64-pc-windows-gnu LDK_TARGET_CPU=sandybridge ./genbindings.sh ./ldk-c-bindings/ c_sharp false false - name: Build Linux C# Bindings run: | export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)" ./genbindings.sh ./ldk-c-bindings/ c_sharp false false + - name: Build macOS x86-64 C# Bindings + run: | + export MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers" + export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)" + CC=clang LDK_TARGET=x86_64-apple-darwin LDK_TARGET_CPU=sandybridge ./genbindings.sh ./ldk-c-bindings/ c_sharp false false + - name: Build macOS aarch64 C# Bindings + run: | + export MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers" + export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)" + CC=clang LDK_TARGET=aarch64-apple-darwin LDK_TARGET_CPU=apple-a14 ./genbindings.sh ./ldk-c-bindings/ c_sharp false false - name: Build Release NUPKG run: | cd c_sharp @@ -238,10 +254,17 @@ jobs: run: | export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)" if ! diff ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"org.ldk.nupkg c_sharp/org.ldk.nupkg; then - dnf -y install diffoscope + dnf -y install diffoscope mono-devel diffoscope ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"org.ldk.nupkg c_sharp/org.ldk.nupkg || echo exit 1 fi + - name: Run test against C# release library + shell: bash + run: | + cd c_sharp + ln -s ./packaging_artifacts/runtimes/linux-x64/native/libldkcsharp.so ./ + LD_LIBRARY_PATH=. dotnet run --project tests.csproj + LD_LIBRARY_PATH=. dotnet run --project tests.csproj --configuration Release java_bindings: runs-on: ubuntu-latest @@ -275,11 +298,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.123 cd lightning-c-bindings cargo update -p memchr --precise "2.5.0" --verbose - name: Pin proc-macro and quote to meet MSRV @@ -338,11 +361,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.123 cd lightning-c-bindings cargo update -p memchr --precise "2.5.0" --verbose - name: Pin proc-macro and quote to meet MSRV @@ -412,6 +435,7 @@ jobs: export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)" cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"liblightningjni_Mac*.nativelib ldk-java-bins/new/ cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"LDK-release.aar ldk-java-bins/new/ + cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"org.ldk.nupkg ldk-java-bins/new/ cp src/main/resources/liblightningjni_Linux-amd64.nativelib ldk-java-bins/new/ cp ldk-java-sources.jar ldk-java-bins/new/ cp ldk-java.jar ldk-java-bins/new/ @@ -466,11 +490,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.123 - name: Fetch MacOS SDK run: | curl -o Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz https://bitcoincore.org/depends-sources/sdks/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz @@ -603,11 +627,11 @@ jobs: # Note this is a different endpoint, as we need one non-upstream commit! git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.123 cd lightning-c-bindings . $HOME/.cargo/env cargo update -p memchr --precise "2.5.0" --verbose @@ -681,13 +705,13 @@ jobs: git config --global user.email "ldk-ci@example.com" git config --global user.name "LDK CI" # Note this is a different endpoint, as we need one non-upstream commit! - git clone https://github.com/rghtningdevkit/ust-lightning + git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning - git checkout origin/0.0.121-bindings + git checkout origin/0.0.123-bindings cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.121 + git checkout 0.0.123 cd lightning-c-bindings cargo update -p memchr --precise "2.5.0" --verbose - name: Rebuild C bindings and check the sample app builds + links