diff options
| author | Stan Lo <stan.lo@shopify.com> | 2025-09-12 18:55:37 +0100 |
|---|---|---|
| committer | Takashi Kokubun <takashikkbn@gmail.com> | 2025-10-07 17:11:37 -0700 |
| commit | 6c7aa118cc36f1d36ef38b54c887eda2e4d6cf2b (patch) | |
| tree | 2037d97f2701dffeba74fb6aa5f1e7194cba6863 | |
| parent | 42ba82424d908c290a4a34ced8853f0a403b734b (diff) | |
ZJIT: Test against bundled gems on CI
| -rw-r--r-- | .github/workflows/zjit-macos.yml | 3 | ||||
| -rw-r--r-- | .github/workflows/zjit-ubuntu.yml | 4 | ||||
| -rw-r--r-- | tool/test-bundled-gems.rb | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/.github/workflows/zjit-macos.yml b/.github/workflows/zjit-macos.yml index a638a3b1b3..0d2b564c41 100644 --- a/.github/workflows/zjit-macos.yml +++ b/.github/workflows/zjit-macos.yml @@ -101,9 +101,6 @@ jobs: - name: Run configure run: ../src/configure -C --disable-install-doc ${{ matrix.configure }} - - run: make prepare-gems - if: ${{ matrix.test_task == 'test-bundled-gems' }} - - run: make - name: Verify that --zjit-dump-disasm works diff --git a/.github/workflows/zjit-ubuntu.yml b/.github/workflows/zjit-ubuntu.yml index 99d5dbfded..a30ff1df88 100644 --- a/.github/workflows/zjit-ubuntu.yml +++ b/.github/workflows/zjit-ubuntu.yml @@ -72,6 +72,10 @@ jobs: configure: '--enable-zjit=dev --with-gcc=clang-14' libclang_path: '/usr/lib/llvm-14/lib/libclang.so.1' + - test_task: 'test-bundled-gems' + configure: '--enable-zjit=dev' + run_opts: '--zjit-call-threshold=1' + env: GITPULLOPTIONS: --no-tags origin ${{ github.ref }} RUN_OPTS: ${{ matrix.run_opts }} diff --git a/tool/test-bundled-gems.rb b/tool/test-bundled-gems.rb index 86bb747d94..006ebd981a 100644 --- a/tool/test-bundled-gems.rb +++ b/tool/test-bundled-gems.rb @@ -1,6 +1,7 @@ require 'rbconfig' require 'timeout' require 'fileutils' +require 'shellwords' require_relative 'lib/colorize' require_relative 'lib/gem_env' @@ -25,6 +26,7 @@ colorize = Colorize.new rake = File.realpath("../../.bundle/bin/rake", __FILE__) gem_dir = File.realpath('../../gems', __FILE__) rubylib = [gem_dir+'/lib', ENV["RUBYLIB"]].compact.join(File::PATH_SEPARATOR) +run_opts = ENV["RUN_OPTS"]&.shellsplit exit_code = 0 ruby = ENV['RUBY'] || RbConfig.ruby failed = [] @@ -33,7 +35,7 @@ File.foreach("#{gem_dir}/bundled_gems") do |line| next if bundled_gems&.none? {|pat| File.fnmatch?(pat, gem)} next unless File.directory?("#{gem_dir}/src/#{gem}/test") - test_command = [ruby, "-C", "#{gem_dir}/src/#{gem}", rake, "test"] + test_command = [ruby, *run_opts, "-C", "#{gem_dir}/src/#{gem}", rake, "test"] first_timeout = 600 # 10min toplib = gem @@ -71,7 +73,7 @@ File.foreach("#{gem_dir}/bundled_gems") do |line| load_path = true when "test-unit" - test_command = [ruby, "-C", "#{gem_dir}/src/#{gem}", "test/run.rb"] + test_command = [ruby, *run_opts, "-C", "#{gem_dir}/src/#{gem}", "test/run.rb"] when "csv" first_timeout = 30 |
