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

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


The following commit(s) were added to refs/heads/main by this push:
     new cae9bba20 [VL] CI: Update dependency cache only when main branch is 
updated (#5234)
cae9bba20 is described below

commit cae9bba20127852f0fc5fd2d4bf1a17170e7abde
Author: Hongze Zhang <[email protected]>
AuthorDate: Wed Apr 3 10:17:51 2024 +0800

    [VL] CI: Update dependency cache only when main branch is updated (#5234)
---
 .github/workflows/velox_docker.yml       | 17 +++---------
 .github/workflows/velox_docker_cache.yml | 44 ++++++++++++++++++++++++++++++++
 dev/ci-velox-buildstatic.sh              |  9 +++++++
 3 files changed, 57 insertions(+), 13 deletions(-)

diff --git a/.github/workflows/velox_docker.yml 
b/.github/workflows/velox_docker.yml
index 597fca081..793abf78e 100644
--- a/.github/workflows/velox_docker.yml
+++ b/.github/workflows/velox_docker.yml
@@ -52,26 +52,17 @@ jobs:
       - uses: actions/checkout@v2
       - name: Generate cache key
         run: |
-          echo ${{ hashFiles('./ep/build-velox/src/**', './dev/**', './cpp/*') 
}} > cache-key
+          echo ${{ hashFiles('./ep/build-velox/src/**', './dev/**', './cpp/*', 
'./github/workflows/*') }} > cache-key
       - name: Cache
         id: cache
-        uses: actions/cache@v3
+        uses: actions/cache/restore@v3
         with:
           path: ./cpp/build/releases/
           key: cache-velox-build-${{ hashFiles('./cache-key') }}
-      - name: Build Gluten velox third party
+      - name: Build Gluten Velox third party
         if: ${{ steps.cache.outputs.cache-hit != 'true' }}
         run: |
-          yum install sudo patch java-1.8.0-openjdk-devel -y && \
-          cd $GITHUB_WORKSPACE/ep/build-velox/src && \
-          ./get_velox.sh && \
-          source /opt/rh/devtoolset-9/enable && \
-          source $GITHUB_WORKSPACE//dev/vcpkg/env.sh && \
-          cd $GITHUB_WORKSPACE/ && \
-          sed -i '/^headers/d' ep/build-velox/build/velox_ep/CMakeLists.txt && 
\
-          export NUM_THREADS=4
-          ./dev/builddeps-veloxbe.sh --build_tests=OFF --build_benchmarks=OFF 
--enable_s3=ON \
-          --enable_gcs=ON --enable_hdfs=ON --enable_abfs=ON
+          source dev/ci-velox-buildstatic.sh
       - uses: actions/upload-artifact@v2
         with:
           path: ./cpp/build/releases/
diff --git a/.github/workflows/velox_docker_cache.yml 
b/.github/workflows/velox_docker_cache.yml
new file mode 100644
index 000000000..25a63781b
--- /dev/null
+++ b/.github/workflows/velox_docker_cache.yml
@@ -0,0 +1,44 @@
+# 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.
+
+name: Velox backend Dependency Cache
+
+on:
+  push:
+    branches:
+      - 'main'
+
+concurrency:
+  group: ${{ github.repository }}-${{ github.workflow }}
+  cancel-in-progress: true
+
+jobs:
+  cache-native-lib:
+    runs-on: ubuntu-20.04
+    container: inteldpo/gluten-centos-packaging:latest # centos7 with 
dependencies installed
+    steps:
+      - uses: actions/checkout@v2
+      - name: Generate cache key
+        run: |
+          echo ${{ hashFiles('./ep/build-velox/src/**', './dev/**', './cpp/*', 
'./github/workflows/*') }} > cache-key
+      - name: Build Gluten Velox third party
+        run: |
+          source dev/ci-velox-buildstatic.sh
+      - name: Cache
+        id: cache
+        uses: actions/cache/save@v3
+        with:
+          path: ./cpp/build/releases/
+          key: cache-velox-build-${{ hashFiles('./cache-key') }}
diff --git a/dev/ci-velox-buildstatic.sh b/dev/ci-velox-buildstatic.sh
new file mode 100755
index 000000000..a9b9d2c3f
--- /dev/null
+++ b/dev/ci-velox-buildstatic.sh
@@ -0,0 +1,9 @@
+yum install sudo patch java-1.8.0-openjdk-devel -y
+cd $GITHUB_WORKSPACE/ep/build-velox/src
+./get_velox.sh
+source /opt/rh/devtoolset-9/enable
+source $GITHUB_WORKSPACE//dev/vcpkg/env.sh
+cd $GITHUB_WORKSPACE/
+sed -i '/^headers/d' ep/build-velox/build/velox_ep/CMakeLists.txt
+export NUM_THREADS=4
+./dev/builddeps-veloxbe.sh --build_tests=OFF --build_benchmarks=OFF 
--enable_s3=ON --enable_gcs=ON --enable_hdfs=ON --enable_abfs=ON


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

Reply via email to