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

zhanglistar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 97aef7c156 [FLINK] Add ccache to speed up velox4j native compilation 
in CI (#12362)
97aef7c156 is described below

commit 97aef7c156087f5fb753e4f6551347f946005c5c
Author: zhanglistar <[email protected]>
AuthorDate: Thu Jun 25 14:03:12 2026 +0800

    [FLINK] Add ccache to speed up velox4j native compilation in CI (#12362)
    
    * [FLINK] Add ccache to speed up velox4j native compilation in CI
    
    * Update flink.yml
---
 .github/workflows/flink.yml | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/flink.yml b/.github/workflows/flink.yml
index cf607f5f30..9479947420 100644
--- a/.github/workflows/flink.yml
+++ b/.github/workflows/flink.yml
@@ -48,6 +48,7 @@ env:
     --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
     --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED
     --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED
+  CCACHE_DIR: "${{ github.workspace }}/.ccache"
 
 jobs:
   flink-test:
@@ -55,10 +56,21 @@ jobs:
     container: apache/gluten:centos-8-jdk17
     steps:
       - uses: actions/checkout@v4
+      - name: Restore ccache
+        uses: actions/cache/restore@v4
+        with:
+          path: '${{ env.CCACHE_DIR }}'
+          key: ccache-flink-centos8-${{github.sha}}
+          restore-keys: |
+            ccache-flink-centos8
       - name: Prepare
         run: |
           source /opt/rh/gcc-toolset-11/enable
-          sudo dnf install -y patchelf
+          sudo dnf install -y patchelf ccache
+          export CCACHE_DIR=${CCACHE_DIR}
+          export CCACHE_MAXSIZE=4G
+          mkdir -p ${CCACHE_DIR}
+          ccache -sz
           sudo yum install 
https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/Packages/tzdata-2026a-1.el9.noarch.rpm
 -y
           sudo .github/workflows/util/install-flink-deps.sh
           # Remove system fmt v11 from the CI image to avoid header conflicts 
with
@@ -74,9 +86,16 @@ jobs:
           git apply $GITHUB_WORKSPACE/gluten-flink/patches/fix-velox4j.patch
           $GITHUB_WORKSPACE/build/mvn clean install -DskipTests -Dgpg.skip 
-Dspotless.skip=true
           cd ..
+          ccache -s
           git clone https://github.com/nexmark/nexmark.git
           cd nexmark
           $GITHUB_WORKSPACE/build/mvn clean install -DskipTests
+      - name: Save ccache
+        if: always()
+        uses: actions/cache/save@v4
+        with:
+          path: '${{ env.CCACHE_DIR }}'
+          key: ccache-flink-centos8-${{github.sha}}
       - name: Build Gluten Flink
         run: |
           cd $GITHUB_WORKSPACE/gluten-flink


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

Reply via email to