Skip to content

fix(uniffi): repair Android package build and release-tag checkout - #1300

Merged
pblazej merged 3 commits into
mainfrom
blaze/uniffi-ci-followups
Jul 30, 2026
Merged

fix(uniffi): repair Android package build and release-tag checkout#1300
pblazej merged 3 commits into
mainfrom
blaze/uniffi-ci-followups

Conversation

@pblazej

@pblazej pblazej commented Jul 30, 2026

Copy link
Copy Markdown
Contributor
  • build-android-: cargo-make's extend replaces the parent env map rather than merging it, so env = { TARGET = ... } silently dropped ANDROID_RELEASE_FLAG and RUSTFLAGS — --profile release produced debug .so files and android-copy-jniLibs found nothing in target//release. Derive the flag from CARGO_MAKE_PROFILE in the script instead.
  • android-bindgen-kotlin: TARGET leaks across cargo-make tasks, so bindgen-kotlin's build dependency cross-compiled for Android with the host linker ("cannot find -llog"). Pin TARGET back to the host triple and keep symbols, which library-mode bindgen needs on Linux.
  • Raise both size gates to measured values: ios-arm64 is 1088 KiB and arm64-v8a 1174 KiB, having grown past the limits set in HMAC-only JWT provider to shrink binaries #1171 when the data-track UniFFI surface landed in Data tracks UniFFI #1034.
  • Check out inputs.tag_name in both reusable workflows; workflow_dispatch was building the dispatch ref (main) rather than the requested tag.

Before you submit your PR

Make sure the following is true before submitting your PR:

  • I have read the contributing guidelines and validated that this PR will be accepted.
  • I have read and followed the principles regarding breaking changes, testing, and code quality.

PR description

Describe the changes in this PR. Explain what the PR is meant to solve and how to reproduce the issue in the first place.

Breaking changes

If this PR introduces breaking changes, list them here and document the rationale for introducing such a change.

MSRV

If the PR modifies the crate's MSRV (Minimum Supported Rust Version), document it here.

Testing

Ideally, unit test the code you add, but ensure you're not repeating existing test cases. Use as many already written scaffolding, utilities as possible; write your own, when needed. If external services, APIs, tokens are required (e.g., running an LK server instance), provide the necessary information. Make sure your tests perform useful, context-aware assertions and do not simply emulate "happy paths".

Async

We want the project to be runtime-agnostic, so please reuse what's already in livekit-runtime and feel free to add anything missing. It's ok to use Tokio directly, when writing unit tests, if necessary. When testing, do not use artificial delays for the state to "catch up"; instead, respect the event flow and subscribe properly using channels or other mechanisms.

- build-android-*: cargo-make's `extend` replaces the parent env map rather
  than merging it, so `env = { TARGET = ... }` silently dropped
  ANDROID_RELEASE_FLAG and RUSTFLAGS — `--profile release` produced debug
  .so files and android-copy-jniLibs found nothing in target/*/release.
  Derive the flag from CARGO_MAKE_PROFILE in the script instead.
- android-bindgen-kotlin: TARGET leaks across cargo-make tasks, so
  bindgen-kotlin's `build` dependency cross-compiled for Android with the
  host linker ("cannot find -llog"). Pin TARGET back to the host triple and
  keep symbols, which library-mode bindgen needs on Linux.
- Raise both size gates to measured values: ios-arm64 is 1088 KiB and
  arm64-v8a 1174 KiB, having grown past the limits set in #1171 when the
  data-track UniFFI surface landed in #1034.
- Check out inputs.tag_name in both reusable workflows; workflow_dispatch
  was building the dispatch ref (main) rather than the requested tag.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Changeset ✓

This PR includes a changeset covering all affected packages:

Package Bump
livekit-uniffi patch

pblazej and others added 2 commits July 30, 2026 11:56
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The composite action pre-installed crates.io `tera-cli@0.5.0`, which is a
different project from chevdor/tera-cli and has a different CLI (`--env`,
no `--env-only`). Because it still provides a `tera` binary, cargo-make's
`tera --help` probe succeeded and the `install-tera` task never ran, so
swift-generate-manifest died on "Found argument '--env-only' which wasn't
expected" — reintroducing the bug #1238 had already fixed.

There is no binary distribution to pre-install: chevdor publishes as
`teracli`, and only up to 0.3.0. Drop the step and let `install-tera` build
from the pinned git tag (~30s).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@pblazej

pblazej commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

@pblazej
pblazej requested review from davidliu and lukasIO July 30, 2026 10:25
@pblazej
pblazej marked this pull request as ready for review July 30, 2026 10:26
@pblazej
pblazej requested a review from ladvoc as a code owner July 30, 2026 10:26

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@lukasIO lukasIO left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pblazej
pblazej merged commit 00258d1 into main Jul 30, 2026
30 checks passed
@pblazej
pblazej deleted the blaze/uniffi-ci-followups branch July 30, 2026 10:36
- name: Install cargo-make
uses: taiki-e/install-action@682e7d9e49c5e653d371fc6adbda67653461378a # v2.82.4
with: { tool: cargo-make@0.37 }
- name: Install tera-cli

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Why was this removed? This will mean Tera CLI has to be built from source on every CI run.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it installed the wrong binary in practice:


+ tera --env-only -t ./support/swift/Package.swift.tera -o LiveKitUniFFI/Package.swift
error: Found argument '--env-only' which wasn't expected, or isn't valid in this context
	Did you mean --env?

USAGE:
    tera <--toml <toml>|--json <json>|--yaml <yaml>|--env>

For more information try --help

https://github.com/livekit/rust-sdks/actions/runs/30532222462/job/90836993120

@davidliu davidliu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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.

4 participants