3c5193766ee4a9a7c1f3a637a430e1cd3d2f791c
[ldk-java] / .github / workflows / build.yml
1 name: Continuous Integration Checks
2
3 on: [push, pull_request]
4
5 jobs:
6   wasm_bindings:
7     runs-on: ubuntu-latest
8     # Ubuntu's version of clang doesn't support....anything that should work.
9     # Ubuntu is an utter trash OS and should generally never be used for anything.
10     # We also require at least rustc 1.51 (ie https://github.com/rust-lang/rust/pull/79998),
11     # so we use debian testing
12     container: debian:bookworm
13     strategy:
14       fail-fast: false
15     steps:
16       - name: Install build utilities and test that clang can build for wasm
17         run: |
18           apt-get update
19           apt-get -y dist-upgrade
20           apt-get -y install cargo libstd-rust-dev-wasm32 lld git g++ clang curl node-typescript npm python3 wasi-libc
21           echo "int main() {}" > genbindings_wasm_test_file.c
22           clang -nostdlib -o /dev/null --target=wasm32-wasi -Wl,--no-entry genbindings_wasm_test_file.c
23           rm genbindings_wasm_test_file.c
24       - name: Checkout source code
25         uses: actions/checkout@v2
26         with:
27           fetch-depth: 0
28       - name: Install cbindgen
29         run: |
30           git clone https://github.com/eqrion/cbindgen
31           cd cbindgen/
32           git checkout v0.20.0
33           cargo update -p indexmap --precise "1.6.2" --verbose
34           cargo install --locked --path .
35       - name: Checkout Rust-Lightning and LDK-C-Bindings git
36         run: |
37           git config --global safe.directory '*'
38           git config --global user.email "ldk-ci@example.com"
39           git config --global user.name "LDK CI"
40           # Note this is a different endpoint, as we need one non-upstream commit!
41           git clone https://github.com/lightningdevkit/rust-lightning
42           cd rust-lightning
43           git checkout origin/0.0.121-bindings
44           cd ..
45           git clone https://github.com/lightningdevkit/ldk-c-bindings
46           cd ldk-c-bindings
47           git checkout 0.0.121
48           cd lightning-c-bindings
49           cargo update -p memchr --precise "2.5.0" --verbose
50       - name: Rebuild C bindings without STD
51         run: |
52           cd ldk-c-bindings
53           git config --global safe.directory "*"
54           ./genbindings.sh ../rust-lightning false
55       - name: Build and Test TS Debug Bindings for Node
56         run: |
57           # We need FinalizationRegistry and top-level await support, which requires node 14.6/8,
58           # however Debian ships with Node 12
59           # Thus, we install the binary nodejs from nodejs.org and test with that.
60           curl https://nodejs.org/dist/v16.13.1/node-v16.13.1-linux-x64.tar.xz > nodejs.tar.xz
61           tar xvvf nodejs.tar.xz
62           export PATH=$(pwd)/$(echo node-*/bin):$PATH
63           ./genbindings.sh ./ldk-c-bindings/ wasm true false
64       - name: Build and Test TS Release Bindings for Node
65         run: |
66           export PATH=$(pwd)/$(echo node-*/bin):$PATH
67           ./genbindings.sh ./ldk-c-bindings/ wasm false false
68       - name: Install Playwright for Web Tests
69         run: |
70           export HOME=/root/ # Github actions is apparently broken
71           export PATH=$(pwd)/$(echo node-*/bin):$PATH
72           # npx playwright install-deps is broken so we do it manually, see https://github.com/microsoft/playwright/issues/11165
73           apt-get install -y --no-install-recommends fonts-liberation libenchant-2-2 libicu72 libjpeg62-turbo libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libdbus-1-3 libdrm2 libegl1 libgbm1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxrandr2 libxshmfence1 xvfb fonts-noto-color-emoji fonts-unifont libfontconfig libfreetype6 xfonts-scalable fonts-ipafont-gothic fonts-wqy-zenhei fonts-tlwg-loma-otf ffmpeg libcairo-gobject2 libdbus-glib-1-2 libfontconfig1 libgdk-pixbuf2.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libxcb-shm0 libxcursor1 libxi6 libxrender1 libxt6 gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good libepoxy0 libevdev2 libgl1 libgles2 libgstreamer-gl1.0-0 libgstreamer1.0-0 libharfbuzz-icu0 libharfbuzz0b libhyphen0 libnotify4 libopenjp2-7 libopus0 libpng16-16 libsecret-1-0 libsoup2.4-1 libwayland-client0 libwayland-egl1 libwayland-server0 libwebp7 libwebpdemux2 libwoff1 libxkbcommon0 libxml2 libxslt1.1
74           mkdir -p $HOME/.cache/ms-playwright # `playwright install` is too dumb to create this for us
75           chmod -R 777 $HOME/
76           npm i -D playwright@1.37.0-alpha-jul-31-2023
77           npx playwright@1.37.0-alpha-jul-31-2023 install
78       - name: Build and Test TS Debug Bindings for Web
79         run: |
80           export HOME=/root/ # Github actions is apparently broken
81           export PATH=$(pwd)/$(echo node-*/bin):$PATH
82           git config --global safe.directory "*"
83           ./genbindings.sh ./ldk-c-bindings/ wasm true true
84           cd ts
85           rm liblightningjs.wasm && ln -s $(pwd)/../liblightningjs_debug.wasm ./liblightningjs.wasm
86           python3 -m http.server &
87           SERVER_PID=$!
88           node test/browser.mjs
89           kill $SERVER_PID
90       - name: Build and Test TS Release Bindings for Web
91         run: |
92           export HOME=/root/ # Github actions is apparently broken
93           export PATH=$(pwd)/$(echo node-*/bin):$PATH
94           ./genbindings.sh ./ldk-c-bindings/ wasm false true
95           cd ts
96           rm liblightningjs.wasm && ln -s $(pwd)/../liblightningjs_release.wasm ./liblightningjs.wasm
97           python3 -m http.server &
98           SERVER_PID=$!
99           node test/browser.mjs
100           kill $SERVER_PID
101       - name: Check latest TS files are in git
102         run: |
103           git checkout ts/package.json
104           git checkout node-net/package.json
105           git diff --exit-code
106
107   c_sharp_bindings:
108     runs-on: ubuntu-latest
109     # Ubuntu's version of clang doesn't support....anything that should work.
110     # Ubuntu is an utter trash OS and should generally never be used for anything.
111     # We also require at least rustc 1.51 (ie https://github.com/rust-lang/rust/pull/79998),
112     # so we use debian testing
113     container: debian:bookworm
114     strategy:
115       fail-fast: false
116     steps:
117       - name: Install required dependencies
118         run: |
119           apt-get update
120           apt-get -y dist-upgrade
121           apt-get -y install cargo lld llvm git g++ clang curl python3 mono-devel
122       - name: Checkout source code
123         uses: actions/checkout@v2
124         with:
125           fetch-depth: 0
126       - name: Install cbindgen
127         run: |
128           git clone https://github.com/eqrion/cbindgen
129           cd cbindgen/
130           git checkout v0.20.0
131           cargo update -p indexmap --precise "1.6.2" --verbose
132           cargo install --locked --path .
133       - name: Checkout Rust-Lightning and LDK-C-Bindings git
134         run: |
135           git config --global safe.directory '*'
136           git config --global user.email "ldk-ci@example.com"
137           git config --global user.name "LDK CI"
138           # Note this is a different endpoint, as we need one non-upstream commit!
139           git clone https://github.com/lightningdevkit/rust-lightning
140           cd rust-lightning
141           git checkout origin/0.0.121-bindings
142           cd ..
143           git clone https://github.com/lightningdevkit/ldk-c-bindings
144           cd ldk-c-bindings
145           git checkout 0.0.121
146           cd lightning-c-bindings
147           cargo update -p memchr --precise "2.5.0" --verbose
148       - name: Rebuild C bindings with STD
149         run: |
150           cd ldk-c-bindings
151           git config --global safe.directory "*"
152           ./genbindings.sh ../rust-lightning true
153       - name: Build and Test C# Debug Bindings
154         run: |
155           ./genbindings.sh ./ldk-c-bindings/ c_sharp true true
156           mono-csc -out:test.exe -langversion:3 -unsafe c_sharp/src/org/ldk/enums/*.cs c_sharp/src/org/ldk/impl/*.cs c_sharp/src/org/ldk/util/*.cs c_sharp/src/org/ldk/structs/*.cs c_sharp/test/src/tests.cs
157           ln -s libldkcsharp_debug_Linux-amd64.so libldkcsharp.so
158           export ASAN_OPTIONS=detect_leaks=0
159           LD_PRELOAD=/usr/lib/llvm-14/lib/clang/14.0.6/lib/linux/libclang_rt.asan-x86_64.so mono test.exe
160
161   c_sharp_determinism:
162     runs-on: ubuntu-latest
163     # Ubuntu's version of clang doesn't support....anything that should work.
164     # Ubuntu is an utter trash OS and should generally never be used for anything.
165     # We also require dotnet so we use fedora
166     container: fedora:39
167     strategy:
168       fail-fast: false
169     steps:
170       - name: Install required dependencies
171         run: |
172           dnf install -y mingw64-gcc git cargo dotnet clang llvm lld faketime rust-std-static-x86_64-pc-windows-gnu which diffutils rust-src
173       - name: Checkout source code
174         uses: actions/checkout@v2
175         with:
176           fetch-depth: 0
177       - name: Install cbindgen
178         run: |
179           cargo install cbindgen
180       - name: Checkout Rust-Lightning and LDK-C-Bindings git
181         run: |
182           git config --global safe.directory '*'
183           git config --global user.email "ldk-ci@example.com"
184           git config --global user.name "LDK CI"
185           # Note this is a different endpoint, as we need one non-upstream commit!
186           git clone https://github.com/lightningdevkit/rust-lightning
187           cd rust-lightning
188           git checkout origin/0.0.121-bindings
189           cd ..
190           git clone https://github.com/lightningdevkit/ldk-c-bindings
191           cd ldk-c-bindings
192           git checkout 0.0.121
193       - name: Fetch MacOS SDK
194         run: |
195           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
196           tar xvvf Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz
197       - name: Rebuild C bindings with STD
198         run: |
199           export MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
200           cd ldk-c-bindings
201           export LDK_C_BINDINGS_EXTRA_TARGETS=x86_64-pc-windows-gnu
202           export LDK_C_BINDINGS_EXTRA_TARGET_CCS=`pwd`/deterministic-build-wrappers/clang-x86_64-windows
203           export LDK_C_BINDINGS_EXTRA_TARGET_LINK_LTO=true
204           ./genbindings.sh ../rust-lightning true
205       - name: Remove checked-in source to ensure its correctly checked-in
206         run: rm c_sharp/src/org/ldk/enums/*.cs c_sharp/src/org/ldk/impl/*.cs c_sharp/src/org/ldk/structs/*.cs
207       - name: Build Windows C# Bindings
208         run: |
209           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
210           LDK_TARGET=x86_64-pc-windows-gnu LDK_TARGET_CPU=sandybridge ./genbindings.sh ./ldk-c-bindings/ c_sharp false false
211       - name: Build Linux C# Bindings
212         run: |
213           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
214           ./genbindings.sh ./ldk-c-bindings/ c_sharp false false
215       - name: Build macOS x86-64 C# Bindings
216         run: |
217           export MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
218           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
219           CC=clang LDK_TARGET=x86_64-apple-darwin LDK_TARGET_CPU=sandybridge ./genbindings.sh ./ldk-c-bindings/ c_sharp false false
220       - name: Build macOS aarch64 C# Bindings
221         run: |
222           export MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
223           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
224           CC=clang LDK_TARGET=aarch64-apple-darwin LDK_TARGET_CPU=apple-a14 ./genbindings.sh ./ldk-c-bindings/ c_sharp false false
225       - name: Build Release NUPKG
226         run: |
227           cd c_sharp
228           ./build-release-nupkg.sh
229       - uses: actions/upload-artifact@v3
230         with:
231           name: org.ldk.nupkg
232           path: c_sharp/org.ldk.nupkg
233       - name: Check latest auto-generated code is in git
234         run: |
235           # Checkout files that get updated with version information
236           git checkout c_sharp/packaging_artifacts/package/services/metadata/core-properties/ldk.psmdcp
237           git checkout c_sharp/packaging_artifacts/org.ldk.nuspec
238           git diff --exit-code
239       - name: Checkout latest binaries
240         shell: bash
241         run: |
242           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
243           echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
244           # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
245           SNAPSHOT_LINK="$(curl "https://git.bitcoin.ninja/index.cgi?p=ldk-java-bins;a=tree;f=${LDK_GARBAGECOLLECTED_GIT_OVERRIDE};hb=refs/heads/main" | grep snapshot | grep -o 'href="[a-zA-Z0-9/?\.=;\-]*"' | sed 's/href="//' | tr -d '"' | grep snapshot)"
246           curl -o bins-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
247           mkdir -p ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
248           cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
249           tar xvvf ../../bins-snapshot.tgz
250           mv ldk-java-bins-*/* ./
251           rm -r ldk-java-bins-*
252       - name: Compare C# nupkg with built one
253         shell: bash
254         run: |
255           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
256           if ! diff ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"org.ldk.nupkg c_sharp/org.ldk.nupkg; then
257             dnf -y install diffoscope
258             diffoscope ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"org.ldk.nupkg c_sharp/org.ldk.nupkg || echo
259             exit 1
260           fi
261
262   java_bindings:
263     runs-on: ubuntu-latest
264     # Ubuntu's version of rustc uses its own LLVM instead of being a real native package.
265     # This leaves us with an incompatible LLVM version when linking. Instead, use a real OS.
266     container: debian:bookworm
267     strategy:
268       fail-fast: false
269     steps:
270       - name: Install native Rust toolchain, Valgrind, and build utilitis
271         run: |
272           apt-get update
273           apt-get -y dist-upgrade
274           apt-get -y install cargo valgrind lld git g++ clang openjdk-17-jdk maven faketime zip unzip llvm curl
275       - name: Checkout source code
276         uses: actions/checkout@v2
277         with:
278           fetch-depth: 0
279       - name: Install cbindgen
280         run: |
281           git config --global safe.directory '*'
282           git clone https://github.com/eqrion/cbindgen
283           cd cbindgen/
284           git checkout v0.20.0
285           cargo update -p indexmap --precise "1.6.2" --verbose
286           cargo install --locked --path .
287       - name: Checkout Rust-Lightning and LDK-C-Bindings git
288         run: |
289           git config --global user.email "ldk-ci@example.com"
290           git config --global user.name "LDK CI"
291           # Note this is a different endpoint, as we need one non-upstream commit!
292           git clone https://github.com/lightningdevkit/rust-lightning
293           cd rust-lightning
294           git checkout origin/0.0.121-bindings
295           cd ..
296           git clone https://github.com/lightningdevkit/ldk-c-bindings
297           cd ldk-c-bindings
298           git checkout 0.0.121
299           cd lightning-c-bindings
300           cargo update -p memchr --precise "2.5.0" --verbose
301       - name: Pin proc-macro and quote to meet MSRV
302         run: |
303           cd ldk-c-bindings/c-bindings-gen
304           cargo update -p quote --precise "1.0.30" --verbose
305           cargo update -p proc-macro2 --precise "1.0.65" --verbose
306       - name: Rebuild C bindings, and check the sample app builds + links
307         run: |
308           cd ldk-c-bindings
309           ./genbindings.sh ../rust-lightning true
310       - name: Build Java Debug Bindings
311         run: ./genbindings.sh ./ldk-c-bindings/ "-I/usr/lib/jvm/java-17-openjdk-amd64/include/ -I/usr/lib/jvm/java-17-openjdk-amd64/include/linux/" true false
312       - name: Run Java Tests against Debug Bindings
313         run: |
314           mv liblightningjni_debug_Linux-amd64.so liblightningjni.so
315           export ASAN_OPTIONS=detect_leaks=0
316           LD_PRELOAD=/usr/lib/llvm-14/lib/clang/14.0.6/lib/linux/libclang_rt.asan-x86_64.so LD_LIBRARY_PATH=. mvn test
317       - name: Build Java Release Bindings
318         run: |
319           ./genbindings.sh ./ldk-c-bindings/ "-I/usr/lib/jvm/java-17-openjdk-amd64/include/ -I/usr/lib/jvm/java-17-openjdk-amd64/include/linux/" false false
320       - name: Check latest headers are in git
321         run: |
322           git checkout pom.xml
323           git diff --exit-code
324
325   java_determinism:
326     runs-on: ubuntu-latest
327     # Ubuntu's version of rustc uses its own LLVM instead of being a real native package.
328     # This leaves us with an incompatible LLVM version when linking. Instead, use a real OS.
329     container: debian:bookworm
330     strategy:
331       fail-fast: false
332     steps:
333       - name: Install native Rust toolchain, Valgrind, and build utilitis
334         run: |
335           apt-get update
336           apt-get -y dist-upgrade
337           apt-get -y install cargo valgrind lld git g++ clang openjdk-17-jdk maven faketime zip unzip llvm curl
338       - name: Checkout source code
339         uses: actions/checkout@v2
340         with:
341           fetch-depth: 0
342       - name: Install cbindgen
343         run: |
344           git config --global safe.directory '*'
345           git clone https://github.com/eqrion/cbindgen
346           cd cbindgen/
347           git checkout v0.20.0
348           cargo update -p indexmap --precise "1.6.2" --verbose
349           cargo install --locked --path .
350       - name: Checkout Rust-Lightning and LDK-C-Bindings git
351         run: |
352           git config --global user.email "ldk-ci@example.com"
353           git config --global user.name "LDK CI"
354           # Note this is a different endpoint, as we need one non-upstream commit!
355           git clone https://github.com/lightningdevkit/rust-lightning
356           cd rust-lightning
357           git checkout origin/0.0.121-bindings
358           cd ..
359           git clone https://github.com/lightningdevkit/ldk-c-bindings
360           cd ldk-c-bindings
361           git checkout 0.0.121
362           cd lightning-c-bindings
363           cargo update -p memchr --precise "2.5.0" --verbose
364       - name: Pin proc-macro and quote to meet MSRV
365         run: |
366           cd ldk-c-bindings/c-bindings-gen
367           cargo update -p quote --precise "1.0.30" --verbose
368           cargo update -p proc-macro2 --precise "1.0.65" --verbose
369       - name: Rebuild C bindings, and check the sample app builds + links
370         run: |
371           cd ldk-c-bindings
372           ./genbindings.sh ../rust-lightning true
373       - name: Checkout latest MacOS binaries
374         shell: bash
375         run: |
376           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
377           echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
378           # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
379           SNAPSHOT_LINK="$(curl "https://git.bitcoin.ninja/index.cgi?p=ldk-java-bins;a=tree;f=${LDK_GARBAGECOLLECTED_GIT_OVERRIDE};hb=refs/heads/main" | grep snapshot | grep -o 'href="[a-zA-Z0-9/?\.=;\-]*"' | sed 's/href="//' | tr -d '"' | grep snapshot)"
380           curl -o bins-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
381           mkdir -p ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
382           cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
383           tar xvvf ../../bins-snapshot.tgz
384           mv ldk-java-bins-*/* ./
385           rm -r ldk-java-bins-*
386           cd ../..
387           mkdir -p src/main/resources/
388       - name: Copy latest MacOS leaktracking libs
389         run: |
390           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
391           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"liblightningjni_MacOSX-aarch64-leaktracking.nativelib src/main/resources/liblightningjni_MacOSX-aarch64.nativelib
392           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"liblightningjni_MacOSX-x86_64-leaktracking.nativelib src/main/resources/liblightningjni_MacOSX-x86_64.nativelib
393       - name: Build Leaktracking Java Release Bindings
394         run: |
395           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
396           ./genbindings.sh ./ldk-c-bindings/ "-I/usr/lib/jvm/java-17-openjdk-amd64/include/ -I/usr/lib/jvm/java-17-openjdk-amd64/include/linux/" leaks false
397       - name: Build deterministic release jar
398         run: |
399           ./build-release-jar.sh
400           mv ldk-java.jar ldk-java-leaktracking.jar
401       - name: Copy latest MacOS libs
402         shell: bash
403         run: |
404           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
405           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/liblightningjni_MacOSX-"{aarch64,x86_64}.nativelib src/main/resources/
406       - name: Build Java leaktracking Bindings
407         run: |
408           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
409           ./genbindings.sh ./ldk-c-bindings/ "-I/usr/lib/jvm/java-17-openjdk-amd64/include/ -I/usr/lib/jvm/java-17-openjdk-amd64/include/linux/" leaks false
410           mkdir ldk-java-bins/new/
411           cp src/main/resources/liblightningjni_Linux-amd64.nativelib ldk-java-bins/new/liblightningjni_Linux-amd64-leaktracking.nativelib
412       - name: Build Java Release Bindings
413         run: |
414           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
415           ./genbindings.sh ./ldk-c-bindings/ "-I/usr/lib/jvm/java-17-openjdk-amd64/include/ -I/usr/lib/jvm/java-17-openjdk-amd64/include/linux/" false false
416       - name: Build deterministic release jar
417         run: ./build-release-jar.sh
418       - uses: actions/upload-artifact@v3
419         with:
420           name: ldk-java.jar
421           path: ldk-java.jar
422       - uses: actions/upload-artifact@v3
423         with:
424           name: ldk-java-leaktracking.jar
425           path: ldk-java-leaktracking.jar
426       - name: Check latest library and jars are in bins repo
427         run: |
428           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
429           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"liblightningjni_Mac*.nativelib ldk-java-bins/new/
430           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"LDK-release.aar ldk-java-bins/new/
431           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"org.ldk.nupkg ldk-java-bins/new/
432           cp src/main/resources/liblightningjni_Linux-amd64.nativelib ldk-java-bins/new/
433           cp ldk-java-sources.jar ldk-java-bins/new/
434           cp ldk-java.jar ldk-java-bins/new/
435           cp ldk-java-leaktracking.jar ldk-java-bins/new/
436           cp ldk-java-classes.jar ldk-java-bins/new/
437           cd ldk-java-bins
438           rm "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/liblightningjs.wasm" # TODO: Test this
439           if ! diff -r "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/" new/; then
440             apt-get -y install diffoscope
441             diffoscope new/ldk-java-sources.jar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java-sources.jar" || echo
442             diffoscope new/ldk-java-classes.jar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java-classes.jar" || echo
443             diffoscope new/ldk-java.jar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java.jar" || echo
444             diffoscope new/ldk-java-leaktracking.jar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java-leaktracking.jar" || echo
445             exit 1
446           fi
447       - name: Run Java Tests against built release jar
448         run: |
449           mvn install:install-file -Dfile=ldk-java.jar -DgroupId=org.lightningdevkit -DartifactId=ldk-java -Dversion=1.0-SNAPSHOT -Dpackaging=jar
450           cd javatester
451           mvn package
452           java -ea -jar target/ldk-java-tests-1.0-SNAPSHOT-jar-with-dependencies.jar
453
454   macos_determinism:
455     runs-on: ubuntu-latest
456     # Ubuntu's version of rustc uses its own LLVM instead of being a real native package.
457     # This leaves us with an incompatible LLVM version when linking. Instead, use a real OS.
458     container: debian:bookworm
459     strategy:
460       fail-fast: false
461     steps:
462       - name: Install native Rust toolchain, Valgrind, and build utilitis
463         run: |
464           apt-get update
465           apt-get -y dist-upgrade
466           apt-get -y install cargo valgrind openjdk-17-jdk lld git g++ clang llvm curl rust-src
467       - name: Checkout source code
468         uses: actions/checkout@v2
469         with:
470           fetch-depth: 0
471       - name: Install cbindgen
472         run: |
473           git config --global safe.directory '*'
474           git clone https://github.com/eqrion/cbindgen
475           cd cbindgen/
476           git checkout v0.20.0
477           cargo update -p indexmap --precise "1.6.2" --verbose
478           cargo install --locked --path .
479       - name: Checkout Rust-Lightning and LDK-C-Bindings git
480         run: |
481           git config --global user.email "ldk-ci@example.com"
482           git config --global user.name "LDK CI"
483           # Note this is a different endpoint, as we need one non-upstream commit!
484           git clone https://github.com/lightningdevkit/rust-lightning
485           cd rust-lightning
486           git checkout origin/0.0.121-bindings
487           cd ..
488           git clone https://github.com/lightningdevkit/ldk-c-bindings
489           cd ldk-c-bindings
490           git checkout 0.0.121
491       - name: Fetch MacOS SDK
492         run: |
493           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
494           tar xvvf Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz
495       - name: Rebuild C bindings, and check the sample app builds + links
496         run: |
497           # rust-src doesn't distribute the rustlib Cargo.lock, but an empty
498           # file seems to suffice to make `-Zbuild-std` happy.
499           touch /usr/lib/rustlib/src/rust/Cargo.lock
500           export MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
501           cd ldk-c-bindings
502           ./genbindings.sh ../rust-lightning true
503       - name: Fetch MacOS OpenJDK 18 for x86_64
504         run: |
505           curl -o openjdk-18.0.1.1_macos-x64_bin.tar.gz https://download.java.net/java/GA/jdk18.0.1.1/65ae32619e2f40f3a9af3af1851d6e19/2/GPL/openjdk-18.0.1.1_macos-x64_bin.tar.gz
506           if [ "$(shasum -a 256 openjdk-18.0.1.1_macos-x64_bin.tar.gz | awk '{ print $1 }')" != "f02d17ec5a387555f8489abc352d973b6c10364409b597046025938e2266d72a" ]; then
507             echo "Bad hash"
508             exit 1
509           fi
510           mkdir jdk-x86_64
511           cd jdk-x86_64
512           tar xvvf ../openjdk-18.0.1.1_macos-x64_bin.tar.gz
513       - name: Fetch MacOS OpenJDK 18 for aarch64
514         run: |
515           curl -o openjdk-18.0.1.1_macos-aarch64_bin.tar.gz https://download.java.net/java/GA/jdk18.0.1.1/65ae32619e2f40f3a9af3af1851d6e19/2/GPL/openjdk-18.0.1.1_macos-aarch64_bin.tar.gz
516           if [ "$(shasum -a 256 openjdk-18.0.1.1_macos-aarch64_bin.tar.gz | awk '{ print $1 }')" != "29773ad68063bdad7fbaeb762cd873d3f243e86de380d3ac5335cdb929371fb5" ]; then
517             echo "Bad hash"
518             exit 1
519           fi
520           mkdir jdk-aarch64
521           cd jdk-aarch64
522           tar xvvf ../openjdk-18.0.1.1_macos-aarch64_bin.tar.gz
523       - name: Build MacOS aarch64 Java leaktracking Release Bindings
524         run: |
525           MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
526           JAVA_HOME=jdk-aarch64/jdk-18.0.1.1.jdk/Contents/Home
527           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
528           CC=clang LDK_TARGET=aarch64-apple-darwin LDK_TARGET_CPU=apple-a14 ./genbindings.sh ./ldk-c-bindings/ "-I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin -isysroot$MACOS_SDK" leaks false
529           mv src/main/resources/liblightningjni_MacOSX-aarch64.nativelib src/main/resources/liblightningjni_MacOSX-aarch64-leaktracking.nativelib
530       - name: Build MacOS x86_64 Java leaktracking Release Bindings
531         run: |
532           MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
533           JAVA_HOME=jdk-x86_64/jdk-18.0.1.1.jdk/Contents/Home
534           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
535           CC=clang LDK_TARGET=x86_64-apple-darwin LDK_TARGET_CPU=sandybridge ./genbindings.sh ./ldk-c-bindings/ "-I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin -isysroot$MACOS_SDK" leaks false
536           mv src/main/resources/liblightningjni_MacOSX-x86_64.nativelib src/main/resources/liblightningjni_MacOSX-x86_64-leaktracking.nativelib
537       - name: Build MacOS aarch64 Java Release Bindings
538         run: |
539           MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
540           JAVA_HOME=jdk-aarch64/jdk-18.0.1.1.jdk/Contents/Home
541           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
542           CC=clang LDK_TARGET=aarch64-apple-darwin LDK_TARGET_CPU=apple-a14 ./genbindings.sh ./ldk-c-bindings/ "-I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin -isysroot$MACOS_SDK" false false
543       - name: Build MacOS x86_64 Java Release Bindings
544         run: |
545           MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
546           JAVA_HOME=jdk-x86_64/jdk-18.0.1.1.jdk/Contents/Home
547           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
548           CC=clang LDK_TARGET=x86_64-apple-darwin LDK_TARGET_CPU=sandybridge ./genbindings.sh ./ldk-c-bindings/ "-I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin -isysroot$MACOS_SDK" false false
549       - name: Checkout latest binaries
550         run: |
551           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
552           echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
553           # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
554           SNAPSHOT_LINK="$(curl "https://git.bitcoin.ninja/index.cgi?p=ldk-java-bins;a=tree;f=${LDK_GARBAGECOLLECTED_GIT_OVERRIDE};hb=refs/heads/main" | grep snapshot | grep -o 'href="[a-zA-Z0-9/?\.=;\-]*"' | sed 's/href="//' | tr -d '"' | grep snapshot)"
555           curl -o bins-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
556           mkdir -p ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
557           cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
558           tar xvvf ../../bins-snapshot.tgz
559           mv ldk-java-bins-*/* ./
560           rm -r ldk-java-bins-*
561           cd ../..
562       - name: Check latest MacOS libraries are in the bins repo
563         shell: bash
564         run: |
565           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
566           for F in liblightningjni_MacOSX-{x86_64,aarch64}{,-leaktracking}.nativelib; do
567             if ! diff "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/$F" "src/main/resources/$F"; then
568               apt-get -y install diffoscope
569               # Sadly these binaries are still non-deterministic, but only due
570               # to a few-byte tag, thus we use diffoscope to ensure there
571               # aren't any "real" differences and move on.
572               diffoscope "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/$F" "src/main/resources/$F" || echo
573             fi
574           done
575
576   android:
577     runs-on: ubuntu-latest
578     # Frankly, I'm not really sure why debian and ubuntu differ in the results here, they really shouldn't
579     container: debian:bullseye
580     strategy:
581       fail-fast: false
582     steps:
583       - name: Install rust targets
584         run: |
585           apt-get update
586           apt-get -y dist-upgrade
587           apt-get -y install git g++ clang faketime zip unzip curl openjdk-17-jdk
588           curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
589           chmod +x ./rustup.sh
590           ./rustup.sh -y
591           . $HOME/.cargo/env
592           # Temporarily use 1.67.1 to fix https://github.com/rust-lang/rust/issues/108943
593           rustup install 1.67.1
594           rustup default 1.67.1
595           rustup target add armv7-linux-androideabi
596           rustup target add aarch64-linux-android
597           rustup target add i686-linux-android
598           rustup target add x86_64-linux-android
599       - name: Checkout source code
600         uses: actions/checkout@v2
601         with:
602           fetch-depth: 0
603       - name: Install android NDK compilers
604         run: |
605           git config --global safe.directory '*'
606           curl https://dl.google.com/android/repository/android-ndk-r22b-linux-x86_64.zip > android-ndk-r22b-linux-x86_64.zip
607           if [ "$(sha256sum android-ndk-r22b-linux-x86_64.zip | awk '{ print $1 }')" != "ac3a0421e76f71dd330d0cd55f9d99b9ac864c4c034fc67e0d671d022d4e806b" ]; then
608             echo "Bad hash"
609             exit 1
610           fi
611           unzip android-ndk-r22b-linux-x86_64.zip
612       - name: Install cbindgen
613         run: |
614           . $HOME/.cargo/env
615           cargo install cbindgen
616       - name: Checkout Rust-Lightning and LDK-C-Bindings git
617         run: |
618           git config --global user.email "ldk-ci@example.com"
619           git config --global user.name "LDK CI"
620           # Note this is a different endpoint, as we need one non-upstream commit!
621           git clone https://github.com/lightningdevkit/rust-lightning
622           cd rust-lightning
623           git checkout origin/0.0.121-bindings
624           cd ..
625           git clone https://github.com/lightningdevkit/ldk-c-bindings
626           cd ldk-c-bindings
627           git checkout 0.0.121
628           cd lightning-c-bindings
629           . $HOME/.cargo/env
630           cargo update -p memchr --precise "2.5.0" --verbose
631       - name: Checkout Android AAR binaries and artifacts
632         run: |
633           # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
634           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
635           echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
636           RELEASE_PAGE="https://git.bitcoin.ninja/index.cgi?p=ldk-java-bins;a=tree;f=${LDK_GARBAGECOLLECTED_GIT_OVERRIDE};hb=refs/heads/main"
637           SNAPSHOT_LINK="$(curl "$RELEASE_PAGE" | grep snapshot | grep -o 'href="[a-zA-Z0-9/?\.=;\-]*"' | sed 's/href="//' | tr -d '"' | grep snapshot)"
638           curl -o bins-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
639
640           ANDROID_PAGE="https://git.bitcoin.ninja/index.cgi?p=ldk-java-bins;a=tree;f=android-artifacts;hb=refs/heads/main"
641           SNAPSHOT_LINK="$(curl "$ANDROID_PAGE" | grep snapshot | grep -o 'href="[a-zA-Z0-9/?\.=;\-]*"' | sed 's/href="//' | tr -d '"' | grep snapshot)"
642           curl -o android-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
643
644           mkdir -p ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
645           cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
646           tar xvvf ../../bins-snapshot.tgz
647           mv ldk-java-bins-*/* ./
648           rm -r ldk-java-bins-*
649
650           mkdir -p ../android-artifacts
651           cd ../android-artifacts
652           tar xvvf ../../android-snapshot.tgz
653           mv ldk-java-bins-*/* ./
654           rm -r ldk-java-bins-*
655       - name: Build Android aar
656         run: |
657           . $HOME/.cargo/env
658           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
659           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java-classes.jar" ./
660           export ANDROID_TOOLCHAIN="$(pwd)/android-ndk-r22b/toolchains/llvm/prebuilt/linux-x86_64"
661           export PATH="$PATH:$ANDROID_TOOLCHAIN/bin"
662           ./android-build.sh ./rust-lightning ./ldk-c-bindings/ ./ldk-java-bins/android-artifacts
663       - uses: actions/upload-artifact@v3
664         with:
665           name: LDK-release.aar
666           path: LDK-release.aar
667       - name: Check latest library and jars are in bins repo
668         run: |
669           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
670           if ! diff LDK-release.aar "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"LDK-release.aar; then
671             apt-get -y install diffoscope
672             diffoscope LDK-release.aar "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/LDK-release.aar"
673             exit 1
674           fi
675
676   osx:
677     strategy:
678       matrix:
679         include:
680           - platform: macos-11
681           - platform: macos-12
682           - platform: macos-13
683       fail-fast: false
684     runs-on: ${{ matrix.platform }}
685     steps:
686       - name: Install Rust components
687         run: |
688           rustup target install aarch64-apple-darwin
689           rustup component add rust-src
690       - name: Checkout source code
691         uses: actions/checkout@v2
692         with:
693           fetch-depth: 0
694       - name: Install cbindgen
695         run: cargo install cbindgen
696       - name: Checkout Rust-Lightning and LDK-C-Bindings git
697         run: |
698           git config --global user.email "ldk-ci@example.com"
699           git config --global user.name "LDK CI"
700           # Note this is a different endpoint, as we need one non-upstream commit!
701           git clone https://github.com/lightningdevkit/rust-lightning
702           cd rust-lightning
703           git checkout origin/0.0.121-bindings
704           cd ..
705           git clone https://github.com/lightningdevkit/ldk-c-bindings
706           cd ldk-c-bindings
707           git checkout 0.0.121
708           cd lightning-c-bindings
709           cargo update -p memchr --precise "2.5.0" --verbose
710       - name: Rebuild C bindings and check the sample app builds + links
711         run: |
712           cd ldk-c-bindings
713           CC=clang ./genbindings.sh ../rust-lightning true
714       - name: Fetch OpenJDK 18
715         run: |
716           if [ "$(uname -m)" = "arm64" ]; then
717             wget -O openjdk-18.0.1.1_macos-aarch64_bin.tar.gz https://download.java.net/java/GA/jdk18.0.1.1/65ae32619e2f40f3a9af3af1851d6e19/2/GPL/openjdk-18.0.1.1_macos-aarch64_bin.tar.gz
718             if [ "$(shasum -a 256 openjdk-18.0.1.1_macos-aarch64_bin.tar.gz | awk '{ print $1 }')" != "29773ad68063bdad7fbaeb762cd873d3f243e86de380d3ac5335cdb929371fb5" ]; then
719               echo "Bad hash"
720               exit 1
721             fi
722             tar xvvf openjdk-18.0.1.1_macos-aarch64_bin.tar.gz
723           else
724             wget -O openjdk-18.0.1.1_macos-x64_bin.tar.gz https://download.java.net/java/GA/jdk18.0.1.1/65ae32619e2f40f3a9af3af1851d6e19/2/GPL/openjdk-18.0.1.1_macos-x64_bin.tar.gz
725             if [ "$(shasum -a 256 openjdk-18.0.1.1_macos-x64_bin.tar.gz | awk '{ print $1 }')" != "f02d17ec5a387555f8489abc352d973b6c10364409b597046025938e2266d72a" ]; then
726               echo "Bad hash"
727               exit 1
728             fi
729             tar xvvf openjdk-18.0.1.1_macos-x64_bin.tar.gz
730           fi
731       - name: Checkout latest Linux binaries
732         run: |
733           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
734           echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
735           # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
736           SNAPSHOT_LINK="$(wget -O /dev/stdout "https://git.bitcoin.ninja/index.cgi?p=ldk-java-bins;a=tree;f=${LDK_GARBAGECOLLECTED_GIT_OVERRIDE};hb=refs/heads/main" | grep snapshot | grep -o 'href="[a-zA-Z0-9/?\.=;\-]*"' | sed 's/href="//' | tr -d '"' | grep snapshot)"
737           wget -O bins-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
738           mkdir -p ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
739           cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
740           tar xvvf ../../bins-snapshot.tgz
741           mv ldk-java-bins-*/* ./
742           cd ../..
743           mkdir -p src/main/resources/
744           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/liblightningjni_Linux-"* src/main/resources/
745       - name: Build Java Release Bindings
746         run: |
747           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
748           export JAVA_HOME=`pwd`/jdk-18.0.1.1.jdk/Contents/Home
749           export PATH=$JAVA_HOME/bin:$PATH
750           ./genbindings.sh ./ldk-c-bindings/ "-I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin -isysroot$(xcrun --show-sdk-path)" false false
751
752           if [ "${{ matrix.platform }}" = "macos-11" ]; then
753             export CC="clang --target=aarch64-apple-darwin"
754             export LDK_TARGET=aarch64-apple-darwin
755             export LDK_TARGET_CPU=apple-a14
756             ./genbindings.sh ./ldk-c-bindings/ "-I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin -isysroot$(xcrun --show-sdk-path)" false false
757             cat src/main/resources/liblightningjni_MacOSX-aarch64.nativelib > /dev/null
758
759           fi
760       - name: Fetch Maven 3.8.4
761         run: |
762           # We don't bother using the upstream mirrors as they remove prior
763           # releases aggressively, causing spurious CI failures when we don't
764           # care about the version used.
765           wget -O apache-maven-3.8.4-bin.tar.gz https://bitcoin.ninja/apache-maven-3.8.4-bin.tar.gz
766           if [ "$(shasum -a 256 apache-maven-3.8.4-bin.tar.gz | awk '{ print $1 }')" != "2cdc9c519427bb20fdc25bef5a9063b790e4abd930e7b14b4e9f4863d6f9f13c" ]; then
767             echo "Bad hash"
768             exit 1
769           fi
770           tar xvvf apache-maven-3.8.4-bin.tar.gz
771           export PATH=apache-maven-3.8.4/bin:$PATH
772       - name: Run Java Tests against built jar
773         run: |
774           export JAVA_HOME=`pwd`/jdk-18.0.1.1.jdk/Contents/Home
775           export PATH=$JAVA_HOME/bin:$PATH
776           mvn -DskipTests=true package
777           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
778           JAR_VERSION=${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}
779           mvn install:install-file -Dfile=target/ldk-java-${JAR_VERSION}.jar -DgroupId=org.lightningdevkit -DartifactId=ldk-java -Dversion=1.0-SNAPSHOT -Dpackaging=jar
780           cd javatester
781           mvn -q -B package
782           java -ea -jar target/ldk-java-tests-1.0-SNAPSHOT-jar-with-dependencies.jar
783       - name: Run Java Tests against release bins
784         run: |
785           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
786           export JAVA_HOME=`pwd`/jdk-18.0.1.1.jdk/Contents/Home
787           export PATH=$JAVA_HOME/bin:$PATH
788           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java.jar" ./
789           mvn install:install-file -Dfile=ldk-java.jar -DgroupId=org.lightningdevkit -DartifactId=ldk-java -Dversion=1.0-SNAPSHOT -Dpackaging=jar
790           cd javatester
791           mvn clean
792           mvn -q -B package
793           java -ea -jar target/ldk-java-tests-1.0-SNAPSHOT-jar-with-dependencies.jar