Gluten Flink Github Runner #635
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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: Gluten Flink Github Runner | |
| on: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/flink.yml' | |
| - 'build/mvn' | |
| - 'gluten-flink/**' | |
| schedule: | |
| - cron: '0 18 * * *' | |
| env: | |
| MAVEN_OPTS: >- | |
| -Xmx2g | |
| --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED | |
| --add-opens=java.base/sun.nio.ch=org.apache.arrow.memory.core,ALL-UNNAMED | |
| --add-opens=java.base/java.lang=ALL-UNNAMED | |
| --add-opens=java.base/java.lang.invoke=ALL-UNNAMED | |
| --add-opens=java.base/java.lang.reflect=ALL-UNNAMED | |
| --add-opens=java.base/java.io=ALL-UNNAMED | |
| --add-opens=java.base/java.net=ALL-UNNAMED | |
| --add-opens=java.base/java.util=ALL-UNNAMED | |
| --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 | |
| --add-opens=java.base/jdk.internal.reflect=ALL-UNNAMED | |
| --add-opens=java.base/sun.reflect.generics.repository=ALL-UNNAMED | |
| JAVA_TOOL_OPTIONS: >- | |
| --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED | |
| --add-opens=java.base/sun.nio.ch=org.apache.arrow.memory.core,ALL-UNNAMED | |
| --add-opens=java.base/java.lang=ALL-UNNAMED | |
| --add-opens=java.base/java.lang.invoke=ALL-UNNAMED | |
| --add-opens=java.base/java.lang.reflect=ALL-UNNAMED | |
| --add-opens=java.base/java.io=ALL-UNNAMED | |
| --add-opens=java.base/java.net=ALL-UNNAMED | |
| --add-opens=java.base/java.util=ALL-UNNAMED | |
| --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 | |
| --add-opens=java.base/jdk.internal.reflect=ALL-UNNAMED | |
| --add-opens=java.base/sun.reflect.generics.repository=ALL-UNNAMED | |
| CCACHE_DIR: "${{ github.workspace }}/.ccache" | |
| jobs: | |
| flink-test: | |
| runs-on: ubuntu-22.04 | |
| 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 | |
| restore-keys: | | |
| ccache-flink-centos8 | |
| - name: Prepare and build velox4j | |
| run: | | |
| source /opt/rh/gcc-toolset-11/enable | |
| sudo dnf install -y patchelf ccache | |
| export CCACHE_DIR=${CCACHE_DIR} | |
| export CCACHE_MAXSIZE=2G | |
| 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 | |
| # velox bundled fmt 10.x during folly/velox native compilation. | |
| sudo rm -rf /usr/local/include/fmt | |
| sudo rm -rf /usr/local/lib/cmake/fmt | |
| sudo rm -f /usr/local/lib/libfmt* /usr/local/lib64/libfmt* | |
| export VELOX_DEPENDENCY_SOURCE=BUNDLED | |
| export fmt_SOURCE=BUNDLED | |
| export folly_SOURCE=BUNDLED | |
| git clone -b gluten-0530 https://github.com/bigo-sg/velox4j.git | |
| cd velox4j && git reset --hard 9811c337d5e37ab8d16d5bf0791b48836fcd2afd | |
| 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 | |
| - name: Save ccache | |
| if: success() | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: '${{ env.CCACHE_DIR }}' | |
| key: ccache-flink-centos8 | |
| - name: Build nexmark | |
| if: github.event_name != 'schedule' | |
| run: | | |
| git clone https://github.com/nexmark/nexmark.git | |
| cd nexmark | |
| $GITHUB_WORKSPACE/build/mvn clean install -DskipTests | |
| - name: Build Gluten Flink | |
| if: github.event_name != 'schedule' | |
| run: | | |
| cd $GITHUB_WORKSPACE/gluten-flink | |
| $GITHUB_WORKSPACE/build/mvn clean package -Dmaven.test.skip=true | |
| - name: Run Unit Tests | |
| if: github.event_name != 'schedule' | |
| run: | | |
| cd $GITHUB_WORKSPACE/gluten-flink | |
| $GITHUB_WORKSPACE/build/mvn test |