[TS] Update auto-generated bindings to LDK-C-Bindings 0.0.123.1
[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.123-bindings
44           cd ..
45           git clone https://github.com/lightningdevkit/ldk-c-bindings
46           cd ldk-c-bindings
47           git checkout 0.0.123
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.123-bindings
142           cd ..
143           git clone https://github.com/lightningdevkit/ldk-c-bindings
144           cd ldk-c-bindings
145           git checkout 0.0.123
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.123-bindings
189           cd ..
190           git clone https://github.com/lightningdevkit/ldk-c-bindings
191           cd ldk-c-bindings
192           git checkout 0.0.123
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 mono-devel
258             diffoscope ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"org.ldk.nupkg c_sharp/org.ldk.nupkg || echo
259             exit 1
260           fi
261       - name: Run test against C# release library
262         shell: bash
263         run: |
264           cd c_sharp
265           ln -s ./packaging_artifacts/runtimes/linux-x64/native/libldkcsharp.so ./
266           LD_LIBRARY_PATH=. dotnet run --project tests.csproj
267           LD_LIBRARY_PATH=. dotnet run --project tests.csproj --configuration Release
268
269   osx_c_sharp:
270     strategy:
271       matrix:
272         include:
273           - platform: macos-13
274           - platform: macos-14
275       fail-fast: false
276     runs-on: ${{ matrix.platform }}
277     steps:
278       - name: Checkout source code
279         uses: actions/checkout@v2
280         with:
281           fetch-depth: 0
282       - name: Setup .NET
283         uses: actions/setup-dotnet@v4
284         with:
285           dotnet-version: '6.0.x'
286       - name: Checkout latest binaries
287         run: |
288           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
289           echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
290           # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
291           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)"
292           wget -O bins-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
293           mkdir -p ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
294           cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
295           tar xvvf ../../bins-snapshot.tgz
296           mv ldk-java-bins-*/* ./
297           unzip org.ldk.nupkg
298       - name: Run test against C# release library
299         shell: bash
300         run: |
301           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
302           cd c_sharp
303           if [ "$(uname -m)" = "arm64" ]; then
304             cp "../ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/runtimes/osx-arm64/native/libldkcsharp.dylib" ./libldkcsharp.dylib
305           else
306             cp "../ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/runtimes/osx-x64/native/libldkcsharp.dylib" ./libldkcsharp.dylib
307           fi
308           LD_LIBRARY_PATH=. dotnet run --project tests.csproj
309           LD_LIBRARY_PATH=. dotnet run --project tests.csproj --configuration Release
310
311   java_bindings:
312     runs-on: ubuntu-latest
313     # Ubuntu's version of rustc uses its own LLVM instead of being a real native package.
314     # This leaves us with an incompatible LLVM version when linking. Instead, use a real OS.
315     container: debian:bookworm
316     strategy:
317       fail-fast: false
318     steps:
319       - name: Install native Rust toolchain, Valgrind, and build utilitis
320         run: |
321           apt-get update
322           apt-get -y dist-upgrade
323           apt-get -y install cargo valgrind lld git g++ clang openjdk-17-jdk maven faketime zip unzip llvm curl
324       - name: Checkout source code
325         uses: actions/checkout@v2
326         with:
327           fetch-depth: 0
328       - name: Install cbindgen
329         run: |
330           git config --global safe.directory '*'
331           git clone https://github.com/eqrion/cbindgen
332           cd cbindgen/
333           git checkout v0.20.0
334           cargo update -p indexmap --precise "1.6.2" --verbose
335           cargo install --locked --path .
336       - name: Checkout Rust-Lightning and LDK-C-Bindings git
337         run: |
338           git config --global user.email "ldk-ci@example.com"
339           git config --global user.name "LDK CI"
340           # Note this is a different endpoint, as we need one non-upstream commit!
341           git clone https://github.com/lightningdevkit/rust-lightning
342           cd rust-lightning
343           git checkout origin/0.0.123-bindings
344           cd ..
345           git clone https://github.com/lightningdevkit/ldk-c-bindings
346           cd ldk-c-bindings
347           git checkout 0.0.123
348           cd lightning-c-bindings
349           cargo update -p memchr --precise "2.5.0" --verbose
350       - name: Pin proc-macro and quote to meet MSRV
351         run: |
352           cd ldk-c-bindings/c-bindings-gen
353           cargo update -p quote --precise "1.0.30" --verbose
354           cargo update -p proc-macro2 --precise "1.0.65" --verbose
355       - name: Rebuild C bindings, and check the sample app builds + links
356         run: |
357           cd ldk-c-bindings
358           ./genbindings.sh ../rust-lightning true
359       - name: Build Java Debug Bindings
360         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
361       - name: Run Java Tests against Debug Bindings
362         run: |
363           mv liblightningjni_debug_Linux-amd64.so liblightningjni.so
364           export ASAN_OPTIONS=detect_leaks=0
365           LD_PRELOAD=/usr/lib/llvm-14/lib/clang/14.0.6/lib/linux/libclang_rt.asan-x86_64.so LD_LIBRARY_PATH=. mvn test
366       - name: Build Java Release Bindings
367         run: |
368           ./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
369       - name: Check latest headers are in git
370         run: |
371           git checkout pom.xml
372           git diff --exit-code
373
374   java_determinism:
375     runs-on: ubuntu-latest
376     # Ubuntu's version of rustc uses its own LLVM instead of being a real native package.
377     # This leaves us with an incompatible LLVM version when linking. Instead, use a real OS.
378     container: debian:bookworm
379     strategy:
380       fail-fast: false
381     steps:
382       - name: Install native Rust toolchain, Valgrind, and build utilitis
383         run: |
384           apt-get update
385           apt-get -y dist-upgrade
386           apt-get -y install cargo valgrind lld git g++ clang openjdk-17-jdk maven faketime zip unzip llvm curl
387       - name: Checkout source code
388         uses: actions/checkout@v2
389         with:
390           fetch-depth: 0
391       - name: Install cbindgen
392         run: |
393           git config --global safe.directory '*'
394           git clone https://github.com/eqrion/cbindgen
395           cd cbindgen/
396           git checkout v0.20.0
397           cargo update -p indexmap --precise "1.6.2" --verbose
398           cargo install --locked --path .
399       - name: Checkout Rust-Lightning and LDK-C-Bindings git
400         run: |
401           git config --global user.email "ldk-ci@example.com"
402           git config --global user.name "LDK CI"
403           # Note this is a different endpoint, as we need one non-upstream commit!
404           git clone https://github.com/lightningdevkit/rust-lightning
405           cd rust-lightning
406           git checkout origin/0.0.123-bindings
407           cd ..
408           git clone https://github.com/lightningdevkit/ldk-c-bindings
409           cd ldk-c-bindings
410           git checkout 0.0.123
411           cd lightning-c-bindings
412           cargo update -p memchr --precise "2.5.0" --verbose
413       - name: Pin proc-macro and quote to meet MSRV
414         run: |
415           cd ldk-c-bindings/c-bindings-gen
416           cargo update -p quote --precise "1.0.30" --verbose
417           cargo update -p proc-macro2 --precise "1.0.65" --verbose
418       - name: Rebuild C bindings, and check the sample app builds + links
419         run: |
420           cd ldk-c-bindings
421           ./genbindings.sh ../rust-lightning true
422       - name: Checkout latest MacOS binaries
423         shell: bash
424         run: |
425           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
426           echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
427           # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
428           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)"
429           curl -o bins-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
430           mkdir -p ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
431           cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
432           tar xvvf ../../bins-snapshot.tgz
433           mv ldk-java-bins-*/* ./
434           rm -r ldk-java-bins-*
435           cd ../..
436           mkdir -p src/main/resources/
437       - name: Copy latest MacOS leaktracking libs
438         run: |
439           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
440           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"liblightningjni_MacOSX-aarch64-leaktracking.nativelib src/main/resources/liblightningjni_MacOSX-aarch64.nativelib
441           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"liblightningjni_MacOSX-x86_64-leaktracking.nativelib src/main/resources/liblightningjni_MacOSX-x86_64.nativelib
442       - name: Build Leaktracking Java Release Bindings
443         run: |
444           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
445           ./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
446       - name: Build deterministic release jar
447         run: |
448           ./build-release-jar.sh
449           mv ldk-java.jar ldk-java-leaktracking.jar
450       - name: Copy latest MacOS libs
451         shell: bash
452         run: |
453           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
454           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/liblightningjni_MacOSX-"{aarch64,x86_64}.nativelib src/main/resources/
455       - name: Build Java leaktracking Bindings
456         run: |
457           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
458           ./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
459           mkdir ldk-java-bins/new/
460           cp src/main/resources/liblightningjni_Linux-amd64.nativelib ldk-java-bins/new/liblightningjni_Linux-amd64-leaktracking.nativelib
461       - name: Build Java Release Bindings
462         run: |
463           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
464           ./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
465       - name: Build deterministic release jar
466         run: ./build-release-jar.sh
467       - uses: actions/upload-artifact@v3
468         with:
469           name: ldk-java.jar
470           path: ldk-java.jar
471       - uses: actions/upload-artifact@v3
472         with:
473           name: ldk-java-leaktracking.jar
474           path: ldk-java-leaktracking.jar
475       - name: Check latest library and jars are in bins repo
476         run: |
477           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
478           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"liblightningjni_Mac*.nativelib ldk-java-bins/new/
479           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"LDK-release.aar ldk-java-bins/new/
480           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"org.ldk.nupkg ldk-java-bins/new/
481           cp src/main/resources/liblightningjni_Linux-amd64.nativelib ldk-java-bins/new/
482           cp ldk-java-sources.jar ldk-java-bins/new/
483           cp ldk-java.jar ldk-java-bins/new/
484           cp ldk-java-leaktracking.jar ldk-java-bins/new/
485           cp ldk-java-classes.jar ldk-java-bins/new/
486           cd ldk-java-bins
487           rm "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/liblightningjs.wasm" # TODO: Test this
488           if ! diff -r "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/" new/; then
489             apt-get -y install diffoscope
490             diffoscope new/ldk-java-sources.jar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java-sources.jar" || echo
491             diffoscope new/ldk-java-classes.jar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java-classes.jar" || echo
492             diffoscope new/ldk-java.jar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java.jar" || echo
493             diffoscope new/ldk-java-leaktracking.jar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java-leaktracking.jar" || echo
494             exit 1
495           fi
496       - name: Run Java Tests against built release jar
497         run: |
498           mvn install:install-file -Dfile=ldk-java.jar -DgroupId=org.lightningdevkit -DartifactId=ldk-java -Dversion=1.0-SNAPSHOT -Dpackaging=jar
499           cd javatester
500           mvn package
501           java -ea -jar target/ldk-java-tests-1.0-SNAPSHOT-jar-with-dependencies.jar
502
503   macos_determinism:
504     runs-on: ubuntu-latest
505     # Ubuntu's version of rustc uses its own LLVM instead of being a real native package.
506     # This leaves us with an incompatible LLVM version when linking. Instead, use a real OS.
507     container: debian:bookworm
508     strategy:
509       fail-fast: false
510     steps:
511       - name: Install native Rust toolchain, Valgrind, and build utilitis
512         run: |
513           apt-get update
514           apt-get -y dist-upgrade
515           apt-get -y install cargo valgrind openjdk-17-jdk lld git g++ clang llvm curl rust-src
516       - name: Checkout source code
517         uses: actions/checkout@v2
518         with:
519           fetch-depth: 0
520       - name: Install cbindgen
521         run: |
522           git config --global safe.directory '*'
523           git clone https://github.com/eqrion/cbindgen
524           cd cbindgen/
525           git checkout v0.20.0
526           cargo update -p indexmap --precise "1.6.2" --verbose
527           cargo install --locked --path .
528       - name: Checkout Rust-Lightning and LDK-C-Bindings git
529         run: |
530           git config --global user.email "ldk-ci@example.com"
531           git config --global user.name "LDK CI"
532           # Note this is a different endpoint, as we need one non-upstream commit!
533           git clone https://github.com/lightningdevkit/rust-lightning
534           cd rust-lightning
535           git checkout origin/0.0.123-bindings
536           cd ..
537           git clone https://github.com/lightningdevkit/ldk-c-bindings
538           cd ldk-c-bindings
539           git checkout 0.0.123
540       - name: Fetch MacOS SDK
541         run: |
542           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
543           tar xvvf Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz
544       - name: Rebuild C bindings, and check the sample app builds + links
545         run: |
546           # rust-src doesn't distribute the rustlib Cargo.lock, but an empty
547           # file seems to suffice to make `-Zbuild-std` happy.
548           touch /usr/lib/rustlib/src/rust/Cargo.lock
549           export MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
550           cd ldk-c-bindings
551           ./genbindings.sh ../rust-lightning true
552       - name: Fetch MacOS OpenJDK 18 for x86_64
553         run: |
554           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
555           if [ "$(shasum -a 256 openjdk-18.0.1.1_macos-x64_bin.tar.gz | awk '{ print $1 }')" != "f02d17ec5a387555f8489abc352d973b6c10364409b597046025938e2266d72a" ]; then
556             echo "Bad hash"
557             exit 1
558           fi
559           mkdir jdk-x86_64
560           cd jdk-x86_64
561           tar xvvf ../openjdk-18.0.1.1_macos-x64_bin.tar.gz
562       - name: Fetch MacOS OpenJDK 18 for aarch64
563         run: |
564           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
565           if [ "$(shasum -a 256 openjdk-18.0.1.1_macos-aarch64_bin.tar.gz | awk '{ print $1 }')" != "29773ad68063bdad7fbaeb762cd873d3f243e86de380d3ac5335cdb929371fb5" ]; then
566             echo "Bad hash"
567             exit 1
568           fi
569           mkdir jdk-aarch64
570           cd jdk-aarch64
571           tar xvvf ../openjdk-18.0.1.1_macos-aarch64_bin.tar.gz
572       - name: Build MacOS aarch64 Java leaktracking Release Bindings
573         run: |
574           MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
575           JAVA_HOME=jdk-aarch64/jdk-18.0.1.1.jdk/Contents/Home
576           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
577           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
578           mv src/main/resources/liblightningjni_MacOSX-aarch64.nativelib src/main/resources/liblightningjni_MacOSX-aarch64-leaktracking.nativelib
579       - name: Build MacOS x86_64 Java leaktracking Release Bindings
580         run: |
581           MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
582           JAVA_HOME=jdk-x86_64/jdk-18.0.1.1.jdk/Contents/Home
583           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
584           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
585           mv src/main/resources/liblightningjni_MacOSX-x86_64.nativelib src/main/resources/liblightningjni_MacOSX-x86_64-leaktracking.nativelib
586       - name: Build MacOS aarch64 Java Release Bindings
587         run: |
588           MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
589           JAVA_HOME=jdk-aarch64/jdk-18.0.1.1.jdk/Contents/Home
590           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
591           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
592       - name: Build MacOS x86_64 Java Release Bindings
593         run: |
594           MACOS_SDK="$PWD/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
595           JAVA_HOME=jdk-x86_64/jdk-18.0.1.1.jdk/Contents/Home
596           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
597           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
598       - name: Checkout latest binaries
599         run: |
600           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
601           echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
602           # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
603           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)"
604           curl -o bins-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
605           mkdir -p ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
606           cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
607           tar xvvf ../../bins-snapshot.tgz
608           mv ldk-java-bins-*/* ./
609           rm -r ldk-java-bins-*
610           cd ../..
611       - name: Check latest MacOS libraries are in the bins repo
612         shell: bash
613         run: |
614           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
615           for F in liblightningjni_MacOSX-{x86_64,aarch64}{,-leaktracking}.nativelib; do
616             if ! diff "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/$F" "src/main/resources/$F"; then
617               apt-get -y install diffoscope
618               # Sadly these binaries are still non-deterministic, but only due
619               # to a few-byte tag, thus we use diffoscope to ensure there
620               # aren't any "real" differences and move on.
621               diffoscope "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/$F" "src/main/resources/$F" || echo
622             fi
623           done
624
625   android:
626     runs-on: ubuntu-latest
627     # Frankly, I'm not really sure why debian and ubuntu differ in the results here, they really shouldn't
628     container: debian:bookworm
629     strategy:
630       fail-fast: false
631     steps:
632       - name: Install rust targets
633         run: |
634           apt-get update
635           apt-get -y dist-upgrade
636           apt-get -y install git g++ clang faketime zip unzip curl openjdk-17-jdk
637           curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
638           chmod +x ./rustup.sh
639           ./rustup.sh -y
640           . $HOME/.cargo/env
641           # Temporarily use 1.67.1 to fix https://github.com/rust-lang/rust/issues/108943
642           rustup install 1.67.1
643           rustup default 1.67.1
644           rustup target add armv7-linux-androideabi
645           rustup target add aarch64-linux-android
646           rustup target add i686-linux-android
647           rustup target add x86_64-linux-android
648       - name: Checkout source code
649         uses: actions/checkout@v2
650         with:
651           fetch-depth: 0
652       - name: Install android NDK compilers
653         run: |
654           git config --global safe.directory '*'
655           curl https://dl.google.com/android/repository/android-ndk-r22b-linux-x86_64.zip > android-ndk-r22b-linux-x86_64.zip
656           if [ "$(sha256sum android-ndk-r22b-linux-x86_64.zip | awk '{ print $1 }')" != "ac3a0421e76f71dd330d0cd55f9d99b9ac864c4c034fc67e0d671d022d4e806b" ]; then
657             echo "Bad hash"
658             exit 1
659           fi
660           unzip android-ndk-r22b-linux-x86_64.zip
661       - name: Install cbindgen
662         run: |
663           . $HOME/.cargo/env
664           cargo install cbindgen
665       - name: Checkout Rust-Lightning and LDK-C-Bindings git
666         run: |
667           git config --global user.email "ldk-ci@example.com"
668           git config --global user.name "LDK CI"
669           # Note this is a different endpoint, as we need one non-upstream commit!
670           git clone https://github.com/lightningdevkit/rust-lightning
671           cd rust-lightning
672           git checkout origin/0.0.123-bindings
673           cd ..
674           git clone https://github.com/lightningdevkit/ldk-c-bindings
675           cd ldk-c-bindings
676           git checkout 0.0.123
677           cd lightning-c-bindings
678           . $HOME/.cargo/env
679           cargo update -p memchr --precise "2.5.0" --verbose
680       - name: Checkout Android AAR binaries and artifacts
681         run: |
682           # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
683           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
684           echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
685           RELEASE_PAGE="https://git.bitcoin.ninja/index.cgi?p=ldk-java-bins;a=tree;f=${LDK_GARBAGECOLLECTED_GIT_OVERRIDE};hb=refs/heads/main"
686           SNAPSHOT_LINK="$(curl "$RELEASE_PAGE" | grep snapshot | grep -o 'href="[a-zA-Z0-9/?\.=;\-]*"' | sed 's/href="//' | tr -d '"' | grep snapshot)"
687           curl -o bins-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
688
689           ANDROID_PAGE="https://git.bitcoin.ninja/index.cgi?p=ldk-java-bins;a=tree;f=android-artifacts;hb=refs/heads/main"
690           SNAPSHOT_LINK="$(curl "$ANDROID_PAGE" | grep snapshot | grep -o 'href="[a-zA-Z0-9/?\.=;\-]*"' | sed 's/href="//' | tr -d '"' | grep snapshot)"
691           curl -o android-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
692
693           mkdir -p ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
694           cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
695           tar xvvf ../../bins-snapshot.tgz
696           mv ldk-java-bins-*/* ./
697           rm -r ldk-java-bins-*
698
699           mkdir -p ../android-artifacts
700           cd ../android-artifacts
701           tar xvvf ../../android-snapshot.tgz
702           mv ldk-java-bins-*/* ./
703           rm -r ldk-java-bins-*
704       - name: Build Android aar
705         run: |
706           . $HOME/.cargo/env
707           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
708           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java-classes.jar" ./
709           export ANDROID_TOOLCHAIN="$(pwd)/android-ndk-r22b/toolchains/llvm/prebuilt/linux-x86_64"
710           export PATH="$PATH:$ANDROID_TOOLCHAIN/bin"
711           ./android-build.sh ./rust-lightning ./ldk-c-bindings/ ./ldk-java-bins/android-artifacts
712       - uses: actions/upload-artifact@v3
713         with:
714           name: LDK-release.aar
715           path: LDK-release.aar
716       - name: Check latest library and jars are in bins repo
717         run: |
718           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
719           if ! diff LDK-release.aar "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"LDK-release.aar; then
720             apt-get -y install diffoscope
721             diffoscope LDK-release.aar "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/LDK-release.aar"
722             exit 1
723           fi
724
725   osx_java:
726     strategy:
727       matrix:
728         include:
729           - platform: macos-13
730           - platform: macos-14
731       fail-fast: false
732     runs-on: ${{ matrix.platform }}
733     steps:
734       - name: Checkout source code
735         uses: actions/checkout@v2
736         with:
737           fetch-depth: 0
738       - name: Fetch OpenJDK 18
739         run: |
740           if [ "$(uname -m)" = "arm64" ]; then
741             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
742             if [ "$(shasum -a 256 openjdk-18.0.1.1_macos-aarch64_bin.tar.gz | awk '{ print $1 }')" != "29773ad68063bdad7fbaeb762cd873d3f243e86de380d3ac5335cdb929371fb5" ]; then
743               echo "Bad hash"
744               exit 1
745             fi
746             tar xvvf openjdk-18.0.1.1_macos-aarch64_bin.tar.gz
747           else
748             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
749             if [ "$(shasum -a 256 openjdk-18.0.1.1_macos-x64_bin.tar.gz | awk '{ print $1 }')" != "f02d17ec5a387555f8489abc352d973b6c10364409b597046025938e2266d72a" ]; then
750               echo "Bad hash"
751               exit 1
752             fi
753             tar xvvf openjdk-18.0.1.1_macos-x64_bin.tar.gz
754           fi
755       - name: Checkout latest binaries
756         run: |
757           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
758           echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
759           # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
760           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)"
761           wget -O bins-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
762           mkdir -p ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
763           cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
764           tar xvvf ../../bins-snapshot.tgz
765           mv ldk-java-bins-*/* ./
766       - name: Fetch Maven 3.8.4
767         run: |
768           # We don't bother using the upstream mirrors as they remove prior
769           # releases aggressively, causing spurious CI failures when we don't
770           # care about the version used.
771           wget -O apache-maven-3.8.4-bin.tar.gz https://bitcoin.ninja/apache-maven-3.8.4-bin.tar.gz
772           if [ "$(shasum -a 256 apache-maven-3.8.4-bin.tar.gz | awk '{ print $1 }')" != "2cdc9c519427bb20fdc25bef5a9063b790e4abd930e7b14b4e9f4863d6f9f13c" ]; then
773             echo "Bad hash"
774             exit 1
775           fi
776           tar xvvf apache-maven-3.8.4-bin.tar.gz
777           export PATH=apache-maven-3.8.4/bin:$PATH
778       - name: Run Java Tests against release bins
779         run: |
780           export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
781           export JAVA_HOME=`pwd`/jdk-18.0.1.1.jdk/Contents/Home
782           export PATH=$JAVA_HOME/bin:$PATH
783           cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java.jar" ./
784           mvn install:install-file -Dfile=ldk-java.jar -DgroupId=org.lightningdevkit -DartifactId=ldk-java -Dversion=1.0-SNAPSHOT -Dpackaging=jar
785           cd javatester
786           mvn clean
787           mvn -q -B package
788           java -ea -jar target/ldk-java-tests-1.0-SNAPSHOT-jar-with-dependencies.jar