Skip to content

[Ruby][CI] Build precompiled gems for Ruby 4.0 - #293

Merged
juharris merged 1 commit into
juharris:mainfrom
dewolfe:ruby-4-cross-gem
Aug 5, 2026
Merged

[Ruby][CI] Build precompiled gems for Ruby 4.0#293
juharris merged 1 commit into
juharris:mainfrom
dewolfe:ruby-4-cross-gem

Conversation

@dewolfe

@dewolfe dewolfe commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What does this PR accomplish?

Adds Ruby 4.0 to the precompiled optify-config gem matrix.

The cross-build currently receives stable Ruby versions from fetch-ci-data but explicitly excludes Ruby 4.0. This removes that exclusion, so the existing cross-gem job builds Ruby 3.3, 3.4, and 4.0 extensions for:

  • aarch64-linux
  • arm64-darwin
  • x86_64-linux

It 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

  • Confirmed the current CRuby stable-version feed contains 3.3, 3.4, 4.0, and head
  • Workflow YAML parses successfully
  • bundle check passes
  • Ruby test suite: 51 tests, 710 assertions, 0 failures
  • The 1.23.2 source gem builds successfully with the expected metadata
  • Fork workflow run passed and cross-built the Ruby 4 extension for all three target platforms

The fork workflow packaged lib/optify_ruby/4.0/optify_ruby.* in the arm64-darwin, aarch64-linux, and x86_64-linux gems. Publishing was skipped because the run was not on main.

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.

@juharris
juharris merged commit f2b1b1a into juharris:main Aug 5, 2026
10 checks passed
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.

2 participants