[Content Addressable] Add support for Packaging Single-ABI Gems - #62
Draft
OughtPuts wants to merge 1 commit into
Draft
[Content Addressable] Add support for Packaging Single-ABI Gems#62OughtPuts wants to merge 1 commit into
OughtPuts wants to merge 1 commit into
Conversation
Comment on lines
+51
to
+54
| if options["package-mode"] == "single-ABI" | ||
| compilation_task.ruby_versions.each do |ruby_version| | ||
| ENV["RUBY_CC_VERSION"] = ruby_version.to_s | ||
| run_rake_tasks!("cibuildgem:setup", :cross, :native, :gem) |
| cibuildgem will create one gem per Ruby version supported by the gem. | ||
| MSG | ||
| method_option "gemspec", type: "string", required: false, desc: "The gemspec to use. Defaults to the gemspec from the current working directory." | ||
| method_option "package-mode", type: "string", required: false, desc: "The package mode to use when compiling multi-ABI or single-ABI gems. Defaults to multi-ABI." |
| assert_predicate($CHILD_STATUS, :success?) | ||
| end | ||
|
|
||
| def test_package_single_abi_runs_rake_tasks_for_each_ruby_version |
OughtPuts
force-pushed
the
ho/build-skinny-ca-gems
branch
from
September 9, 2026 16:27
89aab5c to
1bf41d9
Compare
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.
TL;DR
This PR adds support to
cibuildgemfor the building of gems that contain a single-Ruby-ABI-supporting binary.Summary
This PR follows the rubygems changes which support the lifecycle of lightweight content addressable gems that support only one Ruby ABI. This PR introduces changes to Cibuildgem so we can use it to build a set of gems with binary support for an individual Ruby ABI, instead of building one gem that would contain binaries for multiple Ruby ABIs.
The PR introduces a
--package-modeflag which can optionally be added to thepackagecommand, where the options passed can be eithersingle-ABIormulti-ABI. It defaults tomulti-ABI. Whensingle-ABIis passed, we iterate over each ruby version, setting it as theENV["RUBY_CC_VERSION"]before running all rake tasks.Tests
Tests have been added to
cli_testto cover the new behaviourTophatting