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

yuanzhou 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 a311ff801 [GLUTEN-5123][INFRA]improve build_bundle_package.yml to 
allow build package on centos8 and ubuntu 22.04/20.04 (#5124)
a311ff801 is described below

commit a311ff801c0c1c9c46f81c589058aa26a8a11774
Author: Qian Sun <[email protected]>
AuthorDate: Thu Mar 28 07:52:22 2024 +0800

    [GLUTEN-5123][INFRA]improve build_bundle_package.yml to allow build package 
on centos8 and ubuntu 22.04/20.04 (#5124)
    
    This patch improved the set up java and maven operations according to OS in 
build_bundle_package.yml
    by doing this it will allow users to build package on more OS
---
 .github/workflows/build_bundle_package.yml | 75 ++++++++++++++++++++++++++++--
 1 file changed, 71 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/build_bundle_package.yml 
b/.github/workflows/build_bundle_package.yml
index c0aa6bf38..1dff6cac9 100644
--- a/.github/workflows/build_bundle_package.yml
+++ b/.github/workflows/build_bundle_package.yml
@@ -40,7 +40,7 @@ jobs:
     runs-on: ubuntu-20.04
     container: inteldpo/gluten-centos-packaging:latest
     steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v2
       - name: Build Gluten velox third party
         run: |
           yum install sudo patch java-1.8.0-openjdk-devel -y && \
@@ -59,12 +59,13 @@ jobs:
           name: velox-native-lib-${{github.sha}}
           retention-days: 1
 
-  build-pabkages:
+  build-bundle-package-ubuntu:
+    if: startsWith(github.event.inputs.os, 'ubuntu')
     needs: build-native-lib
     runs-on: ubuntu-20.04
     container: ${{ github.event.inputs.os }}
     steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v2
       - name: Download All Artifacts
         uses: actions/download-artifact@v2
         with:
@@ -80,7 +81,73 @@ jobs:
           cd $GITHUB_WORKSPACE/ && \
           mvn clean install -P${{ github.event.inputs.spark }} 
-Dhadoop.version=${{ github.event.inputs.hadoop }} -Pbackends-velox -Prss 
-DskipTests -Dmaven.source.skip
       - name: Upload bundle package
-        uses: actions/upload-artifact@v4
+        uses: actions/upload-artifact@v2
+        with:
+          name: gluten-velox-bundle-package
+          path: package/target/gluten-velox-bundle-*.jar
+          retention-days: 7
+
+  build-bundle-package-centos7:
+    if: ${{ github.event.inputs.os == 'centos:7' }}
+    needs: build-native-lib
+    runs-on: ubuntu-20.04
+    container: ${{ github.event.inputs.os }}
+    steps:
+      - uses: actions/checkout@v2
+      - name: Download All Artifacts
+        uses: actions/download-artifact@v2
+        with:
+          name: velox-native-lib-${{github.sha}}
+          path: ./cpp/build/releases
+      - name: Setup java and maven
+        run: |
+          yum update -y && yum install -y java-1.8.0-openjdk-devel wget && \
+          wget 
https://downloads.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz
 && \
+          tar -xvf apache-maven-3.8.8-bin.tar.gz && \
+          mv apache-maven-3.8.8 /usr/lib/maven
+      - name: Build for Spark ${{ github.event.inputs.spark }}
+        run: |
+          cd $GITHUB_WORKSPACE/ && \
+          export MAVEN_HOME=/usr/lib/maven && \
+          export PATH=${PATH}:${MAVEN_HOME}/bin && \
+          mvn clean install -P${{ github.event.inputs.spark }} 
-Dhadoop.version=${{ github.event.inputs.hadoop }} -Pbackends-velox -Prss 
-DskipTests -Dmaven.source.skip
+      - name: Upload bundle package
+        uses: actions/upload-artifact@v2
+        with:
+          name: gluten-velox-bundle-package
+          path: package/target/gluten-velox-bundle-*.jar
+          retention-days: 7
+
+  build-bundle-package-centos8:
+    if: ${{ github.event.inputs.os == 'centos:8' }}
+    needs: build-native-lib
+    runs-on: ubuntu-20.04
+    container: ${{ github.event.inputs.os }}
+    steps:
+      - uses: actions/checkout@v2
+      - name: Download All Artifacts
+        uses: actions/download-artifact@v2
+        with:
+          name: velox-native-lib-${{github.sha}}
+          path: ./cpp/build/releases
+      - name: Update mirror list
+        run: |
+          sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-* 
|| true && \
+          sed -i -e 
"s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" 
/etc/yum.repos.d/CentOS-* || true
+      - name: Setup java and maven
+        run: |
+          yum update -y && yum install -y java-1.8.0-openjdk-devel wget && \
+          wget 
https://downloads.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz
 && \
+          tar -xvf apache-maven-3.8.8-bin.tar.gz && \
+          mv apache-maven-3.8.8 /usr/lib/maven
+      - name: Build for Spark ${{ github.event.inputs.spark }}
+        run: |
+          cd $GITHUB_WORKSPACE/ && \
+          export MAVEN_HOME=/usr/lib/maven && \
+          export PATH=${PATH}:${MAVEN_HOME}/bin && \
+          mvn clean install -P${{ github.event.inputs.spark }} 
-Dhadoop.version=${{ github.event.inputs.hadoop }} -Pbackends-velox -Prss 
-DskipTests -Dmaven.source.skip
+      - name: Upload bundle package
+        uses: actions/upload-artifact@v2
         with:
           name: gluten-velox-bundle-package
           path: package/target/gluten-velox-bundle-*.jar


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

Reply via email to