Skip to content

Commit 19917c6

Browse files
Run Ractor tests in CI
Also make sure that the benchmarks list test is up to date
1 parent b295277 commit 19917c6

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,22 @@ jobs:
3737
MIN_BENCH_TIME: '0'
3838
continue-on-error: ${{ matrix.continue-on-error || false }}
3939

40+
- name: Test run_benchmarks.rb - Ractors
41+
run: ./run_benchmarks.rb --category=ractor
42+
env:
43+
WARMUP_ITRS: '1'
44+
MIN_BENCH_ITRS: '1'
45+
MIN_BENCH_TIME: '0'
46+
continue-on-error: ${{ matrix.continue-on-error || false }}
47+
48+
- name: Test run_benchmarks.rb - Ractor Only
49+
run: ./run_benchmarks.rb --category=ractor-only
50+
env:
51+
WARMUP_ITRS: '1'
52+
MIN_BENCH_ITRS: '1'
53+
MIN_BENCH_TIME: '0'
54+
continue-on-error: ${{ matrix.continue-on-error || false }}
55+
4056
- name: Test run_benchmarks.rb --graph
4157
run: |
4258
sudo apt-get update

test/benchmarks_test.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22
require 'yaml'
33

44
describe 'benchmarks.yml' do
5-
it 'has the same entries as /benchmarks' do
5+
it 'lists all available benchmarks' do
66
yjit_bench = File.expand_path('..', __dir__)
77
benchmarks_yml = YAML.load_file("#{yjit_bench}/benchmarks.yml")
8+
89
benchmarks = Dir.glob("#{yjit_bench}/benchmarks/*").map do |entry|
910
File.basename(entry).delete_suffix('.rb')
10-
end
11-
assert_equal benchmarks.sort, benchmarks_yml.keys.sort
11+
end.compact
12+
13+
benchmarks += Dir.glob("#{yjit_bench}/benchmarks-ractor/*").map do |entry|
14+
File.basename(entry).delete_suffix('.rb')
15+
end.compact
16+
17+
assert_equal benchmarks.sort, benchmarks_yml.keys.map{ |k| k.gsub('ractor/', '') }.sort
1218
end
1319
end

0 commit comments

Comments
 (0)