Skip to content

Commit

Permalink
Streamline CI configuration (#2041)
Browse files Browse the repository at this point in the history
* streamline ci jobs

In our experience, it's not been useful to have so many permutations
of rails/ruby/etc tested in CI. Let's pare things down to a few
representative combinations <3

https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs

* use ruby 3.3 for benchmark job

* use ruby 3.3 for coverage job
  • Loading branch information
joelhawksley authored Jun 3, 2024
1 parent cc40fb8 commit d190721
Showing 1 changed file with 17 additions and 48 deletions.
65 changes: 17 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.3
- uses: actions/cache@v4
with:
path: vendor/bundle
key: gems-build-rails-main-ruby-2.7-${{ hashFiles('**/Gemfile.lock') }}
key: gems-build-rails-main-ruby-3.3-${{ hashFiles('**/Gemfile.lock') }}
- name: Run benchmarks
run: |
bundle config path vendor/bundle
Expand All @@ -31,12 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
rails_version: ["6.1", "7.0", "7.1", "main"]
ruby_version: ["3.1", "3.2", "3.3", "head"]
mode: ["capture_patch_enabled", "capture_patch_disabled"]
yjit_mode: ['1', '0']
include:
# Run against all previously supported Rails versions for Ruby 3.0
- ruby_version: "3.0"
rails_version: "6.1"
mode: "capture_patch_enabled"
Expand All @@ -45,64 +40,38 @@ jobs:
rails_version: "6.1"
mode: "capture_patch_disabled"
yjit_mode: '0'
- ruby_version: "3.0"
- ruby_version: "3.1"
rails_version: "7.0"
mode: "capture_patch_enabled"
yjit_mode: '0'
- ruby_version: "3.0"
yjit_mode: '1'
- ruby_version: "3.1"
rails_version: "7.0"
mode: "capture_patch_disabled"
yjit_mode: '0'
- ruby_version: "3.0"
- ruby_version: "3.2"
rails_version: "7.1"
mode: "capture_patch_enabled"
yjit_mode: '0'
- ruby_version: "3.0"
- ruby_version: "3.2"
rails_version: "7.1"
mode: "capture_patch_disabled"
yjit_mode: '0'
exclude:
# Dont run YJIT and Ruby head against Rails 6.1
- rails_version: "6.1"
ruby_version: "3.1"
mode: "capture_patch_enabled"
yjit_mode: '1'
- rails_version: "6.1"
ruby_version: "3.1"
mode: "capture_patch_disabled"
yjit_mode: '1'
- rails_version: "6.1"
ruby_version: "3.2"
- ruby_version: "3.3"
rails_version: "7.1"
mode: "capture_patch_enabled"
yjit_mode: '1'
- rails_version: "6.1"
ruby_version: "3.2"
- ruby_version: "3.3"
rails_version: "7.1"
mode: "capture_patch_disabled"
yjit_mode: '1'
- rails_version: "6.1"
ruby_version: "3.3"
mode: "capture_patch_enabled"
yjit_mode: '1'
- rails_version: "6.1"
ruby_version: "3.3"
- ruby_version: "head"
rails_version: "main"
mode: "capture_patch_disabled"
yjit_mode: '1'
- rails_version: "6.1"
ruby_version: "head"
mode: "capture_patch_enabled"
yjit_mode: '1'
- rails_version: "6.1"
ruby_version: "head"
- ruby_version: "head"
rails_version: "main"
mode: "capture_patch_enabled"
yjit_mode: '0'
- rails_version: "6.1"
ruby_version: "head"
mode: "capture_patch_disabled"
yjit_mode: '1'
- rails_version: "6.1"
ruby_version: "head"
mode: "capture_patch_disabled"
yjit_mode: '0'
env:
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails_version }}.gemfile
steps:
Expand Down Expand Up @@ -174,13 +143,13 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.3
- name: Download coverage results
uses: actions/download-artifact@v3
- uses: actions/cache@v4
with:
path: vendor/bundle
key: gems-build-rails-main-ruby-2.7-${{ hashFiles('**/Gemfile.lock') }}
key: gems-build-rails-main-ruby-3.3-${{ hashFiles('**/Gemfile.lock') }}
- name: Collate simplecov
run: |
bundle config path vendor/bundle
Expand Down

0 comments on commit d190721

Please sign in to comment.