Skip to content

Commit

Permalink
Add Ruby 3.4 to cross-compile gem
Browse files Browse the repository at this point in the history
Drop Ruby 3.0
  • Loading branch information
stanhu committed Dec 29, 2024
1 parent 6d5e971 commit 9a16497
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
ruby: ["3.0", "3.1", "3.2", "3.3"]
ruby: ["3.1", "3.2", "3.3", "3.4"]
steps:
- uses: actions/checkout@v3

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ jobs:
strategy:
matrix:
platform:
- "aarch64-linux"
- "aarch64-linux-gnu"
- "aarch64-linux-musl"
- "arm64-darwin"
- "x86_64-darwin"
- "x86_64-linux"
- "x86_64-linux-gnu"
- "x86_64-linux-musl"
- "x64-mingw32"
- "x64-mingw-ucrt"
Expand All @@ -39,7 +40,7 @@ jobs:
platform: ${{ matrix.platform }}
version: 'latest'
env: |
RUBY_CC_VERSION=3.3.0:3.2.0:3.1.0:3.0.0
RUBY_CC_VERSION=3.4.0:3.3.0:3.2.0:3.1.0
- uses: actions/download-artifact@v3
with:
Expand Down
11 changes: 7 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ require "rake/testtask"
require "rake/extensiontask"
require "rb_sys"

cross_rubies = %w[3.3.0 3.2.0 3.1.0 3.0.0]
cross_rubies = %w[3.4.0 3.3.5 3.2.0 3.1.0]
cross_platforms = %w[
aarch64-linux
aarch64-linux-gnu
aarch64-linux-musl
arm64-darwin
x86_64-darwin
x86_64-linux
x86_64-linux-gnu
x86_64-linux-musl
x64-mingw32
x64-mingw-ucrt
Expand Down Expand Up @@ -42,7 +43,9 @@ namespace "gem" do
task plat => "prepare" do
require "rake_compiler_dock"

ENV["RCD_IMAGE"] = "rbsys/#{plat}:#{RbSys::VERSION}"
# rbsys doesn't ship an alias -gnu image yet
rcd_plat = plat.gsub(/-gnu$/, '')
ENV["RCD_IMAGE"] = "rbsys/#{rcd_plat}:#{RbSys::VERSION}"

RakeCompilerDock.sh <<~SH, platform: plat
bundle && \
Expand Down
3 changes: 2 additions & 1 deletion y-rb.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
spec.description = "Ruby bindings for yrs. Yrs \"wires\" is a Rust port of the Yjs framework."
spec.homepage = "https://github.com/y-crdt/yrb"
spec.license = "MIT"
spec.required_ruby_version = ">= 3.0.0"
spec.required_ruby_version = ">= 3.1.0"
# https://github.com/rubygems/rubygems/pull/5852#issuecomment-1231118509
spec.required_rubygems_version = ">= 3.3.22"

Expand All @@ -39,6 +39,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "rake", "~> 13.0"
spec.add_dependency "rb_sys", "~> 0.9.86"

spec.add_development_dependency "base64"
spec.add_development_dependency "rake-compiler", "~> 1.2.1"
spec.add_development_dependency "rake-compiler-dock", "~> 1.7.0"

Expand Down

0 comments on commit 9a16497

Please sign in to comment.