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

chaokunyang pushed a commit to tag v0.13.2-rc1
in repository https://gitbox.apache.org/repos/asf/fory.git

commit 32885855dc2564ff8ee612f0be2659946be60838
Author: Prakash Kumar Ramesh <[email protected]>
AuthorDate: Tue Nov 4 22:33:35 2025 -0500

    chore(CI): Fix cache with symlinks (#2893)
    
    <!--
    **Thanks for contributing to Apache Fory™.**
    
    **If this is your first time opening a PR on fory, you can refer to
    
[CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).**
    
    Contribution Checklist
    
    - The **Apache Fory™** community has requirements on the naming of pr
    titles. You can also find instructions in
    [CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).
    
    - Apache Fory™ has a strong focus on performance. If the PR you submit
    will have an impact on performance, please benchmark it first and
    provide the benchmark result here.
    -->
    
    ## Why?
    
    Bazel cache restoration was failing because symbolic links were being
    converted to regular files during cache save/restore operations.
    Added `enableCrossOsArchive: false` to all Bazel cache steps to preserve
    symlinks correctly.
    
    ---------
    
    Co-authored-by: Shawn Yang <[email protected]>
---
 .github/workflows/build-containerized-release.yml | 14 ----
 .github/workflows/build-native-pr.yml             | 20 ------
 .github/workflows/build-native-release.yml        | 20 ------
 .github/workflows/ci.yml                          | 86 +++++++----------------
 4 files changed, 25 insertions(+), 115 deletions(-)

diff --git a/.github/workflows/build-containerized-release.yml 
b/.github/workflows/build-containerized-release.yml
index 1b0cc0770..7f9a78b23 100644
--- a/.github/workflows/build-containerized-release.yml
+++ b/.github/workflows/build-containerized-release.yml
@@ -43,20 +43,6 @@ jobs:
             ~/bin/bazel
             ~/.local/bin/bazel
           key: bazel-binary-${{ runner.os }}-${{ runner.arch }}-${{ 
hashFiles('.bazelversion') }}
-          restore-keys: |
-            bazel-binary-${{ runner.os }}-${{ runner.arch }}-
-      - name: Cache Bazel repository cache
-        uses: actions/cache@v4
-        with:
-          path: ~/.cache/bazel/_bazel_*/*/external
-          key: bazel-repo-${{ runner.os }}-${{ runner.arch }}-py38-${{ 
hashFiles('WORKSPACE', '.bazelrc', 'bazel/**') }}
-          restore-keys: |
-            bazel-repo-${{ runner.os }}-${{ runner.arch }}-py38-
-      - name: Cache Bazel build outputs
-        uses: actions/cache@v4
-        with:
-          path: ~/.cache/bazel
-          key: bazel-build-release-${{ runner.os }}-${{ runner.arch }}-${{ 
hashFiles('cpp/**', 'python/**/*.pyx', 'python/**/*.pxd', 'BUILD', 'WORKSPACE') 
}}
       - name: Install bazel
         run: ./ci/run_ci.sh install_bazel
       - name: Build and test wheels
diff --git a/.github/workflows/build-native-pr.yml 
b/.github/workflows/build-native-pr.yml
index 11f5d308d..e7f4131a9 100644
--- a/.github/workflows/build-native-pr.yml
+++ b/.github/workflows/build-native-pr.yml
@@ -44,26 +44,6 @@ jobs:
             ~/.local/bin/bazel
             C:\bazel\bazel.exe
           key: bazel-binary-${{ runner.os }}-${{ runner.arch }}-${{ 
hashFiles('.bazelversion') }}
-          restore-keys: |
-            bazel-binary-${{ runner.os }}-${{ runner.arch }}-
-      - name: Cache Bazel repository cache
-        uses: actions/cache@v4
-        with:
-          path: |
-            ~/.cache/bazel/_bazel_*/*/external
-            ~/Library/Caches/bazel/_bazel_*/*/external
-            C:\users\runneradmin\_bazel_runneradmin\*/external
-          key: bazel-repo-${{ runner.os }}-${{ runner.arch }}-${{ 
matrix.python-version }}-${{ hashFiles('WORKSPACE', '.bazelrc', 'bazel/**') }}
-          restore-keys: |
-            bazel-repo-${{ runner.os }}-${{ runner.arch }}-${{ 
matrix.python-version }}-
-      - name: Cache Bazel build outputs
-        uses: actions/cache@v4
-        with:
-          path: |
-            ~/.cache/bazel
-            ~/Library/Caches/bazel
-            C:\users\runneradmin\_bazel_runneradmin
-          key: bazel-build-${{ runner.os }}-${{ runner.arch }}-${{ 
matrix.python-version }}-${{ hashFiles('cpp/**', 'python/**/*.pyx', 
'python/**/*.pxd', 'BUILD', 'WORKSPACE') }}
       - name: Install bazel
         if: runner.os != 'Windows'
         run: ./ci/run_ci.sh install_bazel
diff --git a/.github/workflows/build-native-release.yml 
b/.github/workflows/build-native-release.yml
index d5ba74d36..738ac53a4 100644
--- a/.github/workflows/build-native-release.yml
+++ b/.github/workflows/build-native-release.yml
@@ -45,26 +45,6 @@ jobs:
             ~/.local/bin/bazel
             C:\bazel\bazel.exe
           key: bazel-binary-${{ runner.os }}-${{ runner.arch }}-${{ 
hashFiles('.bazelversion') }}
-          restore-keys: |
-            bazel-binary-${{ runner.os }}-${{ runner.arch }}-
-      - name: Cache Bazel repository cache
-        uses: actions/cache@v4
-        with:
-          path: |
-            ~/.cache/bazel/_bazel_*/*/external
-            ~/Library/Caches/bazel/_bazel_*/*/external
-            C:\users\runneradmin\_bazel_runneradmin\*/external
-          key: bazel-repo-${{ runner.os }}-${{ runner.arch }}-${{ 
matrix.python-version }}-${{ hashFiles('WORKSPACE', '.bazelrc', 'bazel/**') }}
-          restore-keys: |
-            bazel-repo-${{ runner.os }}-${{ runner.arch }}-${{ 
matrix.python-version }}-
-      - name: Cache Bazel build outputs
-        uses: actions/cache@v4
-        with:
-          path: |
-            ~/.cache/bazel
-            ~/Library/Caches/bazel
-            C:\users\runneradmin\_bazel_runneradmin
-          key: bazel-build-release-native-${{ runner.os }}-${{ runner.arch 
}}-${{ matrix.python-version }}-${{ hashFiles('cpp/**', 'python/**/*.pyx', 
'python/**/*.pxd', 'BUILD', 'WORKSPACE') }}
       - name: Install bazel
         if: runner.os != 'Windows'
         run: ./ci/run_ci.sh install_bazel
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d7cece055..84bb4c378 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -72,21 +72,10 @@ jobs:
           path: |
             ~/bin/bazel
             ~/.local/bin/bazel
-          key: bazel-binary-${{ runner.os }}-${{ runner.arch }}-${{ 
hashFiles('.bazelversion') }}
-          restore-keys: |
-            bazel-binary-${{ runner.os }}-${{ runner.arch }}-
-      - name: Cache Bazel repository cache
-        uses: actions/cache@v4
-        with:
-          path: ~/.cache/bazel/_bazel_*/*/external
-          key: bazel-repo-${{ runner.os }}-${{ runner.arch }}-py38-${{ 
hashFiles('WORKSPACE', '.bazelrc', 'bazel/**') }}
+          key: bazel-binary-v2-${{ runner.os }}-${{ runner.arch }}-${{ 
hashFiles('.bazelversion') }}
           restore-keys: |
-            bazel-repo-${{ runner.os }}-${{ runner.arch }}-py38-
-      - name: Cache Bazel build outputs
-        uses: actions/cache@v4
-        with:
-          path: ~/.cache/bazel
-          key: bazel-build-java-${{ runner.os }}-${{ runner.arch }}-${{ 
matrix.java-version }}-${{ hashFiles('cpp/**', 'python/**/*.pyx', 
'python/**/*.pxd', 'BUILD', 'WORKSPACE') }}
+            bazel-binary-v2-${{ runner.os }}-${{ runner.arch }}-
+          enableCrossOsArchive: false
       - name: Install bazel
         run: python ./ci/run_ci.py cpp --install-deps-only
       - name: Install python dependencies
@@ -136,21 +125,10 @@ jobs:
           path: |
             ~/bin/bazel
             ~/.local/bin/bazel
-          key: bazel-binary-${{ runner.os }}-${{ runner.arch }}-${{ 
hashFiles('.bazelversion') }}
-          restore-keys: |
-            bazel-binary-${{ runner.os }}-${{ runner.arch }}-
-      - name: Cache Bazel repository cache
-        uses: actions/cache@v4
-        with:
-          path: ~/.cache/bazel/_bazel_*/*/external
-          key: bazel-repo-${{ runner.os }}-${{ runner.arch }}-py38-${{ 
hashFiles('WORKSPACE', '.bazelrc', 'bazel/**') }}
+          key: bazel-binary-v2-${{ runner.os }}-${{ runner.arch }}-${{ 
hashFiles('.bazelversion') }}
           restore-keys: |
-            bazel-repo-${{ runner.os }}-${{ runner.arch }}-py38-
-      - name: Cache Bazel build outputs
-        uses: actions/cache@v4
-        with:
-          path: ~/.cache/bazel
-          key: bazel-build-openj9-${{ runner.os }}-${{ runner.arch }}-${{ 
matrix.java-version }}-${{ hashFiles('cpp/**', 'python/**/*.pyx', 
'python/**/*.pxd', 'BUILD', 'WORKSPACE') }}
+            bazel-binary-v2-${{ runner.os }}-${{ runner.arch }}-
+          enableCrossOsArchive: false
       - name: Install bazel
         run: python ./ci/run_ci.py cpp --install-deps-only
       - name: Install pyfory for xlang tests
@@ -413,34 +391,25 @@ jobs:
         with:
           python-version: ${{ matrix.python-version }}
           cache: 'pip'
-      - name: Cache Bazel binary
+      - name: Cache Bazel binary (Unix)
+        if: runner.os != 'Windows'
         uses: actions/cache@v4
         with:
           path: |
             ~/bin/bazel
             ~/.local/bin/bazel
-            C:\bazel\bazel.exe
-          key: bazel-binary-${{ runner.os }}-${{ runner.arch }}-${{ 
hashFiles('.bazelversion') }}
+          key: bazel-binary-v2-${{ runner.os }}-${{ runner.arch }}-${{ 
hashFiles('.bazelversion') }}
           restore-keys: |
-            bazel-binary-${{ runner.os }}-${{ runner.arch }}-
-      - name: Cache Bazel repository cache
+            bazel-binary-v2-${{ runner.os }}-${{ runner.arch }}-
+          enableCrossOsArchive: false
+      - name: Cache Bazel binary (Windows)
+        if: runner.os == 'Windows'
         uses: actions/cache@v4
         with:
-          path: |
-            ~/.cache/bazel/_bazel_*/*/external
-            ~/Library/Caches/bazel/_bazel_*/*/external
-            C:\users\runneradmin\_bazel_runneradmin\*/external
-          key: bazel-repo-${{ runner.os }}-${{ runner.arch }}-${{ 
matrix.python-version }}-${{ hashFiles('WORKSPACE', '.bazelrc', 'bazel/**') }}
+          path: C:\bazel\bazel.exe
+          key: bazel-binary-v2-${{ runner.os }}-${{ runner.arch }}-${{ 
hashFiles('.bazelversion') }}
           restore-keys: |
-            bazel-repo-${{ runner.os }}-${{ runner.arch }}-${{ 
matrix.python-version }}-
-      - name: Cache Bazel build outputs
-        uses: actions/cache@v4
-        with:
-          path: |
-            ~/.cache/bazel
-            ~/Library/Caches/bazel
-            C:\users\runneradmin\_bazel_runneradmin
-          key: bazel-build-python-${{ runner.os }}-${{ runner.arch }}-${{ 
matrix.python-version }}-${{ hashFiles('cpp/**', 'python/**/*.pyx', 
'python/**/*.pxd', 'BUILD', 'WORKSPACE') }}
+            bazel-binary-v2-${{ runner.os }}-${{ runner.arch }}-
       - name: Install bazel (Unix)
         if: runner.os != 'Windows'
         shell: bash
@@ -449,6 +418,12 @@ jobs:
         if: runner.os == 'Windows'
         shell: bash
         run: ./ci/run_ci.sh install_bazel_windows
+      - name: Clean Bazel cache (Windows)
+        if: runner.os == 'Windows'
+        shell: bash
+        run: |
+          echo "Cleaning Bazel cache to ensure fresh build..."
+          bazel clean --expunge || true
       - name: Run Python CI
         shell: bash
         run: python ./ci/run_ci.py python
@@ -478,21 +453,10 @@ jobs:
           path: |
             ~/bin/bazel
             ~/.local/bin/bazel
-          key: bazel-binary-${{ runner.os }}-${{ runner.arch }}-${{ 
hashFiles('.bazelversion') }}
-          restore-keys: |
-            bazel-binary-${{ runner.os }}-${{ runner.arch }}-
-      - name: Cache Bazel repository cache
-        uses: actions/cache@v4
-        with:
-          path: ~/.cache/bazel/_bazel_*/*/external
-          key: bazel-repo-${{ runner.os }}-${{ runner.arch }}-py38-${{ 
hashFiles('WORKSPACE', '.bazelrc', 'bazel/**') }}
+          key: bazel-binary-v2-${{ runner.os }}-${{ runner.arch }}-${{ 
hashFiles('.bazelversion') }}
           restore-keys: |
-            bazel-repo-${{ runner.os }}-${{ runner.arch }}-py38-
-      - name: Cache Bazel build outputs
-        uses: actions/cache@v4
-        with:
-          path: ~/.cache/bazel
-          key: bazel-build-go-${{ runner.os }}-${{ runner.arch }}-${{ 
matrix.go-version }}-${{ hashFiles('cpp/**', 'python/**/*.pyx', 
'python/**/*.pxd', 'BUILD', 'WORKSPACE') }}
+            bazel-binary-v2-${{ runner.os }}-${{ runner.arch }}-
+          enableCrossOsArchive: false
       - name: Install bazel
         run: python ./ci/run_ci.py cpp --install-deps-only
       - name: Install python dependencies


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to