This is an automated email from the ASF dual-hosted git repository. blaginin pushed a commit to branch db/split-lint in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git
commit 89bbc4870e652c36c9a54715896754898fe02409 Author: blaginin <[email protected]> AuthorDate: Mon Mar 16 21:18:42 2026 +0000 split `lint-java` --- .github/actions/java-test/action.yaml | 36 ++----------------- .github/workflows/pr_build_linux.yml | 65 +++++++++++++++++++++++++++++++++++ 2 files changed, 68 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 9bbf86d4e..fee810b6a 100644 --- a/.github/workflows/pr_build_linux.yml +++ b/.github/workflows/pr_build_linux.yml @@ -66,6 +66,71 @@ 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: 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') }} + 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]
