Skip to content

feat(ci): build the linux-arm64 native for the .NET and JVM bindings - #19

Open
ayushthakur18 wants to merge 1 commit into
xdevplatform:mainfrom
ayushthakur18:add-linux-arm64
Open

feat(ci): build the linux-arm64 native for the .NET and JVM bindings#19
ayushthakur18 wants to merge 1 commit into
xdevplatform:mainfrom
ayushthakur18:add-linux-arm64

Conversation

@ayushthakur18

Copy link
Copy Markdown

Closes #18.

Problem

The chat_xdk_dotnet cdylib ships for osx-arm64, osx-x64, linux-x64 and win-x64. There is no linux-arm64, so the JVM and .NET bindings cannot run on 64-bit ARM Linux — AWS Graviton, Ampere, and ARM CI runners.

On Linux/aarch64, detectRid() returns null, so extractBundledLibrary() extracts nothing and load() falls through to a system lookup that finds nothing unless the operator supplies their own build.

Because dotnet-build also feeds the java job, this single missing matrix entry affects both bindings.

Change

  • one linux-arm64 entry in the dotnet-build matrix, on ubuntu-24.04-arm targeting aarch64-unknown-linux-gnu
  • linux-arm64 staged alongside the other RIDs for both the nupkg and the jar
  • native/linux-arm64/libchat_xdk_dotnet.so added to the jar verification list, so a missing artifact fails the release rather than shipping silently
  • detectRid() returns linux-arm64 on Linux/ARM

The ubuntu-24.04-arm runner and the aarch64-unknown-linux-gnu target are already used by the Python wheel job in this same workflow, so nothing new is introduced to CI.

Verification

Built chat-xdk-dotnet for aarch64-unknown-linux-gnu from v0.5.0, with juicebox-sdk as a sibling checkout and the pinned 1.91.1 toolchain:

Finished `release` profile [optimized] target(s) in 1m 25s
libchat_xdk_dotnet.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked

Loaded through JNA on an ARM64 JVM (Temurin 25), with no jna.library.path set, to confirm the resource path detectRid() now returns is the one JNA resolves:

arch=aarch64
RESOURCE_PREFIX=linux-aarch64
LOADED OK: true

I have not been able to run the full release workflow, so the matrix entry itself is unexercised — the build and load above were reproduced locally against the same source and toolchain.

The chat_xdk_dotnet cdylib ships for osx-arm64, osx-x64, linux-x64 and
win-x64, so the JVM and .NET bindings cannot run on 64-bit ARM Linux --
AWS Graviton, Ampere, and ARM CI runners. On Linux/aarch64 detectRid()
returns null, no bundled native is extracted, and the load falls through
to a system lookup that finds nothing.

The Python job already builds aarch64-unknown-linux-gnu on ubuntu-24.04-arm,
so the target and the runner are already proven here. Since dotnet-build
also feeds the java job, one matrix entry covers both bindings.

- add the linux-arm64 entry to the dotnet-build matrix
- stage it alongside the other RIDs for both the nupkg and the jar
- require it in the jar verification list
- return linux-arm64 from detectRid() on Linux/ARM
@CLAassistant

CLAassistant commented Aug 26, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@ayushthakur18

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants