diff --git a/.github/workflows/ci_bindings_dotnet.yml b/.github/workflows/ci_bindings_dotnet.yml
index 9e2164dea75e..ca5060fe0921 100644
--- a/.github/workflows/ci_bindings_dotnet.yml
+++ b/.github/workflows/ci_bindings_dotnet.yml
@@ -70,6 +70,7 @@ jobs:
matrix:
os:
- ubuntu-latest
+ - ubuntu-24.04-arm
- macos-latest
- windows-latest
steps:
diff --git a/.github/workflows/release_dotnet.yml b/.github/workflows/release_dotnet.yml
index 092178398359..68b23314dc1d 100644
--- a/.github/workflows/release_dotnet.yml
+++ b/.github/workflows/release_dotnet.yml
@@ -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
@@ -98,11 +101,13 @@ 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
@@ -110,11 +115,13 @@ jobs:
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
diff --git a/bindings/dotnet/OpenDAL/OpenDAL.csproj b/bindings/dotnet/OpenDAL/OpenDAL.csproj
index 3d1dc3c011fc..3dbfbc1b7c29 100644
--- a/bindings/dotnet/OpenDAL/OpenDAL.csproj
+++ b/bindings/dotnet/OpenDAL/OpenDAL.csproj
@@ -53,6 +53,9 @@
+
diff --git a/bindings/dotnet/build.py b/bindings/dotnet/build.py
index 1ca17b9feb13..49ed959de35d 100755
--- a/bindings/dotnet/build.py
+++ b/bindings/dotnet/build.py
@@ -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}")
@@ -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"