[Ruby][CI] Build precompiled gems for Ruby 4.0 - #293
Merged
Conversation
juharris
approved these changes
Aug 5, 2026
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.
What does this PR accomplish?
Adds Ruby 4.0 to the precompiled
optify-configgem matrix.The cross-build currently receives stable Ruby versions from
fetch-ci-databut explicitly excludes Ruby 4.0. This removes that exclusion, so the existingcross-gemjob builds Ruby 3.3, 3.4, and 4.0 extensions for:aarch64-linuxarm64-darwinx86_64-linuxIt also bumps the Ruby gem from 1.23.1 to 1.23.2. A new version is required because RubyGems will not allow the existing 1.23.1 platform artifacts to be replaced with packages containing an additional Ruby 4 extension.
Validation
3.3,3.4,4.0, andheadbundle checkpassesThe fork workflow packaged
lib/optify_ruby/4.0/optify_ruby.*in thearm64-darwin,aarch64-linux, andx86_64-linuxgems. Publishing was skipped because the run was not onmain.Why is this change necessary?
Ruby 4 source compatibility was added in #175, but the published platform gems still contain extensions only for Ruby 3.3 and 3.4 and declare
required_ruby_version < 3.5.dev.Ruby 4 applications therefore have to force the generic source gem and install Rust plus libclang in every development, CI, staging, and production build environment.
Publishing Ruby 4 platform artifacts removes that requirement and lets Bundler use the normal platform-specific gem.