ci: build & publish NemoTextProcessing.xcframework on release - #46
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
All the TN work is dormant for Apple consumers (FluidAudio) unless the native
libtext_processing_rsis 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:build-xcframework.shon a macOS runner (Xcode + the four Apple Rust targets: macOS arm64/x86_64, iOS device, iOS sim) →NemoTextProcessing.xcframework.v*tag.The xcframework includes the full FFI surface — ITN and the 6
nemo_tn_*TN exports that FluidAudio'sTextNormalizerdlsym-binds.Validation
Triggers:
v*tags (release upload),workflow_dispatch, and — scoped bypaths—pull_requestwhen this workflow orbuild-xcframework.shchanges, 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