Tighten moq-ffi release pipeline ahead of first publish#1447
Conversation
Five fixes to the release workflows and packaging scripts: - kt/scripts/package.sh: drop the bash >= 4 gate. Replace the two `declare -A` associative arrays with portable colon-encoded parallel arrays so the script works under macOS's default bash 3.2 for local contributors. - release-py.yml: verify rs/moq-ffi/Cargo.toml matches the moq-ffi-v* tag before building wheels. Maturin reads the version from Cargo.toml via `dynamic = ["version"]`, so a hand-pushed tag without a Cargo.toml bump would ship a stale wheel and PyPI would reject the duplicate upload. Hard-fail in `parse-version` with a clear message instead. - release-py.yml: add an `sdist` job that runs `maturin sdist` and uploads `python-sdist`. The publish job now needs both `build` and `sdist`; the existing `pattern: python-*` download picks up both. - release-swift.yml: comment that `x86_64-apple-ios` is the Intel iOS simulator slice so reviewers don't double-take on the target list. - rs/moq-ffi/build.sh: stop copying `libmoq_ffi.a` into the Linux package. JNA (Kotlin) and maturin (Python) both consume the cdylib; the staticlib was just bloat in every Linux release asset. The Swift Package Manager publish stub is intentionally left untouched. It still hard-exits behind `vars.PUBLISH_SPM`, and wiring it up needs an SPM release plan. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughThis PR updates release and packaging infrastructure across Python, Kotlin, Swift, and Rust components. The Python release workflow adds a version verification step to ensure the Cargo.toml version matches the release tag, and introduces a new 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Five fixes to the moq-ffi release workflows and packaging scripts that I verified after auditing the SPM/PyPI/Maven release paths. SPM's
publish.shstub is left untouched — wiring it needs an actual SPM release plan.declare -Aassociative arrays are now portable colon-encoded parallel arrays, so the script works under macOS's default bash 3.2. Verified runtime under/bin/bash 3.2.57. Local Kotlin contributors no longer have tobrew install bash.rs/moq-ffi/Cargo.tomlmatches themoq-ffi-v*tag before building. Maturin reads the wheel version from Cargo.toml viadynamic = ["version"], so a hand-pushed tag without a Cargo.toml bump would ship a stale wheel and PyPI would reject the upload. Hard-fail inparse-versionwith a clear actionable message instead.sdistjob. Maturin'ssdistcommand bundles all transitive workspace crates (verified locally: conducer, hang, moq-ffi, moq-msf, moq-mux, moq-native, moq-net at ~349 KB). Publish job now needs bothbuildandsdist; the existingpattern: python-*artifact download picks up both.x86_64-apple-iosis the Intel iOS simulator slice, since Apple never shipped Intel iOS devices and the name is easy to misread.libmoq_ffi.ainto the Linux package directory. JNA (Kotlin) and maturin (Python) only consume the cdylib; the staticlib was several MB of dead weight in every Linux release asset.Test plan
bash -nsyntax check both modified shell scripts under/bin/bash 3.2.57maturin sdistrun produces a wheel-ready tarball with all workspace crates includedmoq-ffi-v*tag exercises the version-verify step and the sdist job in CI🤖 Generated with Claude Code