Skip to content

Commit

Permalink
Merge pull request #2364 from ruby/add-ruby-2-7
Browse files Browse the repository at this point in the history
Support for Ruby 2.7
  • Loading branch information
kddnewton authored Feb 7, 2024
2 parents 5b79694 + 1a15b70 commit a884fd1
Show file tree
Hide file tree
Showing 32 changed files with 645 additions and 90 deletions.
32 changes: 32 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,35 @@ updates:
directory: '/java-wasm'
schedule:
interval: 'weekly'
- package-ecosystem: 'bundler'
directory: '/gemfiles/2.7'
schedule:
interval: 'weekly'
- package-ecosystem: 'bundler'
directory: '/gemfiles/3.0'
schedule:
interval: 'weekly'
- package-ecosystem: 'bundler'
directory: '/gemfiles/3.1'
schedule:
interval: 'weekly'
- package-ecosystem: 'bundler'
directory: '/gemfiles/3.2'
schedule:
interval: 'weekly'
- package-ecosystem: 'bundler'
directory: '/gemfiles/3.3'
schedule:
interval: 'weekly'
- package-ecosystem: 'bundler'
directory: '/gemfiles/3.4'
schedule:
interval: 'weekly'
- package-ecosystem: 'bundler'
directory: '/gemfiles/jruby'
schedule:
interval: 'weekly'
- package-ecosystem: 'bundler'
directory: '/gemfiles/truffleruby'
schedule:
interval: 'weekly'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ruby Core
name: CRuby bindings

concurrency:
group: "${{github.workflow}}-${{github.ref}}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-wasm-bindings.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Bindings to Chicory
name: Java WASM bindings

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/javascript-bindings.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: JavaScript Bindings
name: JavaScript bindings

on:
push:
Expand Down
51 changes: 38 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
ruby-version: "3.3"
bundler-cache: true
- name: Lint
run: bundle exec rake lint
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
ruby-version: "3.3"
bundler-cache: true
- name: Check annotations
run: |
Expand Down Expand Up @@ -73,19 +73,20 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [ruby, jruby, truffleruby]
target:
- { ruby: "head", gemfile: "3.4" }
- { ruby: "jruby", gemfile: "jruby" }
- { ruby: "truffleruby", gemfile: "truffleruby" }
runs-on: ubuntu-latest
env:
PRISM_FFI_BACKEND: "true"
BUNDLE_GEMFILE: gemfiles/${{ matrix.target.gemfile }}/Gemfile
steps:
- uses: actions/checkout@v4
# The Gemfile.lock is different with PRISM_FFI_BACKEND=true for CRuby
- run: rm Gemfile.lock
if: matrix.ruby == 'ruby'
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
ruby-version: ${{ matrix.target.ruby }}
bundler-cache: true
- name: Run Ruby tests
run: bundle exec rake
Expand Down Expand Up @@ -235,16 +236,40 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "head", "jruby", "truffleruby"]
os: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- { ruby: truffleruby, os: windows-latest }
runs-on: ${{ matrix.os }}
target:
- { ruby: "2.7", os: "ubuntu-latest", gemfile: "2.7" }
- { ruby: "3.0", os: "ubuntu-latest", gemfile: "3.0" }
- { ruby: "3.1", os: "ubuntu-latest", gemfile: "3.1" }
- { ruby: "3.2", os: "ubuntu-latest", gemfile: "3.2" }
- { ruby: "3.3", os: "ubuntu-latest", gemfile: "3.3" }
- { ruby: "head", os: "ubuntu-latest", gemfile: "3.4" }
- { ruby: "jruby", os: "ubuntu-latest", gemfile: "jruby" }
- { ruby: "truffleruby", os: "ubuntu-latest", gemfile: "truffleruby" }

- { ruby: "2.7", os: "macos-latest", gemfile: "2.7" }
- { ruby: "3.0", os: "macos-latest", gemfile: "3.0" }
- { ruby: "3.1", os: "macos-latest", gemfile: "3.1" }
- { ruby: "3.2", os: "macos-latest", gemfile: "3.2" }
- { ruby: "3.3", os: "macos-latest", gemfile: "3.3" }
- { ruby: "head", os: "macos-latest", gemfile: "3.4" }
- { ruby: "jruby", os: "macos-latest", gemfile: "jruby" }
- { ruby: "truffleruby", os: "macos-latest", gemfile: "truffleruby" }

- { ruby: "2.7", os: "windows-latest", gemfile: "2.7" }
- { ruby: "3.0", os: "windows-latest", gemfile: "3.0" }
- { ruby: "3.1", os: "windows-latest", gemfile: "3.1" }
- { ruby: "3.2", os: "windows-latest", gemfile: "3.2" }
- { ruby: "3.3", os: "windows-latest", gemfile: "3.3" }
- { ruby: "head", os: "windows-latest", gemfile: "3.4" }
- { ruby: "jruby", os: "windows-latest", gemfile: "jruby" }
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.target.gemfile }}/Gemfile
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
ruby-version: ${{ matrix.target.ruby }}
- uses: actions/download-artifact@v4
with:
name: gem-package
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/rust-bindings.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
name: Rust Bindings
name: Rust bindings

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Loader.java with TruffleRuby
name: TruffleRuby bindings

concurrency:
group: "${{github.workflow}}-${{github.ref}}"
Expand Down
14 changes: 14 additions & 0 deletions gemfiles/2.7/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

source "https://rubygems.org"

ruby "~> 2.7.0"

gemspec path: "../.."

gem "ffi"
gem "parser"
gem "rake"
gem "rake-compiler"
gem "rbs"
gem "test-unit"
39 changes: 39 additions & 0 deletions gemfiles/2.7/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
PATH
remote: ../..
specs:
prism (0.21.0)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
ffi (1.16.3)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
power_assert (2.0.3)
racc (1.7.3)
rake (13.1.0)
rake-compiler (1.2.7)
rake
rbs (3.1.3)
test-unit (3.6.1)
power_assert

PLATFORMS
ruby

DEPENDENCIES
ffi
parser
prism!
rake
rake-compiler
rbs
test-unit

RUBY VERSION
ruby 2.7.8p225

BUNDLED WITH
2.1.4
15 changes: 15 additions & 0 deletions gemfiles/3.0/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

source "https://rubygems.org"

ruby "~> 3.0.0"

gemspec path: "../.."

gem "ffi"
gem "parser"
gem "rake"
gem "rake-compiler"
gem "rbs"
gem "ruby_memcheck"
gem "test-unit"
48 changes: 48 additions & 0 deletions gemfiles/3.0/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
PATH
remote: ../..
specs:
prism (0.21.0)

GEM
remote: https://rubygems.org/
specs:
abbrev (0.1.2)
ast (2.4.2)
ffi (1.16.3)
mini_portile2 (2.8.5)
nokogiri (1.16.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
power_assert (2.0.3)
racc (1.7.3)
rake (13.1.0)
rake-compiler (1.2.7)
rake
rbs (3.4.3)
abbrev
ruby_memcheck (2.3.0)
nokogiri
test-unit (3.6.1)
power_assert

PLATFORMS
ruby

DEPENDENCIES
ffi
parser
prism!
rake
rake-compiler
rbs
ruby_memcheck
test-unit

RUBY VERSION
ruby 3.0.6p216

BUNDLED WITH
2.2.33
15 changes: 15 additions & 0 deletions gemfiles/3.1/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

source "https://rubygems.org"

ruby "~> 3.1.0"

gemspec path: "../.."

gem "ffi"
gem "parser"
gem "rake"
gem "rake-compiler"
gem "rbs"
gem "ruby_memcheck"
gem "test-unit"
48 changes: 48 additions & 0 deletions gemfiles/3.1/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
PATH
remote: ../..
specs:
prism (0.21.0)

GEM
remote: https://rubygems.org/
specs:
abbrev (0.1.2)
ast (2.4.2)
ffi (1.16.3)
mini_portile2 (2.8.5)
nokogiri (1.16.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
power_assert (2.0.3)
racc (1.7.3)
rake (13.1.0)
rake-compiler (1.2.7)
rake
rbs (3.4.3)
abbrev
ruby_memcheck (2.3.0)
nokogiri
test-unit (3.6.1)
power_assert

PLATFORMS
ruby

DEPENDENCIES
ffi
parser
prism!
rake
rake-compiler
rbs
ruby_memcheck
test-unit

RUBY VERSION
ruby 3.1.4p223

BUNDLED WITH
2.3.26
15 changes: 15 additions & 0 deletions gemfiles/3.2/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

source "https://rubygems.org"

ruby "~> 3.2.0"

gemspec path: "../.."

gem "ffi"
gem "parser"
gem "rake"
gem "rake-compiler"
gem "rbs"
gem "ruby_memcheck"
gem "test-unit"
Loading

0 comments on commit a884fd1

Please sign in to comment.