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


##########
.github/workflows/release_ruby.yml:
##########
@@ -167,83 +162,216 @@ 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 }}
+          # At least bundler 4.1.0 for skinny gem compilation support
+          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
+      - name: Upload native extension
+        uses: actions/upload-artifact@v7
+        with:
+          name: opendal-ruby-extension-${{ matrix.target.platform }}-${{ 
matrix.ruby-version }}
+          path: bindings/ruby/tmp/native/
+          if-no-files-found: error
+          # Keep intermediate extensions for 7 days for debugging.
+          retention-days: 7
+
+  package-native:
+    name: Package ${{ matrix.target.platform }}
+    # build-native compiles each Ruby ABI in its own job; assemble all three
+    # ABIs into platform gems here without recompiling the extensions.
+    needs: build-native
+    strategy:
+      fail-fast: false
+      matrix:
+        target:
+          - os: ubuntu-latest
+            platform: x86_64-linux
+          # GitHub has no ubuntu-latest-arm label; use the latest Ubuntu ARM 
runner.
+          - os: ubuntu-26.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 for packaging
         uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # 
v1.343.0
         with:
-          ruby-version: "3.4"
+          rubygems: "4.1.0"

Review Comment:
   Do we still need this when dev ruby version is 4.0?
   
   And could we document "implicitly use .tool-version"



-- 
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