This is an automated email from the ASF dual-hosted git repository.
agrove pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git
The following commit(s) were added to refs/heads/main by this push:
new 477c8a49d build: lint as a separate step (#3717)
477c8a49d is described below
commit 477c8a49d369771b25fc104ee504178e057d3590
Author: Dmitrii Blaginin <[email protected]>
AuthorDate: Wed Mar 18 12:48:26 2026 +0000
build: lint as a separate step (#3717)
---
.github/actions/java-test/action.yaml | 36 ++-----------------
.github/workflows/pr_build_linux.yml | 66 +++++++++++++++++++++++++++++++++++
2 files changed, 69 insertions(+), 33 deletions(-)
diff --git a/.github/actions/java-test/action.yaml
b/.github/actions/java-test/action.yaml
index efc06e97a..687703c7c 100644
--- a/.github/actions/java-test/action.yaml
+++ b/.github/actions/java-test/action.yaml
@@ -59,7 +59,7 @@ runs:
# temporarily work around
https://github.com/actions/runner-images/issues/13341
# by disabling caching for macOS
if: ${{ runner.os != 'macOS' }}
- uses: actions/cache@v4
+ uses: actions/cache@v5
with:
path: |
~/.m2/repository
@@ -68,36 +68,6 @@ runs:
restore-keys: |
${{ runner.os }}-java-maven-
- - name: Run Maven compile
- shell: bash
- run: |
- ./mvnw -B package -DskipTests scalafix:scalafix -Dscalafix.mode=CHECK
-Psemanticdb ${{ inputs.maven_opts }}
-
- - name: Setup Node.js
- uses: actions/setup-node@v6
- with:
- node-version: '24'
-
- - name: Install prettier
- shell: bash
- run: |
- npm install -g prettier
-
- - name: Run prettier
- shell: bash
- run: |
- npx prettier "**/*.md" --write
-
- - name: Mark workspace as safe for git
- shell: bash
- run: |
- git config --global --add safe.directory "$GITHUB_WORKSPACE"
-
- - name: Check for any local git changes (such as generated docs)
- shell: bash
- run: |
- ./dev/ci/check-working-tree-clean.sh
-
- name: Run all tests
shell: bash
if: ${{ inputs.suites == '' }}
@@ -106,7 +76,7 @@ runs:
SPARK_LOCAL_HOSTNAME: "localhost"
SPARK_LOCAL_IP: "127.0.0.1"
run: |
- MAVEN_OPTS="-Xmx4G -Xms2G -XX:+UnlockDiagnosticVMOptions
-XX:+ShowMessageBoxOnError -XX:+HeapDumpOnOutOfMemoryError
-XX:ErrorFile=./hs_err_pid%p.log" SPARK_HOME=`pwd` ./mvnw -B -Prelease clean
install ${{ inputs.maven_opts }}
+ MAVEN_OPTS="-Xmx4G -Xms2G -XX:+UnlockDiagnosticVMOptions
-XX:+ShowMessageBoxOnError -XX:+HeapDumpOnOutOfMemoryError
-XX:ErrorFile=./hs_err_pid%p.log" SPARK_HOME=`pwd` ./mvnw -B -Prelease install
${{ inputs.maven_opts }}
- name: Run specified tests
shell: bash
if: ${{ inputs.suites != '' }}
@@ -117,7 +87,7 @@ runs:
run: |
MAVEN_SUITES="$(echo "${{ inputs.suites }}" | paste -sd, -)"
echo "Running with MAVEN_SUITES=$MAVEN_SUITES"
- MAVEN_OPTS="-Xmx4G -Xms2G -DwildcardSuites=$MAVEN_SUITES
-XX:+UnlockDiagnosticVMOptions -XX:+ShowMessageBoxOnError
-XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=./hs_err_pid%p.log"
SPARK_HOME=`pwd` ./mvnw -B -Prelease clean install ${{ inputs.maven_opts }}
+ MAVEN_OPTS="-Xmx4G -Xms2G -DwildcardSuites=$MAVEN_SUITES
-XX:+UnlockDiagnosticVMOptions -XX:+ShowMessageBoxOnError
-XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=./hs_err_pid%p.log"
SPARK_HOME=`pwd` ./mvnw -B -Prelease install ${{ inputs.maven_opts }}
- name: Upload crash logs
if: failure()
uses: actions/upload-artifact@v6
diff --git a/.github/workflows/pr_build_linux.yml
b/.github/workflows/pr_build_linux.yml
index dfb63a880..79deb7a28 100644
--- a/.github/workflows/pr_build_linux.yml
+++ b/.github/workflows/pr_build_linux.yml
@@ -66,6 +66,72 @@ jobs:
rustup component add rustfmt
cd native && cargo fmt --all -- --check
+ lint-java:
+ needs: lint
+ name: Lint Java (${{ matrix.profile.name }})
+ runs-on: ubuntu-latest
+ container:
+ image: amd64/rust
+ env:
+ JAVA_TOOL_OPTIONS: ${{ matrix.profile.java_version == '17' &&
'--add-exports=java.base/sun.nio.ch=ALL-UNNAMED
--add-exports=java.base/sun.util.calendar=ALL-UNNAMED
--add-opens=java.base/java.nio=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED' || '' }}
+ strategy:
+ matrix:
+ profile:
+ - name: "Spark 3.4, JDK 11, Scala 2.12"
+ java_version: "11"
+ maven_opts: "-Pspark-3.4 -Pscala-2.12"
+ - name: "Spark 3.5, JDK 17, Scala 2.12"
+ java_version: "17"
+ maven_opts: "-Pspark-3.5 -Pscala-2.12"
+ - name: "Spark 4.0, JDK 17"
+ java_version: "17"
+ maven_opts: "-Pspark-4.0"
+ fail-fast: false
+ steps:
+ - uses: runs-on/action@cd2b598b0515d39d78c38a02d529db87d2196d1e # v2.0.3
+ - uses: actions/checkout@v6
+
+ - name: Setup Rust & Java toolchain
+ uses: ./.github/actions/setup-builder
+ with:
+ rust-version: ${{ env.RUST_VERSION }}
+ jdk-version: ${{ matrix.profile.java_version }}
+
+ - name: Cache Maven dependencies
+ uses: actions/cache@v5
+ with:
+ path: |
+ ~/.m2/repository
+ /root/.m2/repository
+ key: ${{ runner.os }}-java-maven-${{ hashFiles('**/pom.xml') }}-lint
+ restore-keys: |
+ ${{ runner.os }}-java-maven-
+
+ - name: Run scalafix check
+ run: |
+ ./mvnw -B package -DskipTests scalafix:scalafix
-Dscalafix.mode=CHECK -Psemanticdb ${{ matrix.profile.maven_opts }}
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v6
+ with:
+ node-version: '24'
+
+ - name: Install prettier
+ run: |
+ npm install -g prettier
+
+ - name: Run prettier
+ run: |
+ npx prettier "**/*.md" --write
+
+ - name: Mark workspace as safe for git
+ run: |
+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
+
+ - name: Check for any local git changes (such as generated docs)
+ run: |
+ ./dev/ci/check-working-tree-clean.sh
+
# Build native library once and share with all test jobs
build-native:
needs: lint
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]