@@ -266,6 +266,38 @@ jobs:
266
266
LD_LIBRARY_PATH=. dotnet run --project tests.csproj
267
267
LD_LIBRARY_PATH=. dotnet run --project tests.csproj --configuration Release
268
268
269
+ osx_c_sharp :
270
+ runs-on : macos-latest
271
+ steps :
272
+ - name : Checkout source code
273
+ uses : actions/checkout@v2
274
+ with :
275
+ fetch-depth : 0
276
+ - name : Setup .NET
277
+ uses : actions/setup-dotnet@v4
278
+ with :
279
+ dotnet-version : ' 6.0.x'
280
+ - name : Checkout latest Linux binaries
281
+ run : |
282
+ export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
283
+ echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
284
+ # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
285
+ 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)"
286
+ wget -O bins-snapshot.tgz "https://git.bitcoin.ninja${SNAPSHOT_LINK}"
287
+ mkdir -p ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
288
+ cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
289
+ tar xvvf ../../bins-snapshot.tgz
290
+ mv ldk-java-bins-*/* ./
291
+ unzip org.ldk.nupkg
292
+ - name : Run test against C# release library
293
+ shell : bash
294
+ run : |
295
+ export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
296
+ cd c_sharp
297
+ ln -s "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/runtimes/osx-arm64/native/libldkcsharp.dylib" ./ldkcsharp.dylib
298
+ LD_LIBRARY_PATH=. dotnet run --project tests.csproj
299
+ LD_LIBRARY_PATH=. dotnet run --project tests.csproj --configuration Release
300
+
269
301
java_bindings :
270
302
runs-on : ubuntu-latest
271
303
# Ubuntu's version of rustc uses its own LLVM instead of being a real native package.
0 commit comments