Skip to content

ci: build & publish NemoTextProcessing.xcframework on release - #46

Merged
Alex-Wengg merged 2 commits into
mainfrom
ci/xcframework-release
Jul 8, 2026
Merged

ci: build & publish NemoTextProcessing.xcframework on release#46
Alex-Wengg merged 2 commits into
mainfrom
ci/xcframework-release

Conversation

@Alex-Wengg

Copy link
Copy Markdown
Member

Why

All the TN work is dormant for Apple consumers (FluidAudio) unless the native libtext_processing_rs is linked into the process — currently only via hand-linking. This adds an automated xcframework so FluidAudio can consume the FFI through a SwiftPM .binaryTarget(url:checksum:), the prerequisite to enabling the native TN path by default (FluidAudio #784 wired the Swift side but it's inert without the lib).

What

.github/workflows/xcframework.yml:

  • Runs build-xcframework.sh on a macOS runner (Xcode + the four Apple Rust targets: macOS arm64/x86_64, iOS device, iOS sim) → NemoTextProcessing.xcframework.
  • Zips it and computes the SwiftPM SHA-256 checksum.
  • Uploads the zip + checksum + Swift wrapper as a CI artifact always, and attaches them to the GitHub release on a v* tag.

The xcframework includes the full FFI surface — ITN and the 6 nemo_tn_* TN exports that FluidAudio's TextNormalizer dlsym-binds.

Validation

Triggers: v* tags (release upload), workflow_dispatch, and — scoped by pathspull_request when this workflow or build-xcframework.sh changes, so this PR runs the full build and produces the artifact without the upload (tag-gated). If the build job is green here, the release path works.

Next (FluidAudio side, separate)

Once a release carries the xcframework + checksum, FluidAudio adds .binaryTarget(url:…, checksum:…) and can drop the dlopen-optional gate to make native TN the default. Not in this PR.

🤖 Generated with Claude Code

Adds a workflow that runs build-xcframework.sh on a macOS runner (Xcode +
the four Apple Rust targets), producing NemoTextProcessing.xcframework
(macOS universal + iOS device + iOS simulator). Zips it, computes the
SwiftPM SHA-256 checksum, uploads both as a build artifact, and on a `v*`
tag attaches them (plus the Swift wrapper) to the GitHub release.

This lets Apple consumers (FluidAudio) link the native FFI via a SwiftPM
`.binaryTarget(url:checksum:)` instead of hand-linking libtext_processing_rs
— the prerequisite for enabling the native TN path by default.
@Alex-Wengg
Alex-Wengg merged commit bb3d177 into main Jul 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant