Skip to content
Open
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
45 changes: 17 additions & 28 deletions .github/workflows/pr_build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ jobs:

# Fast syntactic-only scalafix check. Parses sources without compiling, so it
# surfaces version-independent style issues (e.g. RedundantSyntax) in seconds,
# long before the lint-java matrix finishes its ~3.5 min build. It also scans
# the spark-4.1 / spark-4.2 sources that lint-java skips (those profiles can't
# run -Psemanticdb yet), so it is the only gate covering them. The full rule
# set, including the semantic rules, still runs in lint-java.
# long before lint-java finishes its ~3.5 min build. It is also the only gate
# covering the Spark profiles lint-java skips: 3.4, 3.5, 4.1, and 4.2. Spark
# 4.1 / 4.2 skip lint-java because -Psemanticdb can't run against their Scala
# versions (see the note on lint-java below); the 3.x profiles are skipped to
# keep the lint matrix to a single row pinned to the latest supported Spark.
# The full rule set, including the semantic rules, runs in lint-java against
# that single profile.
scalafix-syntactic:
name: Lint Scala (syntactic)
runs-on: ubuntu-24.04
Expand All @@ -72,42 +75,28 @@ jobs:
--exclude '**/target/**' \
spark

# Semantic scalafix + prettier + working-tree check, pinned to a single
# Spark 4.0 / JDK 21 row. 4.0 is the latest Spark that can currently run
# -Psemanticdb: semanticdb-scalac for the Scala 2.13.17 / 2.13.18 patch
# versions used by spark-4.1 / spark-4.2 has not been published yet. JDK 21
# is the newest JDK in the supported test matrix. Cross-version syntactic
# coverage is provided by scalafix-syntactic above.
lint-java:
needs: lint
name: Lint Java (${{ matrix.profile.name }})
name: Lint Java (Spark 4.0, JDK 21)
runs-on: ubuntu-24.04
container:
image: amd64/rust
env:
JAVA_TOOL_OPTIONS: ${{ (matrix.profile.java_version == '17' || matrix.profile.java_version == '21') && '--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"
- name: "Spark 4.0, JDK 21"
java_version: "21"
maven_opts: "-Pspark-4.0"
# Spark 4.1 and 4.2 are intentionally absent: the lint job invokes -Psemanticdb,
# but semanticdb-scalac for those Scala patch versions (2.13.17 / 2.13.18) is not
# yet published, so we cannot currently run scalafix against the spark-4.1 or
# spark-4.2 profiles.
fail-fast: false
JAVA_TOOL_OPTIONS: "--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"
steps:
- uses: actions/checkout@v7

- name: Setup Rust & Java toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: ${{ env.RUST_VERSION }}
jdk-version: ${{ matrix.profile.java_version }}
jdk-version: "21"

- name: Cache Maven dependencies
uses: actions/cache@v6
Expand All @@ -121,7 +110,7 @@ jobs:

- name: Run scalafix check
run: |
./mvnw -B package -DskipTests scalafix:scalafix -Dscalafix.mode=CHECK -Psemanticdb ${{ matrix.profile.maven_opts }}
./mvnw -B package -DskipTests scalafix:scalafix -Dscalafix.mode=CHECK -Psemanticdb -Pspark-4.0

- name: Setup Node.js
uses: actions/setup-node@v7
Expand Down
Loading