Skip to content

Commit

Permalink
Merge pull request #8 from DataDog/anmarchenko/drop_ruby_26_support
Browse files Browse the repository at this point in the history
Ruby versions for CI visibility
  • Loading branch information
anmarchenko committed Aug 21, 2023
2 parents bb6fbbc + 8d0980a commit 4e07eb1
Show file tree
Hide file tree
Showing 69 changed files with 168 additions and 3,225 deletions.
146 changes: 25 additions & 121 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -347,36 +347,6 @@ orbs:

job_configuration:
# MRI
- &config-2_1
<<: *filters_all_branches_and_tags
ruby_version: 'ruby-2.1.10'
image: ghcr.io/datadog/dd-trace-rb/ruby:2.1.10-dd
resource_class_to_use: medium+
- &config-2_2
<<: *filters_all_branches_and_tags
ruby_version: 'ruby-2.2.10'
image: ghcr.io/datadog/dd-trace-rb/ruby:2.2.10-dd
resource_class_to_use: medium+
- &config-2_3
<<: *filters_all_branches_and_tags
ruby_version: 'ruby-2.3.8'
image: ghcr.io/datadog/dd-trace-rb/ruby:2.3.8-dd
resource_class_to_use: medium+
- &config-2_4
<<: *filters_all_branches_and_tags
ruby_version: 'ruby-2.4.10'
image: ghcr.io/datadog/dd-trace-rb/ruby:2.4.10-dd
resource_class_to_use: medium+
- &config-2_5
<<: *filters_all_branches_and_tags
ruby_version: 'ruby-2.5.9'
image: ghcr.io/datadog/dd-trace-rb/ruby:2.5.9-dd
resource_class_to_use: medium+
- &config-2_6
<<: *filters_all_branches_and_tags
ruby_version: 'ruby-2.6.10'
image: ghcr.io/datadog/dd-trace-rb/ruby:2.6.10-dd
resource_class_to_use: medium+
- &config-2_7
<<: *filters_all_branches_and_tags
ruby_version: 'ruby-2.7.6'
Expand All @@ -397,19 +367,19 @@ job_configuration:
ruby_version: 'ruby-3.2.0'
image: ghcr.io/datadog/dd-trace-rb/ruby:3.2.0-dd
resource_class_to_use: medium+
- &config-3_3
<<: *filters_all_branches_and_tags
ruby_version: 'ruby-3.3.0'
image: ghcr.io/datadog/dd-trace-rb/ruby:3.3.0-dd
resource_class_to_use: medium+
- &config-3_2-small
<<: *config-3_2
resource_class_to_use: small
# ADD NEW RUBIES HERE
- &config-jruby-9_2 # More recent release of 9.2
- &config-jruby-9_4
<<: *filters_all_branches_and_tags
ruby_version: 'jruby-9.2.21.0'
image: ghcr.io/datadog/dd-trace-rb/jruby:9.2.21.0-dd
resource_class_to_use: medium+
- &config-jruby-9_3
<<: *filters_all_branches_and_tags
ruby_version: 'jruby-9.3.9.0'
image: ghcr.io/datadog/dd-trace-rb/jruby:9.3.9.0-dd
ruby_version: 'jruby-9.4.0.0'
image: ghcr.io/datadog/dd-trace-rb/jruby:9.4.0.0-dd
resource_class_to_use: medium+

workflows:
Expand All @@ -425,19 +395,13 @@ workflows:
# <<: *config-3_2-small
# name: coverage
# requires:
# - test-2.1
# - test-2.2
# - test-2.3
# - test-2.4
# - test-2.5
# - test-2.6
# - test-2.7
# - test-3.0
# - test-3.1
# - test-3.2
# - test-3.3
# # ADD NEW RUBIES HERE
# - test-jruby-9.2
# - test-jruby-9.3
# - test-jruby-9.4
# - orb/changelog:
# <<: *config-3_2-small
# name: changelog
Expand All @@ -448,54 +412,6 @@ workflows:
# only: /bump_to_version_.*/
#
# ADD NEW RUBIES HERE
- orb/build:
<<: *config-2_1
name: build-2.1
- orb/test:
<<: *config-2_1
name: test-2.1
requires:
- build-2.1
- orb/build:
<<: *config-2_2
name: build-2.2
- orb/test:
<<: *config-2_2
name: test-2.2
requires:
- build-2.2
- orb/build:
<<: *config-2_3
name: build-2.3
- orb/test:
<<: *config-2_3
name: test-2.3
requires:
- build-2.3
- orb/build:
<<: *config-2_4
name: build-2.4
- orb/test:
<<: *config-2_4
name: test-2.4
requires:
- build-2.4
- orb/build:
<<: *config-2_5
name: build-2.5
- orb/test:
<<: *config-2_5
name: test-2.5
requires:
- build-2.5
- orb/build:
<<: *config-2_6
name: build-2.6
- orb/test:
<<: *config-2_6
name: test-2.6
requires:
- build-2.6
- orb/build:
<<: *config-2_7
name: build-2.7
Expand Down Expand Up @@ -528,55 +444,43 @@ workflows:
name: test-3.2
requires:
- build-3.2
# ADD NEW RUBIES HERE
- orb/build:
<<: *config-jruby-9_2
name: build-jruby-9.2
<<: *config-3_3
name: build-3.3
- orb/test:
<<: *config-jruby-9_2
name: test-jruby-9.2
<<: *config-3_3
name: test-3.3
requires:
- build-jruby-9.2
- build-3.3
# ADD NEW RUBIES HERE
- orb/build:
<<: *config-jruby-9_3
name: build-jruby-9.3
<<: *config-jruby-9_4
name: build-jruby-9.4
- orb/test:
<<: *config-jruby-9_3
name: test-jruby-9.3
<<: *config-jruby-9_4
name: test-jruby-9.4
requires:
- build-jruby-9.3
- build-jruby-9.4
# Release jobs
# - "deploy prerelease Gem":
# <<: *filters_all_branches_and_tags
# requires:
# - lint
# - test-2.1
# - test-2.2
# - test-2.3
# - test-2.4
# - test-2.5
# - test-2.6
# - test-2.7
# - test-3.0
# - test-3.1
# - test-3.2
# - test-3.3
# # ADD NEW RUBIES HERE
# - test-jruby-9.2
# - test-jruby-9.3
# - test-jruby-9.4
# - "deploy release":
# <<: *filters_only_release_tags
# requires:
# - lint
# - test-2.1
# - test-2.2
# - test-2.3
# - test-2.4
# - test-2.5
# - test-2.6
# - test-2.7
# - test-3.0
# - test-3.1
# - test-3.2
# - test-3.3
# # ADD NEW RUBIES HERE
# - test-jruby-9.2
# - test-jruby-9.3
# - test-jruby-9.4
2 changes: 1 addition & 1 deletion .standard.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ruby_version: 3.1.3
ruby_version: 2.7
format: progress

ignore:
Expand Down
43 changes: 4 additions & 39 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -69,46 +69,11 @@ def self.with_minitest_gem(versions: 5)
end
end

if ruby_version?("2.1")
with_rspec_gem
elsif ruby_version?("2.2")
with_rspec_gem
with_cucumber_gem(versions: 3)
elsif ruby_version?("2.3")
with_rspec_gem
with_cucumber_gem(versions: 3..4)
elsif ruby_version?("2.4")
with_rspec_gem
with_cucumber_gem(versions: 3..4)
elsif ruby_version?("2.5")
with_rspec_gem
with_cucumber_gem(versions: 3..7)
elsif ruby_version?("2.6")
with_rspec_gem
with_cucumber_gem(versions: 3..8)
elsif ruby_version?("2.7")
with_minitest_gem
with_rspec_gem
with_cucumber_gem(versions: 3..8)
elsif ruby_version?("3.0")
with_minitest_gem
with_rspec_gem
with_cucumber_gem(versions: 3..8)
elsif ruby_version?("3.1")
with_minitest_gem
with_rspec_gem
with_cucumber_gem(versions: 3..8)
elsif ruby_version?("3.2")
with_minitest_gem
with_rspec_gem
with_cucumber_gem(versions: 3..8)
end
with_minitest_gem
with_rspec_gem
with_cucumber_gem(versions: 3..8)

ruby_runtime = if defined?(RUBY_ENGINE_VERSION)
"#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}"
else
"#{RUBY_ENGINE}-#{RUBY_VERSION}" # For Ruby < 2.3
end
ruby_runtime = "#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}"

appraisals.each do |appraisal|
appraisal.name.prepend("#{ruby_runtime}-")
Expand Down
8 changes: 2 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,12 @@ gem "rake"
gem "rspec"
gem "os"

if RUBY_VERSION >= "2.5"
gem "climate_control"
else
gem "climate_control", "~> 0.2.0"
end
gem "climate_control"

gem "rspec-collection_matchers"
gem "rspec_junit_formatter"
gem "appraisal"
gem "standard", "<= 1.24.3" if RUBY_VERSION >= "2.2.0"
gem "standard", "<= 1.24.3"

gem "yard"
gem "webrick"
1 change: 0 additions & 1 deletion Gemfile-2.2

This file was deleted.

1 change: 0 additions & 1 deletion Gemfile-2.3

This file was deleted.

1 change: 0 additions & 1 deletion Gemfile-2.4

This file was deleted.

1 change: 0 additions & 1 deletion Gemfile-2.5

This file was deleted.

1 change: 0 additions & 1 deletion Gemfile-2.6

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion Gemfile-jruby-9.2

This file was deleted.

24 changes: 10 additions & 14 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ def declare(rubies_to_command)
total_executors = ENV.key?("CIRCLE_NODE_TOTAL") ? ENV["CIRCLE_NODE_TOTAL"].to_i : nil
current_executor = ENV.key?("CIRCLE_NODE_INDEX") ? ENV["CIRCLE_NODE_INDEX"].to_i : nil

ruby_runtime = if defined?(RUBY_ENGINE_VERSION)
"#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}"
else
"#{RUBY_ENGINE}-#{RUBY_VERSION}" # For Ruby < 2.3
end
ruby_runtime = "#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}"

command = command.sub(/^bundle exec appraisal /, "bundle exec appraisal #{ruby_runtime}-")

Expand All @@ -83,19 +79,19 @@ end

desc "CI task; it runs all tests for current version of Ruby"
task :ci do
declare "✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby" => "bundle exec rake spec:main"
declare "✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby" => "bundle exec rake spec:main"

# RSpec
declare "✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby" => "bundle exec appraisal rspec-3 rake spec:rspec"
declare "✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby" => "bundle exec appraisal rspec-3 rake spec:rspec"

# Cucumber
declare "❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby" => "bundle exec appraisal cucumber-3 rake spec:cucumber"
declare "❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby" => "bundle exec appraisal cucumber-4 rake spec:cucumber"
declare "❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ❌ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby" => "bundle exec appraisal cucumber-5 rake spec:cucumber"
declare "❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ❌ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby" => "bundle exec appraisal cucumber-6 rake spec:cucumber"
declare "❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ❌ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby" => "bundle exec appraisal cucumber-7 rake spec:cucumber"
declare "❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ❌ 2.4 / ❌ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby" => "bundle exec appraisal cucumber-8 rake spec:cucumber"
declare "✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby" => "bundle exec appraisal cucumber-3 rake spec:cucumber"
declare "✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby" => "bundle exec appraisal cucumber-4 rake spec:cucumber"
declare "✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby" => "bundle exec appraisal cucumber-5 rake spec:cucumber"
declare "✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby" => "bundle exec appraisal cucumber-6 rake spec:cucumber"
declare "✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby" => "bundle exec appraisal cucumber-7 rake spec:cucumber"
declare "✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby" => "bundle exec appraisal cucumber-8 rake spec:cucumber"

# Minitest
declare " 2.1 / ❌ 2.2 / ❌ 2.3 / ❌ 2.4 / ❌ 2.5 / ❌ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby" => "bundle exec appraisal minitest-5 rake spec:minitest"
declare " 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby" => "bundle exec appraisal minitest-5 rake spec:minitest"
end
Loading

0 comments on commit 4e07eb1

Please sign in to comment.