Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make jruby CI work with explicit jar-dependencies install #2550

Merged
merged 11 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/sentry_delayed_job_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby
engine: cruby-jruby
min_version: 2.4
test:
needs: ruby-versions
Expand Down Expand Up @@ -45,6 +45,7 @@ jobs:
# LoadError:
# cannot load such file -- mutex_m
- { ruby_version: "head" }
- { ruby_version: 'jruby-head' }
steps:
- uses: actions/checkout@v4
- name: Install sqlite
Expand All @@ -58,7 +59,12 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
bundler-cache: ${{ ! contains(matrix.ruby_version, 'jruby') }}

# https://github.com/jruby/jruby/issues/8606#issuecomment-2641501008
- name: Bundle Jruby
if: ${{ contains(matrix.ruby_version, 'jruby') }}
run: gem install jar-dependencies && bundle

- name: Run specs
run: bundle exec rake
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/sentry_opentelemetry_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby
engine: cruby-jruby
min_version: 2.6
test:
needs: ruby-versions
Expand All @@ -39,14 +39,21 @@ jobs:
- ruby_version: 3.2
options:
rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal"
exclude:
- { ruby_version: 'jruby-head' }
steps:
- uses: actions/checkout@v4

- name: Set up Ruby ${{ matrix.ruby_version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
bundler-cache: ${{ ! contains(matrix.ruby_version, 'jruby') }}

# https://github.com/jruby/jruby/issues/8606#issuecomment-2641501008
- name: Bundle Jruby
if: ${{ contains(matrix.ruby_version, 'jruby') }}
run: gem install jar-dependencies && bundle

- name: Run specs
run: bundle exec rake
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/sentry_rails_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ jobs:
rails_version: "8.0.0"
- ruby_version: "3.4"
rails_version: "8.0.0"
- ruby_version: "jruby"
rails_version: 6.1.0
- ruby_version: "3.2"
rails_version: 7.1.0
options:
Expand All @@ -98,7 +100,12 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
bundler-cache: ${{ ! contains(matrix.ruby_version, 'jruby') }}

# https://github.com/jruby/jruby/issues/8606#issuecomment-2641501008
- name: Bundle Jruby
if: ${{ contains(matrix.ruby_version, 'jruby') }}
run: gem install jar-dependencies && bundle

- name: Build with Rails ${{ matrix.rails_version }}
run: bundle exec rake
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/sentry_resque_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby
engine: cruby-jruby
min_version: 2.4
test:
needs: ruby-versions
Expand All @@ -37,13 +37,20 @@ jobs:
- ruby_version: "3.2"
options:
rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal"
exclude:
- { ruby_version: 'jruby-head' }
steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby_version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
bundler-cache: ${{ ! contains(matrix.ruby_version, 'jruby') }}

# https://github.com/jruby/jruby/issues/8606#issuecomment-2641501008
- name: Bundle Jruby
if: ${{ contains(matrix.ruby_version, 'jruby') }}
run: gem install jar-dependencies && bundle

- name: Start Redis
uses: supercharge/[email protected]
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/sentry_ruby_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby
engine: cruby-jruby
min_version: 2.4
test:
needs: ruby-versions
Expand Down Expand Up @@ -58,14 +58,21 @@ jobs:
- ruby_version: 3.4
rack_version: 3.1
redis_rb_version: 5.3
exclude:
- { ruby_version: 'jruby-head' }
steps:
- uses: actions/checkout@v4

- name: Set up Ruby ${{ matrix.ruby_version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
bundler-cache: ${{ ! contains(matrix.ruby_version, 'jruby') }}

# https://github.com/jruby/jruby/issues/8606#issuecomment-2641501008
- name: Bundle Jruby
if: ${{ contains(matrix.ruby_version, 'jruby') }}
run: gem install jar-dependencies && bundle

- name: Start Redis
uses: supercharge/redis-github-action@c169aa53af4cd5d9321e9114669dbd11be08d307
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/sentry_sidekiq_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
fail-fast: false
matrix:
sidekiq_version: ["5.0", "6.5", "7.0"]
ruby_version: ["2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
ruby_version: ["2.7", "3.0", "3.1", "3.2", "3.3", "3.4", jruby]
include:
- ruby_version: 2.4
sidekiq_version: 5.0
Expand All @@ -40,6 +40,12 @@ jobs:
sidekiq_version: 5.0
- ruby_version: 2.6
sidekiq_version: 6.0
- ruby_version: jruby
sidekiq_version: 5.0
- ruby_version: jruby
sidekiq_version: 6.0
- ruby_version: jruby
sidekiq_version: 7.0
- ruby_version: "3.2"
sidekiq_version: 7.0
options:
Expand All @@ -57,7 +63,12 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
bundler-cache: ${{ ! contains(matrix.ruby_version, 'jruby') }}

# https://github.com/jruby/jruby/issues/8606#issuecomment-2641501008
- name: Bundle Jruby
if: ${{ contains(matrix.ruby_version, 'jruby') }}
run: gem install jar-dependencies && bundle

- name: Start Redis
uses: supercharge/[email protected]
Expand Down
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
source "https://rubygems.org"
git_source(:github) { |name| "https://github.com/#{name}.git" }

gem "jar-dependencies", "0.5.4" if RUBY_PLATFORM == "java"
gem "rake", "~> 12.0"

ruby_version = Gem::Version.new(RUBY_VERSION)

gem "jar-dependencies", "0.4.1" if RUBY_PLATFORM == "java"

# Development tools
if ruby_version >= Gem::Version.new("2.7.0")
gem "debug", github: "ruby/debug", platform: :ruby
Expand Down
7 changes: 3 additions & 4 deletions sentry-delayed_job/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
source "https://rubygems.org"
git_source(:github) { |name| "https://github.com/#{name}.git" }

eval_gemfile "../Gemfile"

# Specify your gem's dependencies in sentry-ruby.gemspec
gemspec
gem "sentry-ruby", path: "../sentry-ruby"
Expand All @@ -14,8 +16,7 @@ gem "delayed_job_active_record"
gem "rails", "> 5.0.0"

platform :jruby do
# See https://github.com/jruby/activerecord-jdbc-adapter/issues/1139
gem "activerecord-jdbcmysql-adapter", "<71.0", github: "jruby/activerecord-jdbc-adapter", ref: "6b3983bbbfda75ee2a1f5bc4c8d35efd7b71d84b"
gem "activerecord-jdbcmysql-adapter"
gem "jdbc-sqlite3"
end

Expand All @@ -30,5 +31,3 @@ elsif ruby_version >= Gem::Version.new("3.0.0") && ruby_version < Gem::Version.n
elsif ruby_version >= Gem::Version.new("3.1.0")
gem "sqlite3", "~> 2.2", platform: :ruby
end

eval_gemfile "../Gemfile"
4 changes: 2 additions & 2 deletions sentry-opentelemetry/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
source "https://rubygems.org"
git_source(:github) { |name| "https://github.com/#{name}.git" }

eval_gemfile "../Gemfile"

# Specify your gem's dependencies in sentry-ruby.gemspec
gemspec

Expand All @@ -12,5 +14,3 @@ gem "opentelemetry-sdk"
gem "opentelemetry-instrumentation-rails"

gem "sentry-ruby", path: "../sentry-ruby"

eval_gemfile "../Gemfile"
4 changes: 2 additions & 2 deletions sentry-rails/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
source "https://rubygems.org"
git_source(:github) { |name| "https://github.com/#{name}.git" }

eval_gemfile "../Gemfile"

# Specify your gem's dependencies in sentry-ruby.gemspec
gemspec
gem "sentry-ruby", path: "../sentry-ruby"
Expand Down Expand Up @@ -59,5 +61,3 @@ gem "benchmark-ips"
gem "benchmark_driver"
gem "benchmark-ipsa"
gem "benchmark-memory"

eval_gemfile "../Gemfile"
4 changes: 2 additions & 2 deletions sentry-resque/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
source "https://rubygems.org"
git_source(:github) { |name| "https://github.com/#{name}.git" }

eval_gemfile "../Gemfile"

# Specify your gem's dependencies in sentry-ruby.gemspec
gemspec

Expand All @@ -12,8 +14,6 @@ gem "sentry-ruby", path: "../sentry-ruby"

gem "resque-retry", "~> 1.8"

eval_gemfile "../Gemfile"

group :rails do
gem "sentry-rails", path: "../sentry-rails"
gem "rails"
Expand Down
4 changes: 2 additions & 2 deletions sentry-ruby/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
source "https://rubygems.org"
git_source(:github) { |name| "https://github.com/#{name}.git" }

eval_gemfile "../Gemfile"

gem "sentry-ruby", path: "./"

rack_version = ENV["RACK_VERSION"]
Expand Down Expand Up @@ -31,5 +33,3 @@ gem "yard", github: "lsegal/yard"
gem "webrick"
gem "faraday"
gem "excon"

eval_gemfile "../Gemfile"
5 changes: 3 additions & 2 deletions sentry-sidekiq/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
source "https://rubygems.org"
git_source(:github) { |name| "https://github.com/#{name}.git" }

eval_gemfile "../Gemfile"

# Specify your gem's dependencies in sentry-ruby.gemspec
gemspec

gem "sentry-ruby", path: "../sentry-ruby"
gem "sentry-rails", path: "../sentry-rails"

Expand All @@ -26,5 +29,3 @@ end
gem "rails", "> 5.0.0"

gem "timecop"

eval_gemfile "../Gemfile"
Loading