|
| 1 | +# Copyright (c) Facebook, Inc. and its affiliates. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +name: Gluten Daily Build |
| 16 | + |
| 17 | +on: |
| 18 | + push: |
| 19 | + paths: |
| 20 | + - '.github/workflows/gluten_daily.yml' |
| 21 | + schedule: |
| 22 | + - cron: '0 0 * * *' |
| 23 | +env: |
| 24 | + MVN_CMD: 'mvn -ntp' |
| 25 | + |
| 26 | +jobs: |
| 27 | + |
| 28 | + gluten-cpp-build: |
| 29 | + name: gluten cpp build |
| 30 | + # prevent errors when forks ff their main branch |
| 31 | + if: ${{ github.repository == 'IBM/velox' }} |
| 32 | + runs-on: ubuntu-22.04 |
| 33 | + env: |
| 34 | + CCACHE_DIR: "${{ github.workspace }}/.ccache" |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@v4 |
| 37 | + - name: Get Ccache |
| 38 | + uses: actions/cache/restore@v4 |
| 39 | + with: |
| 40 | + path: '${{ env.CCACHE_DIR }}' |
| 41 | + key: ccache-centos7-release-default-${{github.sha}} |
| 42 | + - name: Setup Gluten |
| 43 | + run: | |
| 44 | + git clone --depth 1 https://github.com/apache/incubator-gluten gluten && cd gluten |
| 45 | + BRANCH=$(echo ${GITHUB_REF#refs/heads/}) |
| 46 | + sed -i 's/oap-project/IBM/g' ep/build-velox/src/get_velox.sh |
| 47 | + sed -i 's/VELOX_BRANCH=2025.*/VELOX_BRANCH=main/g' ep/build-velox/src/get_velox.sh |
| 48 | + - name: Build Gluten native libraries |
| 49 | + run: | |
| 50 | + docker pull apache/gluten:vcpkg-centos-7 |
| 51 | + docker run -v $GITHUB_WORKSPACE:/work -w /work apache/gluten:vcpkg-centos-7 bash -c " |
| 52 | + set -e |
| 53 | + df -a |
| 54 | + cd /work/gluten |
| 55 | + export CCACHE_DIR=/work/.ccache |
| 56 | + mkdir -p /work/.ccache |
| 57 | + bash dev/ci-velox-buildstatic-centos-7.sh |
| 58 | + ccache -s |
| 59 | + mkdir -p /work/.m2/repository/org/apache/arrow/ |
| 60 | + cp -r /root/.m2/repository/org/apache/arrow/* /work/.m2/repository/org/apache/arrow/ |
| 61 | + " |
| 62 | + - name: "Save ccache" |
| 63 | + uses: actions/cache/save@v4 |
| 64 | + id: ccache |
| 65 | + with: |
| 66 | + path: '${{ env.CCACHE_DIR }}' |
| 67 | + key: ccache-centos7-release-default-${{github.sha}} |
| 68 | + - uses: actions/upload-artifact@v4 |
| 69 | + with: |
| 70 | + name: velox-native-lib-centos-7-${{github.sha}} |
| 71 | + path: ./gluten/cpp/build/releases/ |
| 72 | + if-no-files-found: error |
| 73 | + - uses: actions/upload-artifact@v4 |
| 74 | + with: |
| 75 | + name: arrow-jars-centos-7-${{github.sha}} |
| 76 | + path: .m2/repository/org/apache/arrow/ |
| 77 | + if-no-files-found: error |
| 78 | + |
| 79 | + spark-test-spark34: |
| 80 | + needs: gluten-cpp-build |
| 81 | + runs-on: ubuntu-22.04 |
| 82 | + container: apache/gluten:centos-8-jdk8 |
| 83 | + steps: |
| 84 | + - name: Setup Gluten |
| 85 | + run: | |
| 86 | + git clone --depth 1 https://github.com/apache/incubator-gluten gluten && cd gluten |
| 87 | + - name: Download All Artifacts |
| 88 | + uses: actions/download-artifact@v4 |
| 89 | + with: |
| 90 | + name: velox-native-lib-centos-7-${{github.sha}} |
| 91 | + path: ./gluten/cpp/build/releases |
| 92 | + - name: Download Arrow Jars |
| 93 | + uses: actions/download-artifact@v4 |
| 94 | + with: |
| 95 | + name: arrow-jars-centos-7-${{github.sha}} |
| 96 | + path: /root/.m2/repository/org/apache/arrow/ |
| 97 | + - name: Prepare spark.test.home for Spark 3.4.4 (other tests) |
| 98 | + run: | |
| 99 | + dnf module -y install python39 && \ |
| 100 | + alternatives --set python3 /usr/bin/python3.9 && \ |
| 101 | + pip3 install setuptools==77.0.3 && \ |
| 102 | + pip3 install pyspark==3.4.4 cython && \ |
| 103 | + pip3 install pandas pyarrow |
| 104 | + - name: Build and Run unit test for Spark 3.4.4 (other tests) |
| 105 | + run: | |
| 106 | + cd $GITHUB_WORKSPACE/gluten |
| 107 | + export SPARK_SCALA_VERSION=2.12 |
| 108 | + yum install -y java-17-openjdk-devel |
| 109 | + export JAVA_HOME=/usr/lib/jvm/java-17-openjdk |
| 110 | + export PATH=$JAVA_HOME/bin:$PATH |
| 111 | + java -version |
| 112 | + export SPARK_HOME=/opt/shims/spark34/spark_home/ |
| 113 | + ls -l $SPARK_HOME |
| 114 | + $MVN_CMD clean test -Pspark-3.4 -Pjava-17 -Pbackends-velox -Piceberg -Pdelta -Phudi -Pspark-ut \ |
| 115 | + -DtagsToExclude=org.apache.spark.tags.ExtendedSQLTest,org.apache.gluten.tags.UDFTest,org.apache.gluten.tags.SkipTest \ |
| 116 | + -DargLine="-Dspark.test.home=$SPARK_HOME ${EXTRA_FLAGS}" |
| 117 | + - name: Upload test report |
| 118 | + if: always() |
| 119 | + uses: actions/upload-artifact@v4 |
| 120 | + with: |
| 121 | + name: ${{ github.job }}-report |
| 122 | + path: '**/surefire-reports/TEST-*.xml' |
| 123 | + - name: Upload unit tests log files |
| 124 | + if: ${{ !success() }} |
| 125 | + uses: actions/upload-artifact@v4 |
| 126 | + with: |
| 127 | + name: ${{ github.job }}-test-log |
| 128 | + path: | |
| 129 | + **/target/*.log |
| 130 | + **/gluten-ut/**/hs_err_*.log |
| 131 | + **/gluten-ut/**/core.* |
| 132 | + - name: Upload golden files |
| 133 | + if: failure() |
| 134 | + uses: actions/upload-artifact@v4 |
| 135 | + with: |
| 136 | + name: ${{ github.job }}-golden-files |
| 137 | + path: /tmp/tpch-approved-plan/** |
| 138 | + |
| 139 | + spark-test-spark34-slow: |
| 140 | + needs: gluten-cpp-build |
| 141 | + runs-on: ubuntu-22.04 |
| 142 | + container: apache/gluten:centos-8-jdk8 |
| 143 | + steps: |
| 144 | + - name: Setup Gluten |
| 145 | + run: | |
| 146 | + git clone --depth 1 https://github.com/apache/incubator-gluten gluten && cd gluten |
| 147 | + - name: Download All Artifacts |
| 148 | + uses: actions/download-artifact@v4 |
| 149 | + with: |
| 150 | + name: velox-native-lib-centos-7-${{github.sha}} |
| 151 | + path: ./gluten/cpp/build/releases |
| 152 | + - name: Download Arrow Jars |
| 153 | + uses: actions/download-artifact@v4 |
| 154 | + with: |
| 155 | + name: arrow-jars-centos-7-${{github.sha}} |
| 156 | + path: /root/.m2/repository/org/apache/arrow/ |
| 157 | + - name: Build and Run unit test for Spark 3.4.4 (slow tests) |
| 158 | + run: | |
| 159 | + cd $GITHUB_WORKSPACE/gluten |
| 160 | + yum install -y java-17-openjdk-devel |
| 161 | + export JAVA_HOME=/usr/lib/jvm/java-17-openjdk |
| 162 | + export PATH=$JAVA_HOME/bin:$PATH |
| 163 | + java -version |
| 164 | + export SPARK_HOME=/opt/shims/spark34/spark_home/ |
| 165 | + ls -l $SPARK_HOME |
| 166 | + $MVN_CMD clean test -Pspark-3.4 -Pjava-17 -Pbackends-velox -Piceberg -Pdelta -Pspark-ut -Phudi \ |
| 167 | + -DtagsToInclude=org.apache.spark.tags.ExtendedSQLTest \ |
| 168 | + -DargLine="-Dspark.test.home=$SPARK_HOME ${EXTRA_FLAGS}" |
| 169 | + - name: Upload test report |
| 170 | + if: always() |
| 171 | + uses: actions/upload-artifact@v4 |
| 172 | + with: |
| 173 | + name: ${{ github.job }}-report |
| 174 | + path: '**/surefire-reports/TEST-*.xml' |
| 175 | + - name: Upload unit tests log files |
| 176 | + if: ${{ !success() }} |
| 177 | + uses: actions/upload-artifact@v4 |
| 178 | + with: |
| 179 | + name: ${{ github.job }}-test-log |
| 180 | + path: | |
| 181 | + **/target/*.log |
| 182 | + **/gluten-ut/**/hs_err_*.log |
| 183 | + **/gluten-ut/**/core.* |
| 184 | +
|
| 185 | + spark-test-spark35: |
| 186 | + needs: gluten-cpp-build |
| 187 | + runs-on: ubuntu-22.04 |
| 188 | + container: apache/gluten:centos-8-jdk8 |
| 189 | + steps: |
| 190 | + - name: Setup Gluten |
| 191 | + run: | |
| 192 | + git clone --depth 1 https://github.com/apache/incubator-gluten gluten && cd gluten |
| 193 | + - name: Download All Artifacts |
| 194 | + uses: actions/download-artifact@v4 |
| 195 | + with: |
| 196 | + name: velox-native-lib-centos-7-${{github.sha}} |
| 197 | + path: ./gluten/cpp/build/releases |
| 198 | + - name: Download Arrow Jars |
| 199 | + uses: actions/download-artifact@v4 |
| 200 | + with: |
| 201 | + name: arrow-jars-centos-7-${{github.sha}} |
| 202 | + path: /root/.m2/repository/org/apache/arrow/ |
| 203 | + - name: Prepare spark.test.home for Spark 3.5.2 (other tests) |
| 204 | + run: | |
| 205 | + dnf module -y install python39 && \ |
| 206 | + alternatives --set python3 /usr/bin/python3.9 && \ |
| 207 | + pip3 install setuptools==77.0.3 && \ |
| 208 | + pip3 install pyspark==3.5.2 cython && \ |
| 209 | + pip3 install pandas pyarrow |
| 210 | + - name: Build and Run unit test for Spark 3.5.2 (other tests) |
| 211 | + run: | |
| 212 | + cd $GITHUB_WORKSPACE/gluten |
| 213 | + export SPARK_SCALA_VERSION=2.12 |
| 214 | + yum install -y java-17-openjdk-devel |
| 215 | + export JAVA_HOME=/usr/lib/jvm/java-17-openjdk |
| 216 | + export PATH=$JAVA_HOME/bin:$PATH |
| 217 | + java -version |
| 218 | + export SPARK_HOME=/opt/shims/spark35/spark_home/ |
| 219 | + ls -l $SPARK_HOME |
| 220 | + $MVN_CMD clean test -Pspark-3.5 -Pjava-17 -Pbackends-velox -Piceberg -Pdelta -Phudi -Pspark-ut \ |
| 221 | + -DtagsToExclude=org.apache.spark.tags.ExtendedSQLTest,org.apache.gluten.tags.UDFTest,org.apache.gluten.tags.SkipTest \ |
| 222 | + -DargLine="-Dspark.test.home=$SPARK_HOME ${EXTRA_FLAGS}" |
| 223 | + - name: Upload test report |
| 224 | + if: always() |
| 225 | + uses: actions/upload-artifact@v4 |
| 226 | + with: |
| 227 | + name: ${{ github.job }}-report |
| 228 | + path: '**/surefire-reports/TEST-*.xml' |
| 229 | + - name: Upload unit tests log files |
| 230 | + if: ${{ !success() }} |
| 231 | + uses: actions/upload-artifact@v4 |
| 232 | + with: |
| 233 | + name: ${{ github.job }}-test-log |
| 234 | + path: | |
| 235 | + **/target/*.log |
| 236 | + **/gluten-ut/**/hs_err_*.log |
| 237 | + **/gluten-ut/**/core.* |
| 238 | + - name: Upload golden files |
| 239 | + if: failure() |
| 240 | + uses: actions/upload-artifact@v4 |
| 241 | + with: |
| 242 | + name: ${{ github.job }}-golden-files |
| 243 | + path: /tmp/tpch-approved-plan/** |
| 244 | + |
| 245 | + spark-test-spark35-slow: |
| 246 | + needs: gluten-cpp-build |
| 247 | + runs-on: ubuntu-22.04 |
| 248 | + container: apache/gluten:centos-8-jdk8 |
| 249 | + steps: |
| 250 | + - name: Setup Gluten |
| 251 | + run: | |
| 252 | + git clone --depth 1 https://github.com/apache/incubator-gluten gluten && cd gluten |
| 253 | + - name: Download All Artifacts |
| 254 | + uses: actions/download-artifact@v4 |
| 255 | + with: |
| 256 | + name: velox-native-lib-centos-7-${{github.sha}} |
| 257 | + path: ./gluten/cpp/build/releases |
| 258 | + - name: Download Arrow Jars |
| 259 | + uses: actions/download-artifact@v4 |
| 260 | + with: |
| 261 | + name: arrow-jars-centos-7-${{github.sha}} |
| 262 | + path: /root/.m2/repository/org/apache/arrow/ |
| 263 | + - name: Build and Run unit test for Spark 3.5.2 (slow tests) |
| 264 | + run: | |
| 265 | + cd $GITHUB_WORKSPACE/gluten |
| 266 | + yum install -y java-17-openjdk-devel |
| 267 | + export JAVA_HOME=/usr/lib/jvm/java-17-openjdk |
| 268 | + export PATH=$JAVA_HOME/bin:$PATH |
| 269 | + java -version |
| 270 | + export SPARK_HOME=/opt/shims/spark35/spark_home/ |
| 271 | + ls -l $SPARK_HOME |
| 272 | + $MVN_CMD clean test -Pspark-3.5 -Pjava-17 -Pbackends-velox -Piceberg -Pdelta -Pspark-ut -Phudi \ |
| 273 | + -DtagsToInclude=org.apache.spark.tags.ExtendedSQLTest \ |
| 274 | + -DargLine="-Dspark.test.home=$SPARK_HOME ${EXTRA_FLAGS}" |
| 275 | + - name: Upload test report |
| 276 | + if: always() |
| 277 | + uses: actions/upload-artifact@v4 |
| 278 | + with: |
| 279 | + name: ${{ github.job }}-report |
| 280 | + path: '**/surefire-reports/TEST-*.xml' |
| 281 | + - name: Upload unit tests log files |
| 282 | + if: ${{ !success() }} |
| 283 | + uses: actions/upload-artifact@v4 |
| 284 | + with: |
| 285 | + name: ${{ github.job }}-test-log |
| 286 | + path: | |
| 287 | + **/target/*.log |
| 288 | + **/gluten-ut/**/hs_err_*.log |
| 289 | + **/gluten-ut/**/core.* |
| 290 | +
|
| 291 | + linux-gcc: |
| 292 | + name: Build with GCC |
| 293 | + if: ${{ github.repository == 'IBM/velox' }} |
| 294 | + runs-on: ubuntu-22.04 |
| 295 | + container: ghcr.io/facebookincubator/velox-dev:adapters |
| 296 | + defaults: |
| 297 | + run: |
| 298 | + shell: bash |
| 299 | + env: |
| 300 | + CCACHE_DIR: ${{ github.workspace }}/ccache |
| 301 | + VELOX_DEPENDENCY_SOURCE: SYSTEM |
| 302 | + GTest_SOURCE: BUNDLED |
| 303 | + cudf_SOURCE: BUNDLED |
| 304 | + CUDA_VERSION: '12.8' |
| 305 | + faiss_SOURCE: BUNDLED |
| 306 | + steps: |
| 307 | + - uses: actions/checkout@v4 |
| 308 | + with: |
| 309 | + fetch-depth: 2 |
| 310 | + persist-credentials: false |
| 311 | + |
| 312 | + - name: Fix git permissions |
| 313 | + # Usually actions/checkout does this but as we run in a container |
| 314 | + # it doesn't work |
| 315 | + run: git config --global --add safe.directory ${GITHUB_WORKSPACE} |
| 316 | + |
| 317 | + - name: Install Dependencies |
| 318 | + run: | |
| 319 | + if git diff --name-only HEAD^1 HEAD | grep -q "scripts/setup-"; then |
| 320 | + # Overwrite old setup scripts with changed versions |
| 321 | + cp scripts/setup-* / |
| 322 | +
|
| 323 | + mkdir /tmp/build |
| 324 | + cd /tmp/build |
| 325 | + source /opt/rh/gcc-toolset-12/enable |
| 326 | + # install basic deps |
| 327 | + bash /setup-centos9.sh |
| 328 | +
|
| 329 | + source /setup-centos9.sh |
| 330 | + install_adapters |
| 331 | + install_cuda $CUDA_VERSION |
| 332 | +
|
| 333 | + cd / |
| 334 | + rm -rf /tmp/build # cleanup to avoid issues with disk space |
| 335 | + fi |
| 336 | +
|
| 337 | + - name: Install Minio |
| 338 | + run: | |
| 339 | + MINIO_BINARY="minio-2022-05-26" |
| 340 | + if [ ! -f /usr/local/bin/${MINIO_BINARY} ]; then |
| 341 | + wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio.RELEASE.2022-05-26T05-48-41Z -O ${MINIO_BINARY} |
| 342 | + chmod +x ./${MINIO_BINARY} |
| 343 | + mv ./${MINIO_BINARY} /usr/local/bin/ |
| 344 | + fi |
| 345 | +
|
| 346 | + - uses: actions/cache/restore@v4 |
| 347 | + with: |
| 348 | + path: '${{ env.CCACHE_DIR }}' |
| 349 | + key: ccache-linux-adapters-${{ inputs.use-clang && 'clang' || 'gcc' }}-${{github.sha}} |
| 350 | + restore-keys: | |
| 351 | + ccache-linux-adapters-${{ inputs.use-clang && 'clang' || 'gcc' }} |
| 352 | +
|
| 353 | + - name: Zero Ccache Statistics |
| 354 | + run: | |
| 355 | + ccache -sz |
| 356 | +
|
| 357 | + - name: Make Release Build |
| 358 | + env: |
| 359 | + #MAKEFLAGS: 'NUM_THREADS=8 MAX_HIGH_MEM_JOBS=4 MAX_LINK_JOBS=4' |
| 360 | + CUDA_ARCHITECTURES: 70 |
| 361 | + CUDA_COMPILER: /usr/local/cuda-${CUDA_VERSION}/bin/nvcc |
| 362 | + # Set compiler to GCC 12 |
| 363 | + CUDA_FLAGS: -ccbin /opt/rh/gcc-toolset-12/root/usr/bin |
| 364 | + run: | |
| 365 | + EXTRA_CMAKE_FLAGS=( |
| 366 | + "-DVELOX_ENABLE_BENCHMARKS=ON" |
| 367 | + "-DVELOX_ENABLE_EXAMPLES=ON" |
| 368 | + "-DVELOX_ENABLE_ARROW=ON" |
| 369 | + "-DVELOX_ENABLE_GEO=ON" |
| 370 | + "-DVELOX_ENABLE_FAISS=ON" |
| 371 | + "-DVELOX_ENABLE_PARQUET=ON" |
| 372 | + "-DVELOX_ENABLE_HDFS=ON" |
| 373 | + "-DVELOX_ENABLE_S3=ON" |
| 374 | + "-DVELOX_ENABLE_GCS=ON" |
| 375 | + "-DVELOX_ENABLE_ABFS=ON" |
| 376 | + "-DVELOX_ENABLE_REMOTE_FUNCTIONS=ON" |
| 377 | + "-DVELOX_ENABLE_CUDF=ON" |
| 378 | + "-DVELOX_ENABLE_WAVE=ON" |
| 379 | + "-DVELOX_MONO_LIBRARY=ON" |
| 380 | + "-DVELOX_BUILD_SHARED=ON" |
| 381 | + ) |
| 382 | + if [[ "${USE_CLANG}" = "true" ]]; then scripts/setup-centos9.sh install_clang15; export CC=/usr/bin/clang-15; export CXX=/usr/bin/clang++-15; CUDA_FLAGS="-ccbin /usr/lib64/llvm15/bin/clang++-15"; fi |
| 383 | + make release EXTRA_CMAKE_FLAGS="${EXTRA_CMAKE_FLAGS[*]}" |
| 384 | +
|
| 385 | + - name: Ccache after |
| 386 | + run: ccache -s |
| 387 | + |
| 388 | + - uses: actions/cache/save@v4 |
| 389 | + with: |
| 390 | + path: '${{ env.CCACHE_DIR }}' |
| 391 | + key: ccache-linux-adapters-gcc-${{github.sha}} |
0 commit comments