Skip to content

Commit f3b346d

Browse files
author
Aliaksandr Adziareika
committed
Fix C# bindings on linux
1 parent 75ccf28 commit f3b346d

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.github/actions/package-bindings-csharp/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@ runs:
5151
echo "short-sha-dotnet=$short_sha" >> $GITHUB_OUTPUT
5252
fi
5353
54+
# Read generator from CMakeCache to ensure proper reconfiguration (especially for Ninja)
55+
CMAKE_GENERATOR=$(grep "^CMAKE_GENERATOR:" "$CMAKE_BUILD_PATH/CMakeCache.txt" | cut -d'=' -f2)
56+
5457
echo "::group::CMake Configure (enable C# bindings)"
55-
cmake -B "$CMAKE_BUILD_PATH" -DOPENDAQ_GENERATE_CSHARP_BINDINGS=ON
58+
cmake -B "$CMAKE_BUILD_PATH" -G "$CMAKE_GENERATOR" -DOPENDAQ_GENERATE_CSHARP_BINDINGS=ON
5659
echo "::endgroup::"
5760
5861
echo "::group::CMake Build DotNetBindings"

.github/actions/package-bindings-python/action.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ runs:
5757
env:
5858
CMAKE_BUILD_TYPE: ${{ inputs.cmake-build-type }}
5959
CMAKE_BUILD_PATH: ${{ inputs.build-path }}
60-
PYTHON_VERSION_FROM_SETUP: ${{ steps.python-setup.outputs.python-version }}
61-
SKIP_SETUP_PYTHON: ${{ inputs.skip-setup-python }}
60+
PYTHON_VERSION_LATEST: ${{ steps.python-setup.outputs.python-version }}
6261
run: |
6362
if command -v cygpath &> /dev/null; then
6463
CMAKE_BUILD_PATH=$(cygpath -u "$CMAKE_BUILD_PATH")
@@ -99,17 +98,17 @@ runs:
9998
fi
10099
101100
# Determine the latest Python version for build_pip.py
102-
if [ "$SKIP_SETUP_PYTHON" == "true" ]; then
101+
if [ -z "$PYTHON_VERSION_LATEST" ]; then
103102
# When setup-python is skipped, get latest version from sorted list
104103
PYTHON_VERSION_LATEST=$(echo "$PYTHON_VERSIONS" | tail -n1)
105104
else
106-
PYTHON_VERSION_LATEST=$(echo "$PYTHON_VERSION_FROM_SETUP" | cut -d. -f1,2)
105+
PYTHON_VERSION_LATEST=$(echo "$PYTHON_VERSION_LATEST" | cut -d. -f1,2)
107106
fi
108107
echo "Using Python $PYTHON_VERSION_LATEST for build_pip.py"
109108
110109
while IFS= read -r version; do
111110
echo "::group::CMake Configure (Python $version)"
112-
cmake -B "$CMAKE_BUILD_PATH" \
111+
cmake -B "$CMAKE_BUILD_PATH" -G "$CMAKE_GENERATOR" \
113112
-DOPENDAQ_GENERATE_PYTHON_BINDINGS=ON \
114113
-DOPENDAQ_PYTHON_VERSION="$version" \
115114
-DPYBIND11_FINDPYTHON=ON

.github/workflows/package-sandbox.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ jobs:
352352
if: matrix.generate-csharp-bindings == true
353353
uses: actions/upload-artifact@v4
354354
with:
355-
name: SdkLinux64
355+
name: ${{ env.linux_x64_artifact }}
356356
path: |
357357
${{ steps.build-sdk.outputs.build-path }}/bin/*.so
358358
!${{ steps.build-sdk.outputs.build-path }}/**/opendaq.cpython*

0 commit comments

Comments
 (0)