diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 897d5d9317..499cfdf89d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -650,10 +650,17 @@ jobs: lib-ruby: needs: compiler runs-on: ubuntu-24.04 + name: lib-ruby (${{ matrix.ruby-version }}) ${{ matrix.skip-build-ext && 'noext' || '' }} strategy: matrix: ruby-version: ["2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "4.0", "head"] + skip-build-ext: [false] + include: + - ruby-version: "2.7" + skip-build-ext: true fail-fast: false + env: + SKIP_BUILD_EXT: ${{ matrix.skip-build-ext && '1' || '' }} steps: - uses: actions/checkout@v5 diff --git a/lib/rb/Rakefile b/lib/rb/Rakefile index c6b650eae2..35819d8edb 100644 --- a/lib/rb/Rakefile +++ b/lib/rb/Rakefile @@ -62,7 +62,7 @@ namespace :'gen-rb' do dir = File.dirname(__FILE__) + '/benchmark' sh THRIFT, '--gen', 'rb', '-o', dir, "#{dir}/Benchmark.thrift" end - + task :'debug_proto' do sh "mkdir", "-p", "test/debug_proto" sh THRIFT, '--gen', 'rb', "-o", "test/debug_proto", "../../test/v0.16/DebugProtoTest.thrift" @@ -72,6 +72,7 @@ end desc "Build the native library" task :build_ext => :'gen-rb' do next if defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /jruby/ + next if ENV['SKIP_BUILD_EXT'] == '1' Dir::chdir(File::dirname('ext/extconf.rb')) do unless sh "ruby #{File::basename('ext/extconf.rb')}" $stderr.puts "Failed to run extconf" @@ -115,6 +116,6 @@ end CLEAN.include [ '.bundle', 'benchmark/gen-rb', 'coverage', 'ext/*.{o,bundle,so,dll}', 'ext/mkmf.log', - 'ext/Makefile', 'ext/conftest.dSYM', 'Gemfile.lock', 'mkmf.log', 'pkg', 'spec/gen-rb', - 'test', 'thrift-*.gem' + 'ext/Makefile', 'ext/conftest.dSYM', 'ext/thrift_native.bundle.dSYM', 'mkmf.log', + 'pkg', 'spec/gen-rb', 'test/debug_proto/gen-rb', 'thrift-*.gem' ]