From 659b880421ee9085f78b8f046ed94a23f1660ab3 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sat, 10 May 2025 17:03:28 +0900 Subject: [PATCH 1/4] Test Ruby bindings' extra options only when commanded --- bindings/ruby/tests/test_package.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bindings/ruby/tests/test_package.rb b/bindings/ruby/tests/test_package.rb index 3d556513e9e..eda42fc58c9 100644 --- a/bindings/ruby/tests/test_package.rb +++ b/bindings/ruby/tests/test_package.rb @@ -37,14 +37,9 @@ def assert_installed(dir, version) end def test_build_options - # This test is disabled as it currently fails when run locally on macOS and - # Linux. We need to find a good way to handle the situation with build - # options which varies between platforms. - # Refs: https://github.com/ggml-org/whisper.cpp/pull/3132 - omit "Temporarily disabled locally as this test currently fails when run locally" unless ENV["CI"] options = BuildOptions::Options.new assert_empty options.missing_options - unless ENV["CI"] + if ENV["TEST_EXTRA_OPTIONS"] assert_empty options.extra_options end end From e371991dea22bece465ff3e96bc38d7a37cdc517 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sat, 10 May 2025 17:09:18 +0900 Subject: [PATCH 2/4] ruby : test extra build options only when env var specified --- bindings/ruby/tests/test_package.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/ruby/tests/test_package.rb b/bindings/ruby/tests/test_package.rb index eda42fc58c9..00ab0a684a4 100644 --- a/bindings/ruby/tests/test_package.rb +++ b/bindings/ruby/tests/test_package.rb @@ -39,7 +39,7 @@ def assert_installed(dir, version) def test_build_options options = BuildOptions::Options.new assert_empty options.missing_options - if ENV["TEST_EXTRA_OPTIONS"] + if ENV["TEST_EXTRA_OPTIONS"] == "1" assert_empty options.extra_options end end From 16f60036fd8368927a4efd56c9d7a036d07337db Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Mon, 12 May 2025 01:52:22 +0900 Subject: [PATCH 3/4] Fix extra_options --- bindings/ruby/ext/options.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/ruby/ext/options.rb b/bindings/ruby/ext/options.rb index 29ff79090e2..17b2633eba5 100644 --- a/bindings/ruby/ext/options.rb +++ b/bindings/ruby/ext/options.rb @@ -53,7 +53,7 @@ def missing_options end def extra_options - @options.keys + @pending_options - @ignored_options - + @options.keys + @pending_options + @ignored_options - cmake_options.collect {|name, type, value| name} end From c7789c5d8ae527f8fbb498a70ec2b1af2ab08d70 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Mon, 12 May 2025 09:10:57 +0900 Subject: [PATCH 4/4] Update gem date --- bindings/ruby/whispercpp.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/ruby/whispercpp.gemspec b/bindings/ruby/whispercpp.gemspec index 9e9c424b913..44a0cb9c7ec 100644 --- a/bindings/ruby/whispercpp.gemspec +++ b/bindings/ruby/whispercpp.gemspec @@ -4,7 +4,7 @@ Gem::Specification.new do |s| s.name = "whispercpp" s.authors = ["Georgi Gerganov", "Todd A. Fisher"] s.version = '1.3.2' - s.date = '2025-05-01' + s.date = '2025-05-11' s.description = %q{High-performance inference of OpenAI's Whisper automatic speech recognition (ASR) model via Ruby} s.email = 'todd.fisher@gmail.com' s.extra_rdoc_files = ['LICENSE', 'README.md']