Skip to content

Commit

Permalink
Split gemfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
lloeki committed Nov 14, 2024
1 parent 0fbfb6b commit b094e32
Show file tree
Hide file tree
Showing 18 changed files with 166 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
docker run --platform linux/x86_64 --rm ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} ruby -e 'puts RUBY_DESCRIPTION'
docker run --platform linux/x86_64 --rm ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} gem --version
docker run --platform linux/x86_64 --rm ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} bundle --version
docker run --platform linux/x86_64 --rm -v "${PWD}":"${PWD}" -w "${PWD}" ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} /bin/sh -c 'bundle install && bundle exec rake test'
docker run --platform linux/x86_64 --rm -v "${PWD}":"${PWD}" -w "${PWD}" -e BUNDLE_GEMFILE=gemfiles/${{ matrix.engine }}-${{ matrix.version }}.gemfile ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} /bin/sh -c 'bundle install && bundle exec rake test'
# Then, build image for aarch64 which, being emulated under qemu, is slower
#
Expand All @@ -108,7 +108,7 @@ jobs:
docker run --platform linux/aarch64 --rm ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} ruby -e 'puts RUBY_DESCRIPTION'
docker run --platform linux/aarch64 --rm ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} gem --version
docker run --platform linux/aarch64 --rm ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} bundle --version
docker run --platform linux/aarch64 --rm -v "${PWD}":"${PWD}" -w "${PWD}" ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} /bin/sh -c 'bundle install && bundle exec rake test'
docker run --platform linux/aarch64 --rm -v "${PWD}":"${PWD}" -w "${PWD}" -e BUNDLE_GEMFILE=gemfiles/${{ matrix.engine }}-${{ matrix.version }}.gemfile ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} /bin/sh -c 'bundle install && bundle exec rake test'
# Finally, assemble multi-arch image for a combined push to the registry
#
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/.direnv
/vendor/bundle
/Gemfile.lock
/gemfiles/*.gemfile.lock
20 changes: 3 additions & 17 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
source "https://rubygems.org"
# frozen_string_literal: true

gem "rake"

group :test do
gem "minitest"
end

group :check do
gem "standard"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-minitest"
end

group :ide do
gem "ruby-lsp"
end
gemfile = "#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION.split(".").take(2).join(".")}.gemfile"
eval_gemfile "gemfiles/#{gemfile}"
7 changes: 7 additions & 0 deletions gemfiles/jruby-9.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/jruby-9.3.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/jruby-9.4.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/ruby-2.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/ruby-2.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/ruby-2.3.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/ruby-2.4.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/ruby-2.5.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/ruby-2.6.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/ruby-2.7.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
18 changes: 18 additions & 0 deletions gemfiles/ruby-3.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end

group :check do
gem "standard"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-minitest"
end

group :ide do
gem "ruby-lsp"
end
18 changes: 18 additions & 0 deletions gemfiles/ruby-3.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end

group :check do
gem "standard"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-minitest"
end

group :ide do
gem "ruby-lsp"
end
18 changes: 18 additions & 0 deletions gemfiles/ruby-3.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end

group :check do
gem "standard"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-minitest"
end

group :ide do
gem "ruby-lsp"
end
18 changes: 18 additions & 0 deletions gemfiles/ruby-3.3.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end

group :check do
gem "standard"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-minitest"
end

group :ide do
gem "ruby-lsp"
end
18 changes: 18 additions & 0 deletions gemfiles/ruby-3.4.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end

group :check do
gem "standard"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-minitest"
end

group :ide do
gem "ruby-lsp"
end

0 comments on commit b094e32

Please sign in to comment.