Skip to content

Cross-build and smoke-test the SDK gems in CI - #92

Merged
setoelkahfi merged 2 commits into
developmentfrom
ci/cross-build-smoke-test-gems
Oct 24, 2026
Merged

setoelkahfi merged 2 commits into
developmentfrom
ci/cross-build-smoke-test-gems

Conversation

@setoelkahfi

Copy link
Copy Markdown
Collaborator

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 or spec.files problem like the ones in 0.7.5, only showed up at release time.

What changes

ci.yml

  • Triggers on branch pushes only. A v* tag push re-tested a SHA the branch push had already covered (Tests #687 and #688 on 2c88ec1).
  • Concurrency per workflow and ref. Pushes to feature branches cancel older runs; development and main are never cancelled.
  • A changes job (dorny/paths-filter, pinned to the v4.0.3 commit) skips the gem jobs unless a gem, crates/**, the Cargo files, the toolchain files or ci.yml changed.
  • check-ruby-gems replaces check-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-gems installs 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-gems builds the source gem with gem build, asserts its file list (extconf.rb, ext/**/*.rs, Cargo.toml, Cargo.lock; no symlinks, target/ or tmp/), then installs it.

release-sdk-gem.yml

  • Concurrency: PR dry runs cancel superseded runs; a release for a tag is serialized and never cancelled during push-gems.
  • The pull_request trigger now fires only for edits to this workflow. CI covers gem and crate changes against the workspace crates.

Not done here

  • sdk/gems/email is still on magnus 0.7.1 and is in neither matrix. It would fail on Ruby 4.0.
  • RubyGems 4.1 per-ABI gems could replace the fat gems later, but they need a newer RubyGems on users' machines.
  • The duplicated "Read Rust toolchain" step could become a composite action. That touches every job, so it is a separate change.

Checking

actionlint is 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 edits release-sdk-gem.yml, the release dry run should also run.

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]>
@setoelkahfi setoelkahfi self-assigned this Oct 24, 2026
--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]>

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown

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

@setoelkahfi
setoelkahfi merged commit 2a5a8e8 into development Oct 24, 2026
41 checks passed
@setoelkahfi
setoelkahfi deleted the ci/cross-build-smoke-test-gems branch October 24, 2026 11:12
keypair34 pushed a commit that referenced this pull request Oct 24, 2026
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]>
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.

3 participants