From 6423e7ae846f6249b0e32d770000dc60df141d7f Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 24 May 2024 15:32:07 +0000 Subject: [PATCH 1/1] [C#] Run tests against release library in determinism CI run --- .github/workflows/build.yml | 7 +++++++ c_sharp/tests.csproj | 11 +++++++++++ genbindings.sh | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 c_sharp/tests.csproj diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b5bfa8a7..962bcbeb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -258,6 +258,13 @@ jobs: diffoscope ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"org.ldk.nupkg c_sharp/org.ldk.nupkg || echo exit 1 fi + - name: Run test against C# release library + shell: bash + run: | + cd c_sharp + ln -s ./packaging_artifacts/runtimes/linux-x64/native/libldkcsharp.so ./ + LD_LIBRARY_PATH=. dotnet run --project tests.csproj + LD_LIBRARY_PATH=. dotnet run --project tests.csproj --configuration Release java_bindings: runs-on: ubuntu-latest diff --git a/c_sharp/tests.csproj b/c_sharp/tests.csproj new file mode 100644 index 00000000..85b28fb6 --- /dev/null +++ b/c_sharp/tests.csproj @@ -0,0 +1,11 @@ + + + + net6.0 + enable + enable + true + Exe + + + diff --git a/genbindings.sh b/genbindings.sh index f3dd774c..5e2fb0ff 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -148,7 +148,7 @@ if [ "$2" = "c_sharp" ]; then mono-csc -g -out:csharpldk.dll -langversion:3 -t:library -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 else cd c_sharp - dotnet build --configuration Release + dotnet build csharpldk.csproj --configuration Release cd .. fi -- 2.30.2