Skip to content

Commit

Permalink
Update GH Workflows to have jruby. (#391)
Browse files Browse the repository at this point in the history
* GH actions fixes

Update jruby.yml with ruby/setup

Add jruby to pull request actions

tests: try with jruby-head

Add java back in.

change to 9.2.13.0

chore: Remove java

downgrade to 9.2.12.0

go back up to 9.2.14.0

Update rails_helper.rb

condense jruby into one workflow

Update ruby.yml

remove rails master for jruby.

Update ruby.yml

parallelize workflows

fix syntax errors

fix syntax errors

fix key issues

rebase from main

change the way sources are defined for rails main{

rewrite sources

fighting with sources

possible source fix?

Update Appraisals

Update Appraisals

Update Appraisals

reinstall gemfiles

fix for bundler 2.2.10

fix for bundler 2.2.10

fix for bundler 2.2.10

lock bundler to 2.2.9

* go back to normal ruby

* go back to normal ruby

* fixing conditional

* fixing conditional

* split jruby into a separate job for parallelization

* without master rails

* readd master

* move master rails to a seperate job

* rerun gh actions

* Remove master-rails job

I'm just curious how fast this completes without building rails master.

* Reduce number of JRuby builds

We could run a subset of integration tests on JRuby—the latest version of Rails and Sinatra, for instance.

* Start JRuby first, test only latest rails

* Changing the order didn't seem to help

Co-authored-by: Josh Wood <[email protected]>
  • Loading branch information
KonnorRogers and joshuap authored Feb 17, 2021
1 parent 56f998b commit fad8791
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 21 deletions.
39 changes: 31 additions & 8 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ on:
branches: [ master ]

jobs:
build:

ruby:
runs-on: ubuntu-latest

strategy:
matrix:
ruby:
Expand All @@ -23,18 +22,13 @@ jobs:
- delayed_job.gemfile
- rack.gemfile
- rack_1.gemfile
- rails.gemfile
- rails5.2.gemfile
- rails6.0.gemfile
- resque.gemfile
- sinatra.gemfile
- sinatra_1.gemfile
- standalone.gemfile
exclude:
- gemfile: rails.gemfile
ruby: '2.5'
- gemfile: rails.gemfile
ruby: '2.6'
- gemfile: rails5.2.gemfile
ruby: '3.0'

Expand All @@ -51,8 +45,37 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: '2.2.9'
bundler-cache: true

- name: Build and test
- name: Build and test regular ruby
run: |
bundle exec rake
jruby:
runs-on: ubuntu-latest
strategy:
matrix:
ruby:
- 'jruby-9.2.14.0'
gemfile:
- rails6.0.gemfile

# Has to be top level to cache properly
env:
BUNDLE_GEMFILE: "gemfiles/${{ matrix.gemfile }}"
BUNDLE_JOBS: 4
BUNDLE_PATH: "vendor/bundle"
BUNDLE_WITHOUT: "development"
steps:
- uses: actions/checkout@v2
- name: Set up JRuby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: '2.2.9'
bundler-cache: true

- name: Build and test jruby
run: |
bundle exec rake spec:integrations spec:units
5 changes: 1 addition & 4 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.5.0')

# Rails edge
appraise 'rails' do
git 'https://github.com/rails/rails.git' do
RAILS_GEMS.each { |rails_gem| gem rails_gem }
end

RAILS_GEMS.each { |rails_gem| gem rails_gem, github: 'rails' }
gem 'rack', github: 'rack/rack'
gem 'arel', github: 'rails/arel'
gem 'sqlite3', '~> 1.4', platform: :mri
Expand Down
15 changes: 6 additions & 9 deletions gemfiles/rails.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@

source "https://rubygems.org"

git "https://github.com/rails/rails.git" do
gem "activesupport"
gem "activemodel"
gem "activerecord"
gem "activejob"
gem "railties"
gem "actionpack"
end

gem "allocation_stats", platforms: :mri, require: false
gem "appraisal", "~> 2.1"
gem "aruba", "~> 0.14"
Expand All @@ -22,6 +13,12 @@ gem "webmock"
gem "capistrano", "~> 3.0"
gem "rake"
gem "bump", "~> 0.9.0"
gem "activesupport", github: "rails"
gem "activemodel", github: "rails"
gem "activerecord", github: "rails"
gem "activejob", github: "rails"
gem "railties", github: "rails"
gem "actionpack", github: "rails"
gem "rack", github: "rack/rack"
gem "arel", github: "rails/arel"
gem "sqlite3", "~> 1.4", platform: :mri
Expand Down
4 changes: 4 additions & 0 deletions spec/integration/rails_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
begin
# Require these early to work around https://github.com/jruby/jruby#6547
# can be pulled out > 9.2.14 of jruby.
require 'i18n'
require 'i18n/backend/simple'
require 'rails'
RAILS_PRESENT = true

Expand Down

0 comments on commit fad8791

Please sign in to comment.