| # 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. |
| |
| # Lightweight CI for benchmark-only changes - verifies compilation and linting |
| # without running full test suites |
| |
| name: PR Benchmark Check |
| |
| # Reusable: invoked by ci.yml. Triggering, path filters, and concurrency |
| # live in the umbrella workflow. |
| on: |
| workflow_call: |
| |
| env: |
| RUST_VERSION: stable |
| RUST_BACKTRACE: 1 |
| |
| jobs: |
| benchmark-check: |
| name: Benchmark Compile & Lint Check |
| runs-on: ubuntu-24.04 |
| container: |
| image: amd64/rust |
| steps: |
| - uses: actions/checkout@v7 |
| |
| - name: Setup Rust & Java toolchain |
| uses: ./.github/actions/setup-builder |
| with: |
| rust-version: ${{ env.RUST_VERSION }} |
| jdk-version: 17 |
| |
| - name: Check Cargo fmt |
| run: | |
| cd native |
| cargo fmt --all -- --check --color=never |
| |
| - name: Check Cargo clippy |
| run: | |
| cd native |
| cargo clippy --color=never --all-targets --workspace -- -D warnings |
| |
| - name: Check benchmark compilation |
| run: | |
| cd native |
| cargo check --benches |
| |
| - name: Cache Maven dependencies |
| uses: actions/cache@v6 |
| with: |
| path: | |
| ~/.m2/repository |
| /root/.m2/repository |
| key: ${{ runner.os }}-benchmark-maven-${{ hashFiles('**/pom.xml') }} |
| restore-keys: | |
| ${{ runner.os }}-benchmark-maven- |
| |
| - name: Check Scala compilation and linting |
| # Pin to spark-4.0 (Scala 2.13.16) because the default profile is now |
| # spark-4.1 / Scala 2.13.17, and semanticdb-scalac_2.13.17 is not yet |
| # published, which breaks `-Psemanticdb`. See pr_build_linux.yml for |
| # the same exclusion in the main lint matrix. |
| run: | |
| ./mvnw -B compile test-compile scalafix:scalafix -Dscalafix.mode=CHECK -Psemanticdb -Pspark-4.0 -DskipTests |