Merged
Conversation
BoringSSL cannot be cross-compiled for Darwin from Linux because CMake picks up /usr/bin/ld (ELF linker) instead of the osxcross Mach-O linker inside rb-sys-dock containers. Switch arm64-darwin to a native macos-latest runner that compiles natively, avoiding the cross-compilation issue entirely. Add macOS smoke tests to verify the gem loads on Ruby 3.3, 3.4, and 4.0.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
- Compile separate .bundle for Ruby 3.3, 3.4, and 4.0 on macOS, matching the per-version binary layout rb-sys-dock produces for Linux - Add Swatinem/rust-cache to avoid rebuilding BoringSSL every release - Extract gem packaging into script/build_platform_gem.rb with required_ruby_version upper bound (>= 3.3, < 4.1.dev) - Rename artifact to native-gem-arm64-darwin (not cross-compiled) - Remove stale arm64-darwin from Rakefile cross_platform
- Include magnus and serde_magnus in cargo clean (both have version-conditional #[cfg(ruby_gte_*)] code that must recompile) - Add cargo clean before first compilation too (handles stale cache from previous release run) - Abort if no compiled binaries found before packaging gem - Simplify glob to idiomatic spec.files +=
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.
Summary
rb-sys-dockLinux containers — CMake picks up/usr/bin/ld(ELF linker) instead of the osxcross Mach-O linkerarm64-darwinout of thecross-compilematrix into a dedicatednative-darwinjob onmacos-latestrb-sys-dockproduces for LinuxSwatinem/rust-cacheso BoringSSL isn't rebuilt from scratch every releasescript/build_platform_gem.rbwithrequired_ruby_versionupper boundarm64-darwinfrom Rakefilecross_platformNote
Medium Risk
Changes the release pipeline and gem packaging for macOS, which could affect published artifacts and CI reliability if the new per-Ruby binary layout or packaging script is incorrect.
Overview
Fixes
arm64-darwinrelease builds by removing Darwin from the Linuxrb-sys-dockcross-compile matrix and adding a dedicatednative-darwinjob that compiles per-Ruby binaries (3.3/3.4/4.0) onmacos-latestwith Rust caching.Adds
script/build_platform_gem.rbto package those prebuilt.bundle/.soartifacts into a platform gem (with explicitrequired_ruby_versionbounds), updates the release workflow to publish the new Darwin artifact, and introduces a macOS smoke-test job; theRakefilecross_platformlist is updated to only include Linux targets.Written by Cursor Bugbot for commit 49f8f69. This will update automatically on new commits. Configure here.