Skip to content

Commit cd2f1b0

Browse files
author
s-a
committed
fix(ci): Add symlink for libdl.so on Linux runner
This commit resolves a `System.DllNotFoundException` for `libdl.so` that was causing all tests to fail on the Linux platform. The .NET runtime on the GitHub `ubuntu-latest` runner was unable to locate the dynamic linking library `libdl.so` in its standard search paths, even though it is present on the system via the `libc6-dev` package. This fix adds a command to the "Install Linux dependencies" step to create a symbolic link from the actual library location to a path where the .NET runtime can find it. This unblocks the native library loader and allows the tests to run successfully.
1 parent 5e9d63e commit cd2f1b0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/build-binaries.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252
run: |
5353
sudo apt-get update
5454
sudo apt-get install -y build-essential libc6-dev
55+
# FIX: Add symlink for libdl.so to fix DllNotFoundException during tests
56+
sudo ln -sf /usr/lib/x86_64-linux-gnu/libdl.so.2 /usr/lib/libdl.so
5557
5658
- name: Run comprehensive build script (Unix)
5759
if: runner.os != 'Windows'
@@ -64,8 +66,6 @@ jobs:
6466
echo '📋 Checking generated native libraries:'
6567
find src/GrepSQL/runtimes/ -name "libpgquery_wrapper.*" -type f
6668
67-
# HINWEIS: Es wird keine setup-msvc-dev oder setup-msbuild Aktion mehr benötigt,
68-
# da das build.ps1-Skript die Umgebung selbst einrichtet.
6969
- name: Run comprehensive build script (Windows)
7070
if: runner.os == 'Windows'
7171
shell: powershell
@@ -76,8 +76,6 @@ jobs:
7676
echo '📋 Checking generated native libraries:'
7777
Get-ChildItem -Path "src\GrepSQL\runtimes\win-x64\native" -Filter "*.dll" -Recurse
7878
79-
# (Rest der YAML-Datei bleibt unverändert)
80-
8179
- name: Test (non-Windows)
8280
if: runner.os != 'Windows'
8381
run: dotnet test --configuration Release --no-build --verbosity normal
@@ -132,6 +130,7 @@ jobs:
132130
if: github.event_name == 'push' && (contains(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
133131

134132
steps:
133+
# (Der Release-Teil bleibt unverändert)
135134
- name: Checkout code
136135
uses: actions/checkout@v4
137136
with:

0 commit comments

Comments
 (0)