Skip to content

Commit 6423e7a

Browse files
committed
[C#] Run tests against release library in determinism CI run
1 parent 2ddd5b5 commit 6423e7a

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,13 @@ jobs:
258258
diffoscope ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"org.ldk.nupkg c_sharp/org.ldk.nupkg || echo
259259
exit 1
260260
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
261268
262269
java_bindings:
263270
runs-on: ubuntu-latest

c_sharp/tests.csproj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
8+
<OutputType>Exe</OutputType>
9+
</PropertyGroup>
10+
11+
</Project>

genbindings.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ if [ "$2" = "c_sharp" ]; then
148148
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
149149
else
150150
cd c_sharp
151-
dotnet build --configuration Release
151+
dotnet build csharpldk.csproj --configuration Release
152152
cd ..
153153
fi
154154

0 commit comments

Comments
 (0)