Skip to content
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
7 changes: 4 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 10
timeout-minutes: 15
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that 10min isn't enough on Windows based on the results on my fork: https://github.com/kou/csv/actions/runs/16061114221

steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
Expand All @@ -24,8 +24,9 @@ jobs:
- name: Install dependencies
run: |
bundle install
gem install csv -v 3.0.1
gem install csv -v 3.0.2
- name: Install old versions
run: |
rake benchmark:old_versions:install
- name: Benchmark
run: |
rake benchmark
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ source 'https://rubygems.org'
gemspec

group :development do
gem "benchmark_driver"
gem "bundler"
gem "psych"
gem "rake"
gem "rdoc"
gem "benchmark_driver"
gem "test-unit", ">= 3.4.8"
end
17 changes: 17 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require "rbconfig"
require "rdoc/task"
require "yaml"

require "bundler/gem_tasks"

Expand Down Expand Up @@ -62,6 +63,22 @@ namespace :benchmark do
end
end
end

namespace :old_versions do
desc "Install used old versions"
task :install do
old_versions = []
Dir.glob("benchmark/*.yaml") do |yaml|
YAML.load_file(yaml)["contexts"].each do |context|
old_version = (context["gems"] || {})["csv"]
old_versions << old_version if old_version
end
end
old_versions.uniq.sort.each do |old_version|
ruby("-S", "gem", "install", "csv", "-v", old_version)
end
end
end
end

desc "Run all benchmarks"
Expand Down
Loading