Skip to content

Commit 8053e71

Browse files
committed
Updates to build and test with Java 11 and 17
1 parent 7a00f66 commit 8053e71

2 files changed

Lines changed: 16 additions & 10 deletions

File tree

.github/workflows/build_with_scala_and_python_tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
runs-on: ubuntu-24.04
1313
strategy:
1414
matrix:
15-
python-version: [ '3.9', '3.11' ]
16-
java-version: [ 8, 11 ]
15+
python-version: [ '3.9', '3.12' ]
16+
java-version: [ 11, 17 ]
1717

1818
steps:
1919
- uses: actions/checkout@v4
@@ -34,21 +34,21 @@ jobs:
3434
- name: Run tests for all Scala versions supported
3535
run: sbt +test
3636

37-
- name: Upload sparkMeasure package for Scala 2.13 (Java 11 and Python 3.11)
38-
if: matrix.java-version == '11' && matrix.python-version == '3.11'
37+
- name: Upload sparkMeasure package for Scala 2.13 (Java 11 and Python 3.12)
38+
if: matrix.java-version == '17' && matrix.python-version == '3.12'
3939
uses: actions/upload-artifact@v4
4040
with:
4141
name: sparkMeasure package scala 2.13
4242
path: target/scala-2.13/*.jar
43-
# This upload step is conditional on Java 11 and Python 3.11
43+
# This upload step is conditional on Java 17 and Python 3.12
4444

45-
- name: Upload sparkMeasure package for Scala 2.12 (Java 8 and Python 3.11)
46-
if: matrix.java-version == '8' && matrix.python-version == '3.11'
45+
- name: Upload sparkMeasure package for Scala 2.12 (Java 11 and Python 3.12)
46+
if: matrix.java-version == '11' && matrix.python-version == '3.12'
4747
uses: actions/upload-artifact@v4
4848
with:
4949
name: sparkMeasure package scala 2.12
5050
path: target/scala-2.12/*.jar
51-
# This upload step is also conditional on Java 8 and Python 3.11
51+
# This upload step is also conditional on Java 11 and Python 3.12
5252

5353
- name: Set up Python ${{ matrix.python-version }}
5454
uses: actions/setup-python@v5

build.sbt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ isSnapshot := true
1414
val testDeps = Seq(
1515
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
1616
"org.scalatest" %% "scalatest-shouldmatchers" % "3.2.19" % Test,
17-
"com.github.tomakehurst" % "wiremock" % "2.27.2" % Test
18-
// "org.wiremock" % "wiremock" % "3.13.0" % Test
17+
"org.wiremock" % "wiremock" % "3.13.0" % Test
1918
)
2019

2120
libraryDependencies ++= Seq(
@@ -29,6 +28,13 @@ libraryDependencies ++= Seq(
2928
// This is for kafka-clients conflicting with Spark 3.5.5 jni dependency, remove with Spark 4.x
3029
dependencyOverrides += "com.github.luben" % "zstd-jni" % "1.5.5-4"
3130

31+
// This is for tests, TaskMetricsTest and StageMetricsTest need to access these java packages
32+
Test / fork := true // separate JVM so the flags are used
33+
Test / javaOptions ++= Seq(
34+
"--add-exports=java.base/sun.nio.ch=ALL-UNNAMED",
35+
"--add-opens=java.base/java.nio=ALL-UNNAMED"
36+
)
37+
3238
organization := "ch.cern.sparkmeasure"
3339
description := "sparkMeasure is a tool for performance troubleshooting of Apache Spark workloads."
3440
developers := List(Developer(

0 commit comments

Comments
 (0)