|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 2 | +# contributor license agreements. See the NOTICE file distributed with |
| 3 | +# this work for additional information regarding copyright ownership. |
| 4 | +# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 5 | +# (the "License"); you may not use this file except in compliance with |
| 6 | +# the License. You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | + |
| 16 | +name: Velox backend nightly release |
| 17 | + |
| 18 | +on: |
| 19 | + pull_request: |
| 20 | + paths: |
| 21 | + - '.github/workflows/velox_nightly.yml' |
| 22 | + schedule: |
| 23 | + - cron: '0 0 * * *' |
| 24 | + |
| 25 | +env: |
| 26 | + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true |
| 27 | + CCACHE_DIR: "${{ github.workspace }}/.ccache" |
| 28 | + |
| 29 | +concurrency: |
| 30 | + group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} |
| 31 | + cancel-in-progress: true |
| 32 | + |
| 33 | +jobs: |
| 34 | + build-native-lib: |
| 35 | + runs-on: ubuntu-20.04 |
| 36 | + steps: |
| 37 | + - uses: actions/checkout@v4 |
| 38 | + - name: Get Ccache |
| 39 | + uses: actions/cache/restore@v4 |
| 40 | + with: |
| 41 | + path: '${{ env.CCACHE_DIR }}' |
| 42 | + key: ccache-centos7-release-default-${{github.sha}} |
| 43 | + restore-keys: | |
| 44 | + ccache-centos7-release-default |
| 45 | + - name: Build Gluten velox third party |
| 46 | + run: | |
| 47 | + docker run -v $GITHUB_WORKSPACE:/work -w /work apache/gluten:vcpkg-centos-7 bash -c " |
| 48 | + df -a |
| 49 | + cd /work |
| 50 | + export CCACHE_DIR=/work/.ccache |
| 51 | + bash dev/ci-velox-buildstatic-centos-7.sh |
| 52 | + ccache -s |
| 53 | + mkdir -p /work/.m2/repository/org/apache/arrow/ |
| 54 | + cp -r /root/.m2/repository/org/apache/arrow/* /work/.m2/repository/org/apache/arrow/ |
| 55 | + " |
| 56 | + - name: Upload native libs |
| 57 | + uses: actions/upload-artifact@v4 |
| 58 | + with: |
| 59 | + path: ./cpp/build/releases/ |
| 60 | + name: velox-native-lib-${{github.sha}} |
| 61 | + retention-days: 1 |
| 62 | + - name: Upload Artifact Arrow Jar |
| 63 | + uses: actions/upload-artifact@v4 |
| 64 | + with: |
| 65 | + path: .m2/repository/org/apache/arrow/ |
| 66 | + name: velox-arrow-jar-centos-7-${{github.sha}} |
| 67 | + |
| 68 | + build-bundle-package-centos8: |
| 69 | + needs: build-native-lib |
| 70 | + runs-on: ubuntu-22.04 |
| 71 | + container: centos:8 |
| 72 | + steps: |
| 73 | + - uses: actions/checkout@v4 |
| 74 | + - name: Download All Artifacts |
| 75 | + uses: actions/download-artifact@v4 |
| 76 | + with: |
| 77 | + name: velox-native-lib-${{github.sha}} |
| 78 | + path: ./cpp/build/releases |
| 79 | + - name: Download All Arrow Jar Artifacts |
| 80 | + uses: actions/download-artifact@v4 |
| 81 | + with: |
| 82 | + name: velox-arrow-jar-centos-7-${{github.sha}} |
| 83 | + path: /root/.m2/repository/org/apache/arrow/ |
| 84 | + - name: Setup java and maven |
| 85 | + run: | |
| 86 | + sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \ |
| 87 | + sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* && \ |
| 88 | + yum update -y && yum install -y java-1.8.0-openjdk-devel wget && \ |
| 89 | + wget https://downloads.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz && \ |
| 90 | + tar -xvf apache-maven-3.8.8-bin.tar.gz && \ |
| 91 | + mv apache-maven-3.8.8 /usr/lib/maven |
| 92 | + - name: Get current date |
| 93 | + id: date |
| 94 | + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" |
| 95 | + - name: Build for Spark 3.5 |
| 96 | + run: | |
| 97 | + cd $GITHUB_WORKSPACE/ && \ |
| 98 | + export MAVEN_HOME=/usr/lib/maven && \ |
| 99 | + export PATH=${PATH}:${MAVEN_HOME}/bin && \ |
| 100 | + mvn clean install -Pspark-3.5 -Pbackends-velox -Pceleborn -Puniffle -DskipTests -Dmaven.source.skip |
| 101 | + - name: Upload bundle package |
| 102 | + uses: actions/upload-artifact@v4 |
| 103 | + with: |
| 104 | + name: nightly-gluten-velox-bundle-package-spark35-${{ steps.date.outputs.date }} |
| 105 | + path: package/target/gluten-velox-bundle-*.jar |
| 106 | + retention-days: 7 |
| 107 | + |
| 108 | + |
0 commit comments