Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/check_license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: license header check
name: License Header Check
on:
pull_request
concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
license-check:
name: License Header Check
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: Code style checks
name: Code Format Check
on:
pull_request:
paths:
- '.github/workflows/code_style.yml'
- '.github/workflows/code_format.yml'
- '.github/workflows/**/*.py'
- 'tools/**/*.py'
- 'dev/**/*.py'
- 'cpp/**'

concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true

jobs:

Code-format-check:
name: Code Format Check(cpp)
format-check:
runs-on: ubuntu-latest
container: ubuntu:22.04
steps:
Expand All @@ -40,7 +43,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check CPP format
- name: Check
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
cd $GITHUB_WORKSPACE/
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: "Label pull requests"
name: Label Pull Requests
on: pull_request_target

jobs:
label:
name: Label pull requests
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/scala_code_format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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: Code Format Check
on:
pull_request:
paths:
- '.github/workflows/scala_code_format.yml'
- 'backends-velox/**'
- 'gluten-uniffle/**'
- 'gluten-celeborn/**'
- 'gluten-ras/**'
- 'gluten-core/**'
- 'gluten-substrait/**'
- 'gluten-arrow/**'
- 'gluten-delta/**'
- 'gluten-iceberg/**'
- 'gluten-hudi/**'
- 'gluten-paimon/**'
- 'gluten-ut/**'
- 'shims/**'
- 'tools/gluten-it/**'

concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true

env:
SETUP: 'bash .github/workflows/util/setup_helper.sh'

jobs:

scala-format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check
run: |
./dev/format-scala-code.sh check
- name: Fix
if: failure()
run: |
./dev/format-scala-code.sh
git show
7 changes: 6 additions & 1 deletion .github/workflows/util/setup_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ function install_maven {
wget -nv -O ${local_binary} ${url}
tar -xvf ${local_binary} && mv apache-maven-${maven_version} /usr/lib/maven
)
echo "PATH=${PATH}:/usr/lib/maven/bin" >> $GITHUB_ENV
export PATH=/usr/lib/maven/bin:$PATH
if [ -n "$GITHUB_ENV" ]; then
echo "PATH=/usr/lib/maven/bin:$PATH" >> $GITHUB_ENV
else
echo "Warning: GITHUB_ENV is not set. Skipping environment variable export."
fi
}

for cmd in "$@"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/velox_backend_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: Velox backend Github Runner (ARM)
name: Velox Backend (ARM)

on:
pull_request:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: Velox backend Github Runner (Enhanced Features)
name: Velox Backend (Enhanced)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, once may not figure out the meaning of Enhanced at first glance.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhztheplayer, thanks for the comment. I feel this simple name is descriptive enough, especially since it's intended for developers only. Not a strong preference. I can revert to the full name if you think it's more appropriate. :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, just keep it if you have strong reason. Never tended to be nitpicking :)


on:
pull_request:
paths:
- '.github/workflows/velox_backend_enhanced_features.yml'
- '.github/workflows/velox_backend_enhanced.yml'
- 'pom.xml'
- 'backends-velox/**'
- 'gluten-uniffle/**'
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/velox_backend_x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: Velox backend Github Runner (x86)
name: Velox Backend (x86)

on:
pull_request:
Expand Down Expand Up @@ -43,7 +43,7 @@ env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
MVN_CMD: 'mvn -ntp'
WGET_CMD: 'wget -nv'
SETUP: 'bash .github/workflows/util/setup_helper.sh'
SETUP: 'source .github/workflows/util/setup_helper.sh'
CCACHE_DIR: "${{ github.workspace }}/.ccache"
# spark.sql.ansi.enabled defaults to false.
SPARK_ANSI_SQL_MODE: false
Expand Down Expand Up @@ -306,10 +306,7 @@ jobs:

# Setup java and maven
yum update -y && yum install -y java-1.8.0-openjdk-devel wget tzdata python3-pip

$SETUP install_maven
export PATH=${PATH}:/usr/lib/maven/bin

# Set environment variables
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk

Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/velox_weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: Velox backend weekly job
name: Velox Backend Weekly Job

on:
pull_request:
Expand All @@ -25,7 +25,7 @@ on:
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
MVN_CMD: 'mvn -ntp'
SETUP: 'bash .github/workflows/util/setup_helper.sh'
SETUP: 'source .github/workflows/util/setup_helper.sh'
TPCH_TEST: "env GLUTEN_IT_JVM_ARGS=-Xmx5G sbin/gluten-it.sh queries-compare
--local --preset=velox --benchmark-type=h --error-on-memleak --off-heap-size=10g -s=1.0 --threads=16 --iterations=1"
INSTALL_PREFIX: /usr/local
Expand Down Expand Up @@ -62,17 +62,11 @@ jobs:
yum install -y java-1.8.0-openjdk-devel patch wget git perl python3-pip
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk && \
export PATH=$JAVA_HOME/bin:$PATH
wget --no-check-certificate https://downloads.apache.org/maven/maven-3/3.8.9/binaries/apache-maven-3.8.9-bin.tar.gz && \
tar -xvf apache-maven*bin.tar.gz && \
mv apache-maven-3.8.9 /usr/lib/maven && \
export MAVEN_HOME=/usr/lib/maven && \
export PATH=${PATH}:${MAVEN_HOME}/bin && \
ln -s /usr/lib/maven/bin /usr/bin/mvn
ls -l /usr/bin/mvn

# The upstream main branch is cloned. Please temporarily switch to the dev branch for PR validation.
git clone -b main --depth=1 https://github.com/apache/incubator-gluten.git && cd incubator-gluten/
$SETUP install_maven
./dev/package.sh --spark_version=3.5


build-on-centos:
strategy:
Expand Down Expand Up @@ -112,10 +106,7 @@ jobs:
yum install -y java-1.8.0-openjdk-devel patch wget git perl
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk && \
export PATH=$JAVA_HOME/bin:$PATH

$SETUP install_maven
export MAVEN_HOME=/usr/lib/maven && \
export PATH=${PATH}:${MAVEN_HOME}/bin

cd $GITHUB_WORKSPACE/ && ./dev/package.sh --spark_version=3.5

Expand Down
File renamed without changes.
34 changes: 34 additions & 0 deletions dev/format-scala-code.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# 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.

# If a new profile is introduced for new modules, please add it here to ensure
# the new modules are covered.
PROFILES="-Pbackends-velox -Pceleborn,uniffle -Piceberg,delta,hudi,paimon \
-Pspark-3.2,spark-3.3,spark-3.4,spark-3.5,spark-4.0 -Pspark-ut"
Comment on lines +20 to +21
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is not for a CI task that is only for VL backend, let's add CH's code as well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comment. I note all scripts under dev/ are related to velox backend. Perhaps it’s better to continue excluding the CH backend in this script.


COMMAND=$1

if [[ "$COMMAND" == "check" ]]; then
echo "Checking Scala code style.."
mvn -q spotless:check $PROFILES
elif [[ "$COMMAND" == "apply" ]] || [[ "$COMMAND" == "" ]]; then
echo "Fixing Scala code style.."
mvn -q spotless:apply $PROFILES
else
echo "Unrecognized option."
exit 1
fi
Loading