erickguan commented on code in PR #8926:
URL: https://github.com/apache/opendal/pull/8926#discussion_r4682078443


##########
.github/workflows/release_ruby.yml:
##########
@@ -167,83 +162,123 @@ jobs:
         run: |
           rustup toolchain install stable --profile minimal
           rustup default stable
-          rustup target add ${{ matrix.rust_target }}
+          rustup target add ${{ matrix.target.rust_target }}
 
-      - name: Setup Ruby 3.3
-        id: ruby-3-3
+      - name: Setup Ruby
         uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
         with:
-          ruby-version: "3.3"
+          ruby-version: ${{ matrix.ruby-version }}
+          bundler: "4.1.0"
           bundler-cache: true
           working-directory: bindings/ruby
 
-      - name: Compile the Ruby 3.3 extension
+      - name: Compile the native extension
         run: bundle exec rake native:compile
 
-      - name: Setup Ruby 3.4
-        id: ruby-3-4
-        uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
+      - name: Upload native extension
+        uses: actions/upload-artifact@v7
         with:
-          ruby-version: "3.4"
-          bundler-cache: true
-          working-directory: bindings/ruby
+          name: opendal-ruby-extension-${{ matrix.target.platform }}-${{ 
matrix.ruby-version }}
+          path: bindings/ruby/tmp/native/
+          if-no-files-found: error
+          retention-days: 30

Review Comment:
   7 is more than enough since this is temp build and gems are exactly archived 
during packing.
   
   Add a comment: keep 7 days for debugging purpose.



##########
.github/workflows/release_ruby.yml:
##########
@@ -167,83 +162,123 @@ jobs:
         run: |
           rustup toolchain install stable --profile minimal
           rustup default stable
-          rustup target add ${{ matrix.rust_target }}
+          rustup target add ${{ matrix.target.rust_target }}
 
-      - name: Setup Ruby 3.3
-        id: ruby-3-3
+      - name: Setup Ruby
         uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
         with:
-          ruby-version: "3.3"
+          ruby-version: ${{ matrix.ruby-version }}
+          bundler: "4.1.0"
           bundler-cache: true
           working-directory: bindings/ruby
 
-      - name: Compile the Ruby 3.3 extension
+      - name: Compile the native extension
         run: bundle exec rake native:compile
 
-      - name: Setup Ruby 3.4
-        id: ruby-3-4
-        uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
+      - name: Upload native extension
+        uses: actions/upload-artifact@v7
         with:
-          ruby-version: "3.4"
-          bundler-cache: true
-          working-directory: bindings/ruby
+          name: opendal-ruby-extension-${{ matrix.target.platform }}-${{ 
matrix.ruby-version }}
+          path: bindings/ruby/tmp/native/
+          if-no-files-found: error
+          retention-days: 30
 
-      - name: Compile the Ruby 3.4 extension
-        run: bundle exec rake native:compile
+  package-native:
+    name: Package ${{ matrix.target.platform }}
+    needs: build-native
+    strategy:
+      fail-fast: false
+      matrix:
+        target:
+          - os: ubuntu-24.04
+            platform: x86_64-linux
+          - os: ubuntu-24.04-arm

Review Comment:
   ubuntu-latest-arm?



##########
.github/workflows/release_ruby.yml:
##########
@@ -167,83 +162,123 @@ jobs:
         run: |
           rustup toolchain install stable --profile minimal
           rustup default stable
-          rustup target add ${{ matrix.rust_target }}
+          rustup target add ${{ matrix.target.rust_target }}
 
-      - name: Setup Ruby 3.3
-        id: ruby-3-3
+      - name: Setup Ruby
         uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
         with:
-          ruby-version: "3.3"
+          ruby-version: ${{ matrix.ruby-version }}
+          bundler: "4.1.0"
           bundler-cache: true
           working-directory: bindings/ruby
 
-      - name: Compile the Ruby 3.3 extension
+      - name: Compile the native extension
         run: bundle exec rake native:compile
 
-      - name: Setup Ruby 3.4
-        id: ruby-3-4
-        uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
+      - name: Upload native extension
+        uses: actions/upload-artifact@v7
         with:
-          ruby-version: "3.4"
-          bundler-cache: true
-          working-directory: bindings/ruby
+          name: opendal-ruby-extension-${{ matrix.target.platform }}-${{ 
matrix.ruby-version }}
+          path: bindings/ruby/tmp/native/
+          if-no-files-found: error
+          retention-days: 30
 
-      - name: Compile the Ruby 3.4 extension
-        run: bundle exec rake native:compile
+  package-native:
+    name: Package ${{ matrix.target.platform }}
+    needs: build-native
+    strategy:
+      fail-fast: false
+      matrix:
+        target:
+          - os: ubuntu-24.04
+            platform: x86_64-linux
+          - os: ubuntu-24.04-arm
+            platform: aarch64-linux
+          - os: macos-latest
+            platform: arm64-darwin
+
+    runs-on: ${{ matrix.target.os }}
+
+    env:
+      OPENDAL_RUBY_PLATFORM: ${{ matrix.target.platform }}
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v7
 
-      - name: Setup Ruby 4.0
-        id: ruby-4-0
+      - name: Setup Ruby for packaging
         uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
         with:
-          ruby-version: "4.0"
+          rubygems: "4.1.0"
+          bundler: "4.1.0"
           bundler-cache: true
           working-directory: bindings/ruby
 
-      - name: Compile the Ruby 4.0 extension and package the native gem
-        run: bundle exec rake native:compile native:opendal
-
-      - name: Smoke test the native gem on each Ruby version
-        env:
-          RUBY_33: ${{ steps.ruby-3-3.outputs.ruby-prefix }}
-          RUBY_34: ${{ steps.ruby-3-4.outputs.ruby-prefix }}
-          RUBY_40: ${{ steps.ruby-4-0.outputs.ruby-prefix }}
-        run: |
-          for prefix in "$RUBY_33" "$RUBY_34" "$RUBY_40"; do
-            "$prefix/bin/ruby" "$prefix/bin/gem" install --local 
pkg/opendal-*.gem --no-document
-            "$prefix/bin/ruby" -ropendal -rtmpdir <<'RUBY'
-          Dir.mktmpdir do |root|
-            op = OpenDal::Operator.new("fs", {"root" => root})
-            op.write("hello.txt", "hello")
-            raise "bad read on Ruby #{RUBY_VERSION}" unless 
op.read("hello.txt") == "hello"
-            expected = Time.utc(2024, 1, 2, 3, 4, 5, 125_000)
-            File.utime(expected, expected, File.join(root, "hello.txt"))
-            raise "bad last_modified on Ruby #{RUBY_VERSION}" unless 
op.stat("hello.txt").last_modified == expected
-          end
-          RUBY
-          done
-
-      - name: Collect built gem
-        run: |
-          echo "Built gem file:"
-          ls -la pkg/
-          echo ""
+      - name: Download native extensions
+        uses: actions/download-artifact@v8
+        with:
+          pattern: opendal-ruby-extension-${{ matrix.target.platform }}-*
+          path: bindings/ruby/tmp/native/
+          merge-multiple: true
 
-          mkdir -p pkg_out
-          cp -r pkg/*.gem pkg_out/
+      - name: Package and verify the native gems
+        run: bundle exec rake native:opendal test:package
 
-      - name: Upload gem artifact
+      - name: Upload native gems
         uses: actions/upload-artifact@v7
         with:
-          name: opendal-ruby-gem-${{ matrix.platform }}
-          path: bindings/ruby/pkg_out/*.gem
+          name: opendal-ruby-gem-${{ matrix.target.platform }}
+          path: bindings/ruby/pkg/*.gem
+          if-no-files-found: error
           retention-days: 30
 
+  smoke-test-native:
+    name: Smoke test ${{ matrix.target.platform }} / Ruby ${{ 
matrix.ruby-version }} / ${{ matrix.format }}
+    needs: package-native
+    strategy:
+      fail-fast: false
+      matrix:
+        ruby-version: ["3.3", "3.4", "4.0"]
+        format: [conventional, content-addressable]
+        target:
+          - os: ubuntu-24.04
+            platform: x86_64-linux
+          - os: ubuntu-24.04-arm
+            platform: aarch64-linux
+          - os: macos-latest
+            platform: arm64-darwin

Review Comment:
   can include ubuntu-24.04 and ubuntu-22.04 with ruby 3.3 for compatibility 
checks



##########
.github/workflows/release_ruby.yml:
##########
@@ -167,83 +162,123 @@ jobs:
         run: |
           rustup toolchain install stable --profile minimal
           rustup default stable
-          rustup target add ${{ matrix.rust_target }}
+          rustup target add ${{ matrix.target.rust_target }}
 
-      - name: Setup Ruby 3.3
-        id: ruby-3-3
+      - name: Setup Ruby
         uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
         with:
-          ruby-version: "3.3"
+          ruby-version: ${{ matrix.ruby-version }}
+          bundler: "4.1.0"
           bundler-cache: true
           working-directory: bindings/ruby
 
-      - name: Compile the Ruby 3.3 extension
+      - name: Compile the native extension
         run: bundle exec rake native:compile
 
-      - name: Setup Ruby 3.4
-        id: ruby-3-4
-        uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
+      - name: Upload native extension
+        uses: actions/upload-artifact@v7
         with:
-          ruby-version: "3.4"
-          bundler-cache: true
-          working-directory: bindings/ruby
+          name: opendal-ruby-extension-${{ matrix.target.platform }}-${{ 
matrix.ruby-version }}
+          path: bindings/ruby/tmp/native/
+          if-no-files-found: error
+          retention-days: 30
 
-      - name: Compile the Ruby 3.4 extension
-        run: bundle exec rake native:compile
+  package-native:
+    name: Package ${{ matrix.target.platform }}
+    needs: build-native
+    strategy:
+      fail-fast: false
+      matrix:
+        target:
+          - os: ubuntu-24.04
+            platform: x86_64-linux
+          - os: ubuntu-24.04-arm
+            platform: aarch64-linux
+          - os: macos-latest
+            platform: arm64-darwin
+
+    runs-on: ${{ matrix.target.os }}
+
+    env:
+      OPENDAL_RUBY_PLATFORM: ${{ matrix.target.platform }}
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v7
 
-      - name: Setup Ruby 4.0
-        id: ruby-4-0
+      - name: Setup Ruby for packaging
         uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
         with:
-          ruby-version: "4.0"
+          rubygems: "4.1.0"
+          bundler: "4.1.0"
           bundler-cache: true
           working-directory: bindings/ruby
 
-      - name: Compile the Ruby 4.0 extension and package the native gem
-        run: bundle exec rake native:compile native:opendal
-
-      - name: Smoke test the native gem on each Ruby version
-        env:
-          RUBY_33: ${{ steps.ruby-3-3.outputs.ruby-prefix }}
-          RUBY_34: ${{ steps.ruby-3-4.outputs.ruby-prefix }}
-          RUBY_40: ${{ steps.ruby-4-0.outputs.ruby-prefix }}
-        run: |
-          for prefix in "$RUBY_33" "$RUBY_34" "$RUBY_40"; do
-            "$prefix/bin/ruby" "$prefix/bin/gem" install --local 
pkg/opendal-*.gem --no-document
-            "$prefix/bin/ruby" -ropendal -rtmpdir <<'RUBY'
-          Dir.mktmpdir do |root|
-            op = OpenDal::Operator.new("fs", {"root" => root})
-            op.write("hello.txt", "hello")
-            raise "bad read on Ruby #{RUBY_VERSION}" unless 
op.read("hello.txt") == "hello"
-            expected = Time.utc(2024, 1, 2, 3, 4, 5, 125_000)
-            File.utime(expected, expected, File.join(root, "hello.txt"))
-            raise "bad last_modified on Ruby #{RUBY_VERSION}" unless 
op.stat("hello.txt").last_modified == expected
-          end
-          RUBY
-          done
-
-      - name: Collect built gem
-        run: |
-          echo "Built gem file:"
-          ls -la pkg/
-          echo ""
+      - name: Download native extensions
+        uses: actions/download-artifact@v8
+        with:
+          pattern: opendal-ruby-extension-${{ matrix.target.platform }}-*
+          path: bindings/ruby/tmp/native/
+          merge-multiple: true
 
-          mkdir -p pkg_out
-          cp -r pkg/*.gem pkg_out/
+      - name: Package and verify the native gems
+        run: bundle exec rake native:opendal test:package
 
-      - name: Upload gem artifact
+      - name: Upload native gems
         uses: actions/upload-artifact@v7
         with:
-          name: opendal-ruby-gem-${{ matrix.platform }}
-          path: bindings/ruby/pkg_out/*.gem
+          name: opendal-ruby-gem-${{ matrix.target.platform }}
+          path: bindings/ruby/pkg/*.gem
+          if-no-files-found: error
           retention-days: 30
 
+  smoke-test-native:
+    name: Smoke test ${{ matrix.target.platform }} / Ruby ${{ 
matrix.ruby-version }} / ${{ matrix.format }}
+    needs: package-native
+    strategy:
+      fail-fast: false
+      matrix:
+        ruby-version: ["3.3", "3.4", "4.0"]
+        format: [conventional, content-addressable]
+        target:
+          - os: ubuntu-24.04
+            platform: x86_64-linux
+          - os: ubuntu-24.04-arm
+            platform: aarch64-linux
+          - os: macos-latest
+            platform: arm64-darwin
+
+    runs-on: ${{ matrix.target.os }}
+
+    env:
+      OPENDAL_RUBY_PLATFORM: ${{ matrix.target.platform }}
+      OPENDAL_RUBY_GEM_FORMAT: ${{ matrix.format }}
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v7
+
+      - name: Setup Ruby for installation
+        uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
+        with:
+          ruby-version: ${{ matrix.ruby-version }}
+          rubygems: "4.1.0"

Review Comment:
   why aren't we using bundler cache?



##########
.github/workflows/release_ruby.yml:
##########
@@ -167,83 +162,123 @@ jobs:
         run: |
           rustup toolchain install stable --profile minimal
           rustup default stable
-          rustup target add ${{ matrix.rust_target }}
+          rustup target add ${{ matrix.target.rust_target }}
 
-      - name: Setup Ruby 3.3
-        id: ruby-3-3
+      - name: Setup Ruby
         uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
         with:
-          ruby-version: "3.3"
+          ruby-version: ${{ matrix.ruby-version }}
+          bundler: "4.1.0"
           bundler-cache: true
           working-directory: bindings/ruby
 
-      - name: Compile the Ruby 3.3 extension
+      - name: Compile the native extension
         run: bundle exec rake native:compile
 
-      - name: Setup Ruby 3.4
-        id: ruby-3-4
-        uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
+      - name: Upload native extension
+        uses: actions/upload-artifact@v7
         with:
-          ruby-version: "3.4"
-          bundler-cache: true
-          working-directory: bindings/ruby
+          name: opendal-ruby-extension-${{ matrix.target.platform }}-${{ 
matrix.ruby-version }}
+          path: bindings/ruby/tmp/native/
+          if-no-files-found: error
+          retention-days: 30
 
-      - name: Compile the Ruby 3.4 extension
-        run: bundle exec rake native:compile
+  package-native:

Review Comment:
   This step seems redundant to build native step?



##########
bindings/ruby/test/package/smoke.rb:
##########
@@ -0,0 +1,86 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# frozen_string_literal: true
+
+require "rbconfig"
+require "rubygems/package"
+require "tmpdir"
+
+ruby_abi = RUBY_VERSION.split(".").first(2).join(".")
+gem_format = ENV.fetch("OPENDAL_RUBY_GEM_FORMAT")
+requirement = case gem_format
+when "conventional"
+  Gem::Requirement.new(">= 3.3", "< 4.1.dev")
+when "content-addressable"
+  Gem::Requirement.new("~> #{ruby_abi}.0")
+else
+  abort "Unknown native gem format: #{gem_format}"
+end
+platform = Gem::Platform.new(ENV.fetch("OPENDAL_RUBY_PLATFORM", 
Gem::Platform.local.to_s))
+binding_directory = File.expand_path("../..", __dir__)
+source_spec = Gem::Specification.load(File.join(binding_directory, 
"opendal.gemspec"))
+gem_files = Dir.glob(File.join(binding_directory, "pkg", 
"#{source_spec.name}-#{source_spec.version}-*.gem")).select do |path|
+  spec = Gem::Package.new(path).spec
+  spec.platform == platform && spec.required_ruby_version == requirement
+end
+abort "Expected one #{gem_format} gem for #{platform} / Ruby #{ruby_abi}, 
found #{gem_files.size}" unless gem_files.one?
+
+Dir.mktmpdir("opendal-gem-smoke-") do |gem_home|

Review Comment:
   Probably smoke script if long can be a script; For other parts, is shell or 
some ruby in YAML is easier?



##########
.github/workflows/release_ruby.yml:
##########
@@ -167,83 +162,123 @@ jobs:
         run: |
           rustup toolchain install stable --profile minimal
           rustup default stable
-          rustup target add ${{ matrix.rust_target }}
+          rustup target add ${{ matrix.target.rust_target }}
 
-      - name: Setup Ruby 3.3
-        id: ruby-3-3
+      - name: Setup Ruby
         uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
         with:
-          ruby-version: "3.3"
+          ruby-version: ${{ matrix.ruby-version }}
+          bundler: "4.1.0"
           bundler-cache: true
           working-directory: bindings/ruby
 
-      - name: Compile the Ruby 3.3 extension
+      - name: Compile the native extension
         run: bundle exec rake native:compile
 
-      - name: Setup Ruby 3.4
-        id: ruby-3-4
-        uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
+      - name: Upload native extension
+        uses: actions/upload-artifact@v7
         with:
-          ruby-version: "3.4"
-          bundler-cache: true
-          working-directory: bindings/ruby
+          name: opendal-ruby-extension-${{ matrix.target.platform }}-${{ 
matrix.ruby-version }}
+          path: bindings/ruby/tmp/native/
+          if-no-files-found: error
+          retention-days: 30
 
-      - name: Compile the Ruby 3.4 extension
-        run: bundle exec rake native:compile
+  package-native:
+    name: Package ${{ matrix.target.platform }}
+    needs: build-native
+    strategy:
+      fail-fast: false
+      matrix:
+        target:
+          - os: ubuntu-24.04
+            platform: x86_64-linux
+          - os: ubuntu-24.04-arm
+            platform: aarch64-linux
+          - os: macos-latest
+            platform: arm64-darwin
+
+    runs-on: ${{ matrix.target.os }}
+
+    env:
+      OPENDAL_RUBY_PLATFORM: ${{ matrix.target.platform }}
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v7
 
-      - name: Setup Ruby 4.0
-        id: ruby-4-0
+      - name: Setup Ruby for packaging
         uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
         with:
-          ruby-version: "4.0"
+          rubygems: "4.1.0"
+          bundler: "4.1.0"
           bundler-cache: true
           working-directory: bindings/ruby
 
-      - name: Compile the Ruby 4.0 extension and package the native gem
-        run: bundle exec rake native:compile native:opendal
-
-      - name: Smoke test the native gem on each Ruby version
-        env:
-          RUBY_33: ${{ steps.ruby-3-3.outputs.ruby-prefix }}
-          RUBY_34: ${{ steps.ruby-3-4.outputs.ruby-prefix }}
-          RUBY_40: ${{ steps.ruby-4-0.outputs.ruby-prefix }}
-        run: |
-          for prefix in "$RUBY_33" "$RUBY_34" "$RUBY_40"; do
-            "$prefix/bin/ruby" "$prefix/bin/gem" install --local 
pkg/opendal-*.gem --no-document
-            "$prefix/bin/ruby" -ropendal -rtmpdir <<'RUBY'
-          Dir.mktmpdir do |root|
-            op = OpenDal::Operator.new("fs", {"root" => root})
-            op.write("hello.txt", "hello")
-            raise "bad read on Ruby #{RUBY_VERSION}" unless 
op.read("hello.txt") == "hello"
-            expected = Time.utc(2024, 1, 2, 3, 4, 5, 125_000)
-            File.utime(expected, expected, File.join(root, "hello.txt"))
-            raise "bad last_modified on Ruby #{RUBY_VERSION}" unless 
op.stat("hello.txt").last_modified == expected
-          end
-          RUBY
-          done
-
-      - name: Collect built gem
-        run: |
-          echo "Built gem file:"
-          ls -la pkg/
-          echo ""
+      - name: Download native extensions
+        uses: actions/download-artifact@v8
+        with:
+          pattern: opendal-ruby-extension-${{ matrix.target.platform }}-*
+          path: bindings/ruby/tmp/native/
+          merge-multiple: true
 
-          mkdir -p pkg_out
-          cp -r pkg/*.gem pkg_out/
+      - name: Package and verify the native gems
+        run: bundle exec rake native:opendal test:package
 
-      - name: Upload gem artifact
+      - name: Upload native gems
         uses: actions/upload-artifact@v7
         with:
-          name: opendal-ruby-gem-${{ matrix.platform }}
-          path: bindings/ruby/pkg_out/*.gem
+          name: opendal-ruby-gem-${{ matrix.target.platform }}
+          path: bindings/ruby/pkg/*.gem
+          if-no-files-found: error
           retention-days: 30
 
+  smoke-test-native:
+    name: Smoke test ${{ matrix.target.platform }} / Ruby ${{ 
matrix.ruby-version }} / ${{ matrix.format }}
+    needs: package-native
+    strategy:
+      fail-fast: false
+      matrix:
+        ruby-version: ["3.3", "3.4", "4.0"]
+        format: [conventional, content-addressable]
+        target:
+          - os: ubuntu-24.04

Review Comment:
   ```suggestion
             - os: ubuntu-latest
   ```
   
   Same for arm



##########
.github/workflows/release_ruby.yml:
##########
@@ -167,83 +162,123 @@ jobs:
         run: |
           rustup toolchain install stable --profile minimal
           rustup default stable
-          rustup target add ${{ matrix.rust_target }}
+          rustup target add ${{ matrix.target.rust_target }}
 
-      - name: Setup Ruby 3.3
-        id: ruby-3-3
+      - name: Setup Ruby
         uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
         with:
-          ruby-version: "3.3"
+          ruby-version: ${{ matrix.ruby-version }}
+          bundler: "4.1.0"
           bundler-cache: true
           working-directory: bindings/ruby
 
-      - name: Compile the Ruby 3.3 extension
+      - name: Compile the native extension
         run: bundle exec rake native:compile
 
-      - name: Setup Ruby 3.4
-        id: ruby-3-4
-        uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
+      - name: Upload native extension
+        uses: actions/upload-artifact@v7
         with:
-          ruby-version: "3.4"
-          bundler-cache: true
-          working-directory: bindings/ruby
+          name: opendal-ruby-extension-${{ matrix.target.platform }}-${{ 
matrix.ruby-version }}
+          path: bindings/ruby/tmp/native/
+          if-no-files-found: error
+          retention-days: 30
 
-      - name: Compile the Ruby 3.4 extension
-        run: bundle exec rake native:compile
+  package-native:
+    name: Package ${{ matrix.target.platform }}
+    needs: build-native
+    strategy:
+      fail-fast: false
+      matrix:
+        target:
+          - os: ubuntu-24.04

Review Comment:
   ubuntu-latest?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to