Skip to content

feat(bindings/dotnet): build and package the linux-arm64 native library - #8336

Merged
erickguan merged 1 commit into
apache:mainfrom
Fatorin:dotnet-linux-arm64
Sep 23, 2026
Merged

erickguan merged 1 commit into
apache:mainfrom
Fatorin:dotnet-linux-arm64

Conversation

@Fatorin

@Fatorin Fatorin commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

None

Rationale for this change

The OpenDAL NuGet package ships native libraries for win-x64, linux-x64 and osx-arm64 only, so DllImport("opendal_dotnet") finds nothing on Linux arm64.

GitHub provides native arm64 runners, and this repository already builds the Java and Ruby bindings on ubuntu-24.04-arm.

What changes are included in this PR?

  • build.py: add the linux-aarch_64 classifier for aarch64-unknown-linux-gnu.
  • release_dotnet.yml: build it on ubuntu-24.04-arm and pack the result under runtimes/linux-arm64/native/.
  • release_dotnet.yml: drop merge-multiple when downloading the native artifacts. The two Linux builds share the libopendal_dotnet.so file name, so merging them into one directory would keep only one of the two.
  • OpenDAL.csproj: pack the new runtime path.
  • ci_bindings_dotnet.yml: add ubuntu-24.04-arm to the test job matrix.
  • No C# changes are needed: NuGet resolves runtimes/linux-arm64/native/ by runtime identifier.

Are there any user-facing changes?

Yes. The NuGet package works on Linux arm64.

Breaking changes

None

AI Usage Statement

Harness: Claude Code
Model: Claude Opus 5 (claude-opus-5)
Effort: xhigh
Role: Wrote the build and workflow changes. Validated the arm64 library by cross-compiling it and running a qemu-aarch64 FFI smoke test, and checked dotnet pack with placeholder native libraries to confirm all four runtime identifier paths land in the package. Nothing has run on real arm64 hardware yet; the CI job added here is the first.

Add a `linux-aarch_64` classifier that maps to `aarch64-unknown-linux-gnu`,
build it on a native `ubuntu-24.04-arm` runner, and pack the resulting
library under `runtimes/linux-arm64/native/` so NuGet resolves it on Linux
arm64 hosts.

Download the native artifacts into 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.

Also run the dotnet binding CI test job on `ubuntu-24.04-arm`, so the arm64
build and tests are exercised on every pull request instead of only at
release time.
@github-actions github-actions Bot added bindings/dotnet releases-note/build The PR modifies build related content or has a title that begins with "build" size:S This PR changes 10-29 lines, ignoring generated files. labels Sep 22, 2026
@erickguan
erickguan merged commit ef036cd into apache:main Sep 23, 2026
308 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bindings/dotnet releases-note/build The PR modifies build related content or has a title that begins with "build" size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants