Repository navigation
Cross-build and smoke-test the SDK gems in CI - #92
Conversation
ci.yml only compiled the auth gem on x86_64 Linux and never built model, so a break in crates/smbcloud-* or in a non-Linux build showed up only when the release workflow ran. CI now cross-builds auth and model for all four release platforms against the workspace crates, using the oldest and newest Ruby the release ships. Each prebuilt gem is installed and required on a native runner, and the source gem is built, checked for the files cargo needs, and installed. A paths filter skips all of it when nothing the gems build from changed. Tag pushes no longer start a second Tests run for a commit the branch push already covered. Superseded runs on feature branches are cancelled; development and main are never cancelled. release-sdk-gem.yml gets a concurrency group (PR runs cancel each other, a release for a tag never does) and its pull_request trigger now fires only for edits to the workflow itself. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
--local stops RubyGems from fetching dependencies, so installing the source gem and the prebuilt gems failed on a clean runner with "Could not find a valid gem 'rb_sys'". Reproduced locally with an empty install dir. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
This change overhauls the CI workflow to cross-build and smoke-test the Ruby SDK gems (auth and model) on multiple platforms (x86_64-linux, aarch64-linux, arm64-darwin, x86_64-darwin) and Ruby versions (3.1, 4.0), both as native and source gems. It introduces a changes filter to skip gem jobs unless relevant files changed, and adds concurrency controls to avoid redundant runs. The smoke-test jobs install and require each built gem on native runners, catching load-time issues. The source gem job checks the file list for correctness and installs it. The release workflow now only triggers on edits to itself, with concurrency rules to avoid duplicate or cancelled releases. Previous review points about duplicated steps and RubyGems 4.1 are noted as not addressed here. The changes are well-structured and should catch gem build and packaging issues earlier in the development cycle. No previous findings are present to address.
Automated review by siGit Code Review · commit 2ee05ba · see the review dashboard
|
siGit Code Review couldn't finish this review: the model service was unavailable. Mention @sigit-code-review to try again. Automated review by siGit Code Review · commit 31a5252 · see the review dashboard |
development moved gem PR checks out of release-sdk-gem.yml and into ci.yml (#92), so drop the sdk/gems path triggers from the release workflow and add the email gem to the ci.yml filter and the cross-build, smoke-test and source-gem matrices instead. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
ci.yml built only the auth gem, on x86_64 Linux, and never built model. The other three platforms and the load path were first exercised by the release workflow, which resolves the published crates. A change in
crates/smbcloud-*that broke a gem, or an install-name orspec.filesproblem like the ones in 0.7.5, only showed up at release time.What changes
ci.ymlv*tag push re-tested a SHA the branch push had already covered (Tests #687 and #688 on2c88ec1).developmentandmainare never cancelled.changesjob (dorny/paths-filter, pinned to the v4.0.3 commit) skips the gem jobs unless a gem,crates/**, the Cargo files, the toolchain files orci.ymlchanged.check-ruby-gemsreplacescheck-ruby-gem: auth and model on x86_64-linux, aarch64-linux, arm64-darwin and x86_64-darwin. It writes the[patch.crates-io]config so the build uses the workspace crates, and builds Ruby 3.1 and 4.0 only, the oldest and newest the release ships.smoke-test-ruby-gemsinstalls each prebuilt gem and requires it on x86_64 Linux, arm64 Linux and arm64 macOS, on Ruby 3.1 and 4.0. x86_64-darwin is cross-built but not loaded, since arm64-darwin covers the same dyld path.check-ruby-source-gemsbuilds the source gem withgem build, asserts its file list (extconf.rb,ext/**/*.rs,Cargo.toml,Cargo.lock; no symlinks,target/ortmp/), then installs it.release-sdk-gem.ymlpush-gems.pull_requesttrigger now fires only for edits to this workflow. CI covers gem and crate changes against the workspace crates.Not done here
sdk/gems/emailis still on magnus 0.7.1 and is in neither matrix. It would fail on Ruby 4.0.Checking
actionlintis clean on both files, and I built the model source gem locally and ran the file-list assertions against it. The jobs themselves have not run yet; this PR's own run is the first. Since it editsrelease-sdk-gem.yml, the release dry run should also run.