This is an automated email from the ASF dual-hosted git repository.

erickguan pushed a commit to branch reduce-cache-usage
in repository https://gitbox.apache.org/repos/asf/opendal.git

commit 26b77cddc27cf3a179236de4e7ca22b15828c547
Author: Erick Guan <[email protected]>
AuthorDate: Sat May 30 10:58:06 2026 +0800

    Reduce concurrent workflows and less conflict in caching
---
 .github/workflows/ci_bindings_go.yml               |  1 +
 .github/workflows/ci_bindings_java.yml             |  6 ++++-
 .github/workflows/ci_bindings_python.yml           |  5 +++-
 .github/workflows/test_behavior.yml                | 24 +++++++++++++++++
 .github/workflows/test_behavior_binding_c.yml      |  4 +++
 .github/workflows/test_behavior_binding_cpp.yml    |  4 +++
 .github/workflows/test_behavior_binding_dotnet.yml |  5 ++++
 .github/workflows/test_behavior_binding_go.yml     | 16 +++++++++++
 .github/workflows/test_behavior_binding_java.yml   | 27 +++++++++++++++++++
 .github/workflows/test_behavior_binding_nodejs.yml | 26 ++++++++++++++++++
 .github/workflows/test_behavior_binding_python.yml | 31 +++++++++++++++++++++-
 .github/workflows/test_behavior_binding_ruby.yml   |  3 ++-
 12 files changed, 148 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ci_bindings_go.yml 
b/.github/workflows/ci_bindings_go.yml
index a5eadb866..11462c370 100644
--- a/.github/workflows/ci_bindings_go.yml
+++ b/.github/workflows/ci_bindings_go.yml
@@ -51,6 +51,7 @@ jobs:
       - uses: actions/setup-go@v6
         with:
           go-version-file: bindings/go/go.mod
+          cache-dependency-path: bindings/go/go.sum
       - uses: golangci/golangci-lint-action@v9
         with:
           version: "v2.1"
diff --git a/.github/workflows/ci_bindings_java.yml 
b/.github/workflows/ci_bindings_java.yml
index 09245c231..e4adb169c 100644
--- a/.github/workflows/ci_bindings_java.yml
+++ b/.github/workflows/ci_bindings_java.yml
@@ -35,7 +35,7 @@ on:
   workflow_dispatch:
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
+  group: test_binding_java-${{ github.ref }}-${{ github.event_name }}
   cancel-in-progress: true
 
 permissions:
@@ -58,6 +58,8 @@ jobs:
           distribution: zulu
           java-version: 25
           cache: 'maven'
+          cache-dependency-path: |
+            bindings/java/pom.xml
       - name: Build and check
         working-directory: bindings/java
         run: |
@@ -96,6 +98,8 @@ jobs:
           distribution: zulu
           java-version: ${{ matrix.java-version }}
           cache: 'maven'
+          cache-dependency-path: |
+            bindings/java/pom.xml
       - name: Build and test
         working-directory: bindings/java
         # `mvn install` and `mvn artifact:compare` are required to verify 
reproducible builds:
diff --git a/.github/workflows/ci_bindings_python.yml 
b/.github/workflows/ci_bindings_python.yml
index 4602cc152..2cb971bb6 100644
--- a/.github/workflows/ci_bindings_python.yml
+++ b/.github/workflows/ci_bindings_python.yml
@@ -31,7 +31,7 @@ on:
   workflow_dispatch:
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
+  group: test_binding_python-${{ github.ref }}-${{ github.event_name }}
   cancel-in-progress: true
 
 jobs:
@@ -45,6 +45,9 @@ jobs:
         uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # 
v7.6.0
         with:
           working-directory: "bindings/python"
+          cache-dependency-glob: |
+            bindings/python/pyproject.toml
+            bindings/python/uv.lock
       - uses: taiki-e/install-action@just
       - name: Run Lints
         working-directory: "bindings/python"
diff --git a/.github/workflows/test_behavior.yml 
b/.github/workflows/test_behavior.yml
index 2beafae43..105ee98a4 100644
--- a/.github/workflows/test_behavior.yml
+++ b/.github/workflows/test_behavior.yml
@@ -107,6 +107,9 @@ jobs:
       cases: ${{ toJson(matrix.cases) }}
 
   test_binding_java:
+    concurrency:
+      group: test_binding_java-${{ github.ref }}-${{ github.event_name }}
+      cancel-in-progress: true
     name: binding_java / ${{ matrix.os }}
     needs: [ plan ]
     if: fromJson(needs.plan.outputs.plan).components.binding_java
@@ -121,6 +124,9 @@ jobs:
       cases: ${{ toJson(matrix.cases) }}
 
   test_binding_python:
+    concurrency:
+      group: test_binding_python-${{ github.ref }}-${{ github.event_name }}
+      cancel-in-progress: true
     name: binding_python / ${{ matrix.os }}
     needs: [ plan ]
     if: fromJson(needs.plan.outputs.plan).components.binding_python
@@ -135,6 +141,9 @@ jobs:
       cases: ${{ toJson(matrix.cases) }}
   
   test_binding_ruby:
+    concurrency:
+      group: test_binding_ruby-${{ github.ref }}-${{ github.event_name }}
+      cancel-in-progress: true
     name: binding_ruby / ${{ matrix.os }}
     needs: [ plan ]
     if: fromJson(needs.plan.outputs.plan).components.binding_ruby
@@ -149,6 +158,9 @@ jobs:
       cases: ${{ toJson(matrix.cases) }}
 
   test_binding_nodejs:
+    concurrency:
+      group: test_binding_nodejs-${{ github.ref }}-${{ github.event_name }}
+      cancel-in-progress: true
     name: binding_nodejs / ${{ matrix.os }}
     needs: [ plan ]
     if: fromJson(needs.plan.outputs.plan).components.binding_nodejs
@@ -163,6 +175,9 @@ jobs:
       cases: ${{ toJson(matrix.cases) }}
 
   test_binding_go:
+    concurrency:
+      group: test_binding_go-${{ github.ref }}-${{ github.event_name }}
+      cancel-in-progress: true
     name: binding_go / ${{ matrix.os }}
     needs: [ plan ]
     if: fromJson(needs.plan.outputs.plan).components.binding_go
@@ -177,6 +192,9 @@ jobs:
       cases: ${{ toJson(matrix.cases) }}
 
   test_binding_c:
+    concurrency:
+      group: test_binding_c-${{ github.ref }}-${{ github.event_name }}
+      cancel-in-progress: true
     name: binding_c / ${{ matrix.os }}
     needs: [ plan ]
     if: fromJson(needs.plan.outputs.plan).components.binding_c
@@ -191,6 +209,9 @@ jobs:
       cases: ${{ toJson(matrix.cases) }}
 
   test_binding_cpp:
+    concurrency:
+      group: test_binding_cpp-${{ github.ref }}-${{ github.event_name }}
+      cancel-in-progress: true
     name: binding_cpp / ${{ matrix.os }}
     needs: [ plan ]
     if: fromJson(needs.plan.outputs.plan).components.binding_cpp
@@ -205,6 +226,9 @@ jobs:
       cases: ${{ toJson(matrix.cases) }}
 
   test_binding_dotnet:
+    concurrency:
+      group: test_binding_dotnet-${{ github.ref }}-${{ github.event_name }}
+      cancel-in-progress: true
     name: binding_dotnet / ${{ matrix.os }}
     needs: [ plan ]
     if: fromJson(needs.plan.outputs.plan).components.binding_dotnet
diff --git a/.github/workflows/test_behavior_binding_c.yml 
b/.github/workflows/test_behavior_binding_c.yml
index 0f9a744f5..6acfa5d3e 100644
--- a/.github/workflows/test_behavior_binding_c.yml
+++ b/.github/workflows/test_behavior_binding_c.yml
@@ -27,6 +27,10 @@ on:
         required: true
         type: string
 
+concurrency:
+  group: test_binding_c-${{ github.ref }}-${{ github.event_name }}
+  cancel-in-progress: true
+
 jobs:
   test:
     name: ${{ matrix.cases.service }} / ${{ matrix.cases.setup }}
diff --git a/.github/workflows/test_behavior_binding_cpp.yml 
b/.github/workflows/test_behavior_binding_cpp.yml
index 7162ba478..18495001c 100644
--- a/.github/workflows/test_behavior_binding_cpp.yml
+++ b/.github/workflows/test_behavior_binding_cpp.yml
@@ -27,6 +27,10 @@ on:
         required: true
         type: string
 
+concurrency:
+  group: test_binding_cpp-${{ github.ref }}-${{ github.event_name }}
+  cancel-in-progress: true
+
 jobs:
   test:
     name: ${{ matrix.cases.service }} / ${{ matrix.cases.setup }}
diff --git a/.github/workflows/test_behavior_binding_dotnet.yml 
b/.github/workflows/test_behavior_binding_dotnet.yml
index cffc36a71..b3f8579b7 100644
--- a/.github/workflows/test_behavior_binding_dotnet.yml
+++ b/.github/workflows/test_behavior_binding_dotnet.yml
@@ -27,6 +27,10 @@ on:
         required: true
         type: string
 
+concurrency:
+  group: test_binding_dotnet-${{ github.ref }}-${{ github.event_name }}
+  cancel-in-progress: true
+
 jobs:
   test:
     name: ${{ matrix.cases.service }} / ${{ matrix.cases.setup }}
@@ -41,6 +45,7 @@ jobs:
         uses: actions/setup-dotnet@v5
         with:
           dotnet-version: '10.0.x'
+          cache: false # no NuGet dependency
       - name: Setup Rust toolchain
         uses: ./.github/actions/setup
         with:
diff --git a/.github/workflows/test_behavior_binding_go.yml 
b/.github/workflows/test_behavior_binding_go.yml
index a1d7abc66..2742150dc 100644
--- a/.github/workflows/test_behavior_binding_go.yml
+++ b/.github/workflows/test_behavior_binding_go.yml
@@ -28,8 +28,23 @@ on:
         type: string
 
 jobs:
+  # Prevent parallel cache building in `test` job by building cache in a 
separate job
+  go-cache:
+    runs-on: ${{ inputs.os }}
+    steps:
+      - uses: actions/checkout@v6
+
+      - uses: actions/setup-go@v6
+        with:
+          go-version-file: bindings/go/go.mod
+          # params must be in sync with `test` job
+          cache-dependency-path: |
+            bindings/go/go.sum
+            bindings/go/tests/behavior_tests/go.sum
+
   test:
     name: ${{ matrix.cases.service }} / ${{ matrix.cases.setup }}
+    needs: go-cache
     runs-on: ${{ inputs.os }}
     strategy:
       fail-fast: false
@@ -61,6 +76,7 @@ jobs:
           echo "OP_CONNECT_TOKEN=${{ secrets.OP_CONNECT_TOKEN }}" >> 
"$GITHUB_ENV"
       - uses: actions/setup-go@v6
         with:
+          # params must be in sync with `go-cache` job
           go-version-file: bindings/go/go.mod
           cache-dependency-path: |
             bindings/go/go.sum
diff --git a/.github/workflows/test_behavior_binding_java.yml 
b/.github/workflows/test_behavior_binding_java.yml
index e935aceb6..90edb03b8 100644
--- a/.github/workflows/test_behavior_binding_java.yml
+++ b/.github/workflows/test_behavior_binding_java.yml
@@ -28,8 +28,32 @@ on:
         type: string
 
 jobs:
+  java-cache:
+    runs-on: ${{ inputs.os }}
+    steps:
+      - uses: actions/checkout@v6
+
+      - name: Setup Rust toolchain
+        uses: ./.github/actions/setup
+        with:
+          need-nextest: true
+          need-protoc: true
+          need-rocksdb: true
+          github-token: ${{ secrets.GITHUB_TOKEN }}
+
+      - name: Set up JDK 25
+        uses: actions/setup-java@v5
+        with:
+          # params must be in sync with `test` job
+          distribution: zulu
+          java-version: 25
+          cache: 'maven'
+          cache-dependency-path: |
+            bindings/java/pom.xml
+
   test:
     name: ${{ matrix.cases.service }} / ${{ matrix.cases.setup }}
+    needs: java-cache
     runs-on: ${{ inputs.os }}
     strategy:
       fail-fast: false
@@ -56,9 +80,12 @@ jobs:
       - name: Set up JDK 25
         uses: actions/setup-java@v5
         with:
+          # params must be in sync with `java-cache` job
           distribution: zulu
           java-version: 25
           cache: 'maven'
+          cache-dependency-path: |
+            bindings/java/pom.xml
 
       - name: Test Core
         uses: ./.github/actions/test_behavior_binding_java
diff --git a/.github/workflows/test_behavior_binding_nodejs.yml 
b/.github/workflows/test_behavior_binding_nodejs.yml
index 99ad89735..ee7edba57 100644
--- a/.github/workflows/test_behavior_binding_nodejs.yml
+++ b/.github/workflows/test_behavior_binding_nodejs.yml
@@ -28,8 +28,33 @@ on:
         type: string
 
 jobs:
+  # Prevent parallel cache building in `test` job by building cache in a 
separate job
+  node-cache:
+    runs-on: ${{ inputs.os }}
+
+    steps:
+      - uses: actions/checkout@v6
+
+      - uses: pnpm/action-setup@v4
+        with:
+          version: 8
+          run_install: false
+
+      - uses: actions/setup-node@v6
+        with:
+          # params must be in sync with `test` job
+          node-version: "20"
+          cache: pnpm
+          cache-dependency-path: "bindings/nodejs/pnpm-lock.yaml"
+      
+      - name: Install dependencies
+        working-directory: bindings/nodejs
+        run: pnpm install --frozen-lockfile
+
+
   test:
     name: ${{ matrix.cases.service }} / ${{ matrix.cases.setup }}
+    needs: node-cache
     runs-on: ${{ inputs.os }}
     strategy:
       fail-fast: false
@@ -60,6 +85,7 @@ jobs:
 
       - uses: actions/setup-node@v6
         with:
+          # params must be in sync with `node-cache` job
           node-version: "20"
           cache: pnpm
           cache-dependency-path: "bindings/nodejs/pnpm-lock.yaml"
diff --git a/.github/workflows/test_behavior_binding_python.yml 
b/.github/workflows/test_behavior_binding_python.yml
index 9f9a0c923..581f54e11 100644
--- a/.github/workflows/test_behavior_binding_python.yml
+++ b/.github/workflows/test_behavior_binding_python.yml
@@ -28,8 +28,32 @@ on:
         type: string
 
 jobs:
+  # Prevent parallel cache building in `test` job by building cache in a 
separate job
+  python-cache:
+    runs-on: ${{ inputs.os }}
+    steps:
+      - uses: actions/checkout@v6
+    
+      - name: Setup Rust toolchain
+        uses: ./.github/actions/setup
+        with:
+          need-nextest: true
+          need-protoc: true
+          need-rocksdb: true
+          github-token: ${{ secrets.GITHUB_TOKEN }}
+
+      - name: Setup uv
+        uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # 
v7.6.0
+        with:
+          # params must be in sync with `test` job
+          working-directory: bindings/python
+          cache-dependency-glob: |
+            bindings/python/pyproject.toml
+            bindings/python/uv.lock
+
   test:
     name: ${{ matrix.cases.service }} / ${{ matrix.cases.setup }}
+    needs: python-cache
     runs-on: ${{ inputs.os }}
     strategy:
       fail-fast: false
@@ -56,7 +80,12 @@ jobs:
       - name: Setup uv
         uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # 
v7.6.0
         with:
-          enable-cache: true
+          # params must be in sync with `python-cache` job
+          working-directory: bindings/python
+          cache-dependency-glob: |
+            bindings/python/pyproject.toml
+            bindings/python/uv.lock
+
       - name: Build with maturin
         shell: bash
         working-directory: "bindings/python"
diff --git a/.github/workflows/test_behavior_binding_ruby.yml 
b/.github/workflows/test_behavior_binding_ruby.yml
index 61e3bfa18..5fb39bd43 100644
--- a/.github/workflows/test_behavior_binding_ruby.yml
+++ b/.github/workflows/test_behavior_binding_ruby.yml
@@ -62,10 +62,11 @@ jobs:
 
       - name: Test base
         run: |
-          bundle exec rake test:base
+          bundle exec rake testbase
 
   test_service:
     name: ${{ matrix.cases.service }} / ${{ matrix.cases.setup }}
+    needs: test_base
     runs-on: ${{ inputs.os }}
     strategy:
       fail-fast: false

Reply via email to