Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci_bindings_dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
- macos-latest
- windows-latest
steps:
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/release_dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ jobs:
- os: ubuntu-latest
classifier: linux-x86_64
artifact: libopendal_dotnet.so
- os: ubuntu-24.04-arm
classifier: linux-aarch_64
artifact: libopendal_dotnet.so
- os: windows-latest
classifier: windows-x86_64
artifact: opendal_dotnet.dll
Expand Down Expand Up @@ -98,23 +101,27 @@ jobs:
with:
dotnet-version: "10.0.x"

# Keep one directory per artifact: the Linux x64 and Linux arm64 builds
# share the libopendal_dotnet.so file name, so merging them into a single
# directory would drop one of the two libraries.
- name: Download native artifacts
uses: actions/download-artifact@v8
with:
pattern: native-*
merge-multiple: true
path: bindings/dotnet/target/release-assets

- name: Prepare runtime assets
shell: bash
run: |
mkdir -p OpenDAL/runtimes/win-x64/native
mkdir -p OpenDAL/runtimes/linux-x64/native
mkdir -p OpenDAL/runtimes/linux-arm64/native
mkdir -p OpenDAL/runtimes/osx-arm64/native

cp target/release-assets/opendal_dotnet.dll OpenDAL/runtimes/win-x64/native/
cp target/release-assets/libopendal_dotnet.so OpenDAL/runtimes/linux-x64/native/
cp target/release-assets/libopendal_dotnet.dylib OpenDAL/runtimes/osx-arm64/native/
cp target/release-assets/native-windows-x86_64/opendal_dotnet.dll OpenDAL/runtimes/win-x64/native/
cp target/release-assets/native-linux-x86_64/libopendal_dotnet.so OpenDAL/runtimes/linux-x64/native/
cp target/release-assets/native-linux-aarch_64/libopendal_dotnet.so OpenDAL/runtimes/linux-arm64/native/
cp target/release-assets/native-osx-aarch_64/libopendal_dotnet.dylib OpenDAL/runtimes/osx-arm64/native/

- name: Determine version suffix
id: version
Expand Down
3 changes: 3 additions & 0 deletions bindings/dotnet/OpenDAL/OpenDAL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
<None Include="runtimes\linux-x64\native\libopendal_dotnet.so"
Pack="true"
PackagePath="runtimes/linux-x64/native/" />
<None Include="runtimes\linux-arm64\native\libopendal_dotnet.so"
Pack="true"
PackagePath="runtimes/linux-arm64/native/" />
<None Include="runtimes\osx-arm64\native\libopendal_dotnet.dylib"
Pack="true"
PackagePath="runtimes/osx-arm64/native/" />
Expand Down
4 changes: 3 additions & 1 deletion bindings/dotnet/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def classifier_to_target(classifier: str) -> str:
return "aarch64-apple-darwin"
if classifier == "linux-x86_64":
return "x86_64-unknown-linux-gnu"
if classifier == "linux-aarch_64":
return "aarch64-unknown-linux-gnu"
if classifier == "windows-x86_64":
return "x86_64-pc-windows-msvc"
raise Exception(f"Unsupported classifier: {classifier}")
Expand All @@ -37,7 +39,7 @@ def classifier_to_target(classifier: str) -> str:
def get_cargo_artifact_name(classifier: str) -> str:
if classifier == "osx-aarch_64":
return "libopendal_dotnet.dylib"
if classifier == "linux-x86_64":
if classifier == "linux-x86_64" or classifier == "linux-aarch_64":
return "libopendal_dotnet.so"
if classifier == "windows-x86_64":
return "opendal_dotnet.dll"
Expand Down
Loading