1 name: Continuous Integration Checks
3 on: [push, pull_request]
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
16 - name: Install build utilities and test that clang can build for wasm
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
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
28 - name: Install cbindgen
29 run: cargo install --force cbindgen
30 - name: Checkout Rust-Lightning and LDK-C-Bindings git
32 git config --global user.email "ldk-ci@example.com"
33 git config --global user.name "LDK CI"
34 # Note this is a different endpoint, as we need one non-upstream commit!
35 git clone https://git.bitcoin.ninja/rust-lightning
37 git checkout origin/2021-03-java-bindings-base
39 git clone https://github.com/lightningdevkit/ldk-c-bindings
42 - name: Rebuild C bindings without STD
45 ./genbindings.sh ../rust-lightning false
46 - name: Build and Test TS Debug Bindings for Node
48 # We need FinalizationRegistry and top-level await support, which requires node 14.6/8,
49 # however Debian ships with Node 12
50 # Thus, we install the binary nodejs from nodejs.org and test with that.
51 curl https://nodejs.org/dist/v16.13.1/node-v16.13.1-linux-x64.tar.xz > nodejs.tar.xz
52 tar xvvf nodejs.tar.xz
53 export PATH=$(pwd)/$(echo node-*/bin):$PATH
54 ./genbindings.sh ./ldk-c-bindings/ wasm true false
55 - name: Build and Test TS Release Bindings for Node
57 export PATH=$(pwd)/$(echo node-*/bin):$PATH
58 ./genbindings.sh ./ldk-c-bindings/ wasm false false
59 - name: Install Playwright for Web Tests
61 export HOME=/root/ # Github actions is apparently broken
62 export PATH=$(pwd)/$(echo node-*/bin):$PATH
63 # npx playwright install-deps is broken so we do it manually, see https://github.com/microsoft/playwright/issues/11165
64 apt-get install -y --no-install-recommends fonts-liberation libenchant-2-2 libicu67 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 libwebp6 libwebpdemux2 libwoff1 libxkbcommon0 libxml2 libxslt1.1
65 mkdir -p $HOME/.cache/ms-playwright # `playwright install` is too dumb to create this for us
68 npx playwright install
69 - name: Build and Test TS Debug Bindings for Web
71 export HOME=/root/ # Github actions is apparently broken
72 export PATH=$(pwd)/$(echo node-*/bin):$PATH
73 ./genbindings.sh ./ldk-c-bindings/ wasm true true
75 rm liblightningjs.wasm && ln -s $(pwd)/../liblightningjs_debug.wasm ./liblightningjs.wasm
76 python3 -m http.server &
80 - name: Build and Test TS Release Bindings for Web
82 export HOME=/root/ # Github actions is apparently broken
83 export PATH=$(pwd)/$(echo node-*/bin):$PATH
84 ./genbindings.sh ./ldk-c-bindings/ wasm false true
86 rm liblightningjs.wasm && ln -s $(pwd)/../liblightningjs_release.wasm ./liblightningjs.wasm
87 python3 -m http.server &
91 - name: Check latest TS files are in git
96 runs-on: ubuntu-latest
97 # Ubuntu's version of rustc uses its own LLVM instead of being a real native package.
98 # This leaves us with an incompatible LLVM version when linking. Instead, use a real OS.
99 container: debian:bullseye
103 - name: Install native Rust toolchain, Valgrind, and build utilitis
106 apt-get -y dist-upgrade
107 apt-get -y install cargo valgrind lld git g++ clang openjdk-11-jdk maven faketime zip unzip llvm curl
108 - name: Checkout source code
109 uses: actions/checkout@v2
112 - name: Install cbindgen
113 run: cargo install --force cbindgen
114 - name: Checkout Rust-Lightning and LDK-C-Bindings git
116 git config --global user.email "ldk-ci@example.com"
117 git config --global user.name "LDK CI"
118 # Note this is a different endpoint, as we need one non-upstream commit!
119 git clone https://git.bitcoin.ninja/rust-lightning
121 git checkout origin/2021-03-java-bindings-base
123 git clone https://github.com/lightningdevkit/ldk-c-bindings
126 - name: Rebuild C bindings, and check the sample app builds + links
129 ./genbindings.sh ../rust-lightning true
130 - name: Build Java Debug Bindings
131 run: ./genbindings.sh ./ldk-c-bindings/ "-I/usr/lib/jvm/java-11-openjdk-amd64/include/ -I/usr/lib/jvm/java-11-openjdk-amd64/include/linux/" true false
132 - name: Run Java Tests against Debug Bindings
134 mv liblightningjni_debug_Linux-amd64.so liblightningjni.so
135 export ASAN_OPTIONS=detect_leaks=0
136 LD_PRELOAD=/usr/lib/llvm-11/lib/clang/11.0.1/lib/linux/libclang_rt.asan-x86_64.so LD_LIBRARY_PATH=. mvn test
137 - name: Build Java Release Bindings
139 ./genbindings.sh ./ldk-c-bindings/ "-I/usr/lib/jvm/java-11-openjdk-amd64/include/ -I/usr/lib/jvm/java-11-openjdk-amd64/include/linux/" false false
140 - name: Check latest headers are in git
146 runs-on: ubuntu-latest
147 # Ubuntu's version of rustc uses its own LLVM instead of being a real native package.
148 # This leaves us with an incompatible LLVM version when linking. Instead, use a real OS.
149 container: debian:bullseye
153 - name: Install native Rust toolchain, Valgrind, and build utilitis
156 apt-get -y dist-upgrade
157 apt-get -y install cargo valgrind lld git g++ clang openjdk-11-jdk maven faketime zip unzip llvm curl
158 - name: Checkout source code
159 uses: actions/checkout@v2
162 - name: Install cbindgen
163 run: cargo install --force cbindgen
164 - name: Checkout Rust-Lightning and LDK-C-Bindings git
166 git config --global user.email "ldk-ci@example.com"
167 git config --global user.name "LDK CI"
168 # Note this is a different endpoint, as we need one non-upstream commit!
169 git clone https://git.bitcoin.ninja/rust-lightning
171 git checkout origin/2021-03-java-bindings-base
173 git clone https://github.com/lightningdevkit/ldk-c-bindings
176 - name: Rebuild C bindings, and check the sample app builds + links
179 ./genbindings.sh ../rust-lightning true
180 - name: Checkout latest MacOS binaries
182 export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
183 echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
184 # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
185 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)"
186 curl -o bins-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
187 mkdir -p ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
188 cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
189 tar xvvf ../../bins-snapshot.tgz
190 mv ldk-java-bins-*/* ./
191 rm -r ldk-java-bins-*
193 mkdir -p src/main/resources/
194 cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/liblightningjni_MacOSX-"* src/main/resources/
195 - name: Build Java Release Bindings
197 export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
198 ./genbindings.sh ./ldk-c-bindings/ "-I/usr/lib/jvm/java-11-openjdk-amd64/include/ -I/usr/lib/jvm/java-11-openjdk-amd64/include/linux/" false false
199 - name: Build deterministic release jar
200 run: ./build-release-jar.sh
201 - name: Check latest library and jars are in bins repo
203 export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
204 mkdir ldk-java-bins/new/
205 cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"liblightningjni_Mac*.nativelib ldk-java-bins/new/
206 cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"LDK-release.aar ldk-java-bins/new/
207 # ldk-java-leaktracking is only for debug purposes and we don't bother with determinism
208 cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"ldk-java-leaktracking.jar ldk-java-bins/new/
209 cp src/main/resources/liblightningjni_Linux-amd64.nativelib ldk-java-bins/new/
210 cp ldk-java-sources.jar ldk-java-bins/new/
211 cp ldk-java.jar ldk-java-bins/new/
212 cp ldk-java-classes.jar ldk-java-bins/new/
213 cp ldk-java-javadoc.jar ldk-java-bins/new/
215 if ! diff -r "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/" new/; then
216 apt-get -y install diffoscope
217 diffoscope new/ldk-java-sources.jar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java-sources.jar" || echo
218 diffoscope new/ldk-java-javadoc.jar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java-javadoc.jar" || echo
219 diffoscope new/ldk-java-classes.jar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java-classes.jar" || echo
220 diffoscope new/ldk-java.jar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java.jar" || echo
223 - name: Run Java Tests against built release jar
225 mvn install:install-file -Dfile=ldk-java.jar -DgroupId=org.lightningdevkit -DartifactId=ldk-java -Dversion=1.0-SNAPSHOT -Dpackaging=jar
228 java -ea -jar target/ldk-java-tests-1.0-SNAPSHOT-jar-with-dependencies.jar
232 runs-on: ubuntu-latest
233 # Frankly, I'm not really sure why debian and ubuntu differ in the results here, they really shouldn't
234 container: debian:bullseye
238 - name: Install rust targets
241 apt-get -y dist-upgrade
242 apt-get -y install git g++ clang faketime zip unzip curl openjdk-11-jdk
243 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
247 rustup target add armv7-linux-androideabi
248 rustup target add aarch64-linux-android
249 rustup target add i686-linux-android
250 rustup target add x86_64-linux-android
251 - name: Checkout source code
252 uses: actions/checkout@v2
255 - name: Install android NDK compilers
257 curl https://dl.google.com/android/repository/android-ndk-r22b-linux-x86_64.zip > android-ndk-r22b-linux-x86_64.zip
258 if [ "$(sha256sum android-ndk-r22b-linux-x86_64.zip | awk '{ print $1 }')" != "ac3a0421e76f71dd330d0cd55f9d99b9ac864c4c034fc67e0d671d022d4e806b" ]; then
262 unzip android-ndk-r22b-linux-x86_64.zip
263 - name: Install cbindgen
266 cargo install --force cbindgen
267 - name: Checkout Rust-Lightning and LDK-C-Bindings git
269 git config --global user.email "ldk-ci@example.com"
270 git config --global user.name "LDK CI"
271 # Note this is a different endpoint, as we need one non-upstream commit!
272 git clone https://git.bitcoin.ninja/rust-lightning
274 git checkout origin/2021-03-java-bindings-base
276 git clone https://github.com/lightningdevkit/ldk-c-bindings
279 - name: Checkout Android AAR binaries and artifacts
281 # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
282 export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
283 echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
284 RELEASE_PAGE="https://git.bitcoin.ninja/index.cgi?p=ldk-java-bins;a=tree;f=${LDK_GARBAGECOLLECTED_GIT_OVERRIDE};hb=refs/heads/main"
285 SNAPSHOT_LINK="$(curl "$RELEASE_PAGE" | grep snapshot | grep -o 'href="[a-zA-Z0-9/?\.=;\-]*"' | sed 's/href="//' | tr -d '"' | grep snapshot)"
286 curl -o bins-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
288 ANDROID_PAGE="https://git.bitcoin.ninja/index.cgi?p=ldk-java-bins;a=tree;f=android-artifacts;hb=refs/heads/main"
289 SNAPSHOT_LINK="$(curl "$ANDROID_PAGE" | grep snapshot | grep -o 'href="[a-zA-Z0-9/?\.=;\-]*"' | sed 's/href="//' | tr -d '"' | grep snapshot)"
290 curl -o android-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
292 mkdir -p ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
293 cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
294 tar xvvf ../../bins-snapshot.tgz
295 mv ldk-java-bins-*/* ./
296 rm -r ldk-java-bins-*
298 mkdir -p ../android-artifacts
299 cd ../android-artifacts
300 tar xvvf ../../android-snapshot.tgz
301 mv ldk-java-bins-*/* ./
302 rm -r ldk-java-bins-*
303 - name: Build Android aar
306 export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
307 cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java-classes.jar" ./
308 export ANDROID_TOOLCHAIN="$(pwd)/android-ndk-r22b/toolchains/llvm/prebuilt/linux-x86_64"
309 export PATH="$PATH:$ANDROID_TOOLCHAIN/bin"
310 ./android-build.sh ./rust-lightning ./ldk-c-bindings/ ./ldk-java-bins/android-artifacts
311 - name: Check latest library and jars are in bins repo
313 export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
314 if ! diff LDK-release.aar "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"LDK-release.aar; then
315 apt-get -y install diffoscope
316 diffoscope LDK-release.aar "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/LDK-release.aar"
324 - platform: macos-10.15
327 runs-on: ${{ matrix.platform }}
329 - name: Install other Rust platforms
330 run: rustup target install aarch64-apple-darwin
331 - name: Fetch upstream LLVM/clang snapshot
333 wget -O clang+llvm-13.0.0-x86_64-apple-darwin.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-apple-darwin.tar.xz
334 if [ "$(shasum -a 256 clang+llvm-13.0.0-x86_64-apple-darwin.tar.xz | awk '{ print $1 }')" != "d051234eca1db1f5e4bc08c64937c879c7098900f7a0370f3ceb7544816a8b09" ]; then
338 - name: Unpack upstream LLVM+clang and use it by default
340 tar xvvf clang+llvm-13.0.0-x86_64-apple-darwin.tar.xz
341 - name: Checkout source code
342 uses: actions/checkout@v2
345 - name: Install cbindgen
346 run: cargo install --force cbindgen
347 - name: Checkout Rust-Lightning and LDK-C-Bindings git
349 git config --global user.email "ldk-ci@example.com"
350 git config --global user.name "LDK CI"
351 # Note this is a different endpoint, as we need one non-upstream commit!
352 git clone https://git.bitcoin.ninja/rust-lightning
354 git checkout origin/2021-03-java-bindings-base
356 git clone https://github.com/lightningdevkit/ldk-c-bindings
359 - name: Rebuild C bindings with upstream clang, and check the sample app builds + links
362 export PATH=`pwd`/clang+llvm-13.0.0-x86_64-apple-darwin/bin:$PATH
363 CC=clang ./genbindings.sh ../rust-lightning true
365 - name: Fetch OpenJDK 16
367 wget -O openjdk-16.0.1_osx-x64_bin.tar.gz https://download.java.net/java/GA/jdk16.0.1/7147401fd7354114ac51ef3e1328291f/9/GPL/openjdk-16.0.1_osx-x64_bin.tar.gz
368 if [ "$(shasum -a 256 openjdk-16.0.1_osx-x64_bin.tar.gz | awk '{ print $1 }')" != "6098f839954439d4916444757c542c1b8778a32461706812d41cc8bbefce7f2f" ]; then
372 tar xvvf openjdk-16.0.1_osx-x64_bin.tar.gz
373 - name: Checkout latest Linux binaries
375 export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
376 echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
377 # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
378 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)"
379 wget -O bins-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
380 mkdir -p ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
381 cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
382 tar xvvf ../../bins-snapshot.tgz
383 mv ldk-java-bins-*/* ./
385 mkdir -p src/main/resources/
386 cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/liblightningjni_Linux-"* src/main/resources/
387 - name: Build Java Release Bindings
389 export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
390 export JAVA_HOME=`pwd`/jdk-16.0.1.jdk/Contents/Home
391 export PATH=$JAVA_HOME/bin:$PATH
392 export PATH=`pwd`/clang+llvm-13.0.0-x86_64-apple-darwin/bin:$PATH
393 ./genbindings.sh ./ldk-c-bindings/ "-I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin -isysroot$(xcrun --show-sdk-path)" false false
394 if [ "${{ matrix.platform }}" = "macos-11" ]; then
395 export CC="clang --target=aarch64-apple-darwin"
396 export LDK_TARGET=aarch64-apple-darwin
397 export LDK_TARGET_CPU=apple-a14
398 ./genbindings.sh ./ldk-c-bindings/ "-I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin -isysroot$(xcrun --show-sdk-path)" false false
399 cat src/main/resources/liblightningjni_MacOSX-aarch64.nativelib > /dev/null
401 - name: Fetch Maven 3.8.4
403 # We don't bother using the upstream mirrors as they remove prior
404 # releases aggressively, causing spurious CI failures when we don't
405 # care about the version used.
406 wget -O apache-maven-3.8.4-bin.tar.gz https://bitcoin.ninja/apache-maven-3.8.4-bin.tar.gz
407 if [ "$(shasum -a 256 apache-maven-3.8.4-bin.tar.gz | awk '{ print $1 }')" != "2cdc9c519427bb20fdc25bef5a9063b790e4abd930e7b14b4e9f4863d6f9f13c" ]; then
411 tar xvvf apache-maven-3.8.4-bin.tar.gz
412 export PATH=apache-maven-3.8.4/bin:$PATH
413 - name: Run Java Tests against built jar
415 export JAVA_HOME=`pwd`/jdk-16.0.1.jdk/Contents/Home
416 export PATH=$JAVA_HOME/bin:$PATH
417 mvn -DskipTests=true package
418 export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
419 JAR_VERSION=${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}
420 mvn install:install-file -Dfile=target/ldk-java-${JAR_VERSION}.jar -DgroupId=org.lightningdevkit -DartifactId=ldk-java -Dversion=1.0-SNAPSHOT -Dpackaging=jar
423 java -ea -jar target/ldk-java-tests-1.0-SNAPSHOT-jar-with-dependencies.jar
425 - name: Check latest release libs are in git
427 if [ "${{ matrix.platform }}" = "macos-11" ]; then
428 export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
429 # Sadly, OSX binaries are not currently deterministic, more debugging is needed.
430 diff "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"liblightningjni_MacOSX-x86_64.nativelib src/main/resources/liblightningjni_MacOSX-x86_64.nativelib || echo
431 diff "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"liblightningjni_MacOSX-aarch64.nativelib src/main/resources/liblightningjni_MacOSX-aarch64.nativelib || echo
433 - name: Run Java Tests against release bins
435 if [ "${{ matrix.platform }}" != "macos-11" ]; then
436 export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
437 export JAVA_HOME=`pwd`/jdk-16.0.1.jdk/Contents/Home
438 export PATH=$JAVA_HOME/bin:$PATH
439 cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"liblightningjni_MacOSX-{x86_64,aarch64}.nativelib src/main/resources/
441 mvn -q -B -DskipTests=true package
442 JAR_VERSION=${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}
443 mvn install:install-file -Dfile=target/ldk-java-${JAR_VERSION}.jar -DgroupId=org.lightningdevkit -DartifactId=ldk-java -Dversion=1.0-SNAPSHOT -Dpackaging=jar
446 java -ea -jar target/ldk-java-tests-1.0-SNAPSHOT-jar-with-dependencies.jar