Skip to content

Commit

Permalink
#715 Fix Jacoco report and update Scala versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
yruslan committed Oct 7, 2024
1 parent 360ecff commit f53b507
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 26 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ jobs:
strategy:
fail-fast: false
matrix:
scala: [ 2.11.12, 2.12.19, 2.13.14 ]
spark: [ 2.4.8, 3.4.3, 3.5.1 ]
scala: [ 2.11.12, 2.12.20, 2.13.15 ]
spark: [ 2.4.8, 3.4.3, 3.5.3 ]
exclude:
- scala: 2.11.12
spark: 3.4.3
- scala: 2.11.12
spark: 3.5.1
- scala: 2.12.19
spark: 3.5.3
- scala: 2.12.20
spark: 2.4.8
- scala: 2.13.14
- scala: 2.13.15
spark: 2.4.8
name: Spark ${{matrix.spark}} on Scala ${{matrix.scala}}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/jacoco_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
# Scala 2.12 is chosen since it is supported by the most wide range of Spark versions and
# vendor distributions.
include:
- scala: 2.12.19
- scala: 2.12.20
scalaShort: "2.12"
spark: 3.3.4
overall: 0.0
Expand All @@ -60,7 +60,7 @@ jobs:
run: sbt ++${{matrix.scala}} jacoco -DSPARK_VERSION=${{matrix.spark}}
- name: Add coverage of 'cobol-parser' to PR
id: jacocoParser
uses: madrapps/jacoco-report@v1.3
uses: madrapps/jacoco-report@v1.7.1
with:
paths: >
${{ github.workspace }}/cobol-parser/target/scala-${{ matrix.scalaShort }}/jacoco/report/jacoco.xml
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,15 @@ Creating an uber jar for Cobrix is very easy. Steps to build:
sbt -DSPARK_VERSION="2.4.8" ++2.11.12 assembly

# For Scala 2.12
sbt -DSPARK_VERSION="2.4.8" ++2.12.19 assembly
sbt -DSPARK_VERSION="3.1.3" ++2.12.19 assembly
sbt -DSPARK_VERSION="3.2.3" ++2.12.19 assembly
sbt -DSPARK_VERSION="3.3.2" ++2.12.19 assembly
sbt -DSPARK_VERSION="3.4.0" ++2.12.19 assembly
sbt -DSPARK_VERSION="2.4.8" ++2.12.20 assembly
sbt -DSPARK_VERSION="3.1.3" ++2.12.20 assembly
sbt -DSPARK_VERSION="3.2.3" ++2.12.20 assembly
sbt -DSPARK_VERSION="3.3.2" ++2.12.20 assembly
sbt -DSPARK_VERSION="3.4.0" ++2.12.20 assembly

# For Scala 2.13
sbt -DSPARK_VERSION="3.3.2" ++2.13.14 assembly
sbt -DSPARK_VERSION="3.4.0" ++2.13.14 assembly
sbt -DSPARK_VERSION="3.3.2" ++2.13.15 assembly
sbt -DSPARK_VERSION="3.4.0" ++2.13.15 assembly
```

You can collect the uber jar of `spark-cobol` either at
Expand All @@ -331,8 +331,8 @@ $ spark-shell --jars spark-cobol_2.12_3.3-2.7.7-SNAPSHOT-bundle.jar
> You can work around it by using default Spark version for a given Scala version:
> ```sh
> sbt ++2.11.12 assembly
> sbt ++2.12.19 assembly
> sbt ++2.13.14 assembly
> sbt ++2.12.20 assembly
> sbt ++2.13.15 assembly
> ```

## Other Features
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import ScalacOptions._
import com.github.sbt.jacoco.report.JacocoReportSettings

lazy val scala211 = "2.11.12"
lazy val scala212 = "2.12.19"
lazy val scala213 = "2.13.14"
lazy val scala212 = "2.12.20"
lazy val scala213 = "2.13.15"

ThisBuild / organization := "za.co.absa.cobrix"

Expand Down
2 changes: 1 addition & 1 deletion examples/spark-cobol-app/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ThisBuild / name := "spark-cobol-app"
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / scalaVersion := "2.12.17"

val sparkVersion = "3.5.1"
val sparkVersion = "3.5.3"
val sparkCobolVersion = "2.7.6"
val scalatestVersion = "3.2.14"

Expand Down
2 changes: 1 addition & 1 deletion examples/spark-cobol-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<scala.version>2.12.17</scala.version>
<scala.compat.version>2.12</scala.compat.version>
<scalatest.version>3.2.14</scalatest.version>
<spark.version>3.5.1</spark.version>
<spark.version>3.5.3</spark.version>
<spark.cobol.version>2.7.6</spark.cobol.version>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ object Dependencies {

private val defaultSparkVersionForScala211 = "2.4.8"
private val defaultSparkVersionForScala212 = "3.4.3"
private val defaultSparkVersionForScala213 = "3.5.1"
private val defaultSparkVersionForScala213 = "3.5.3"

def sparkFallbackVersion(scalaVersion: String): String = {
if (scalaVersion.startsWith("2.11.")) {
Expand Down
15 changes: 10 additions & 5 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@ addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.2.0")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.5")

addDependencyTreePlugin

// sbt-jacoco - workaround related dependencies required to download
lazy val ow2Version = "9.5"
lazy val jacocoVersion = "0.8.10-absa.1"
val ow2Version = "9.5"
val jacocoVersion = "0.8.11-absa.1"
val sbtJacocoVersion = "3.4.1-absa.4"
val scalaArmVersion = "2.0"

def jacocoUrl(artifactName: String): String = s"https://github.com/AbsaOSS/jacoco/releases/download/$jacocoVersion/org.jacoco.$artifactName-$jacocoVersion.jar"
def ow2Url(artifactName: String): String = s"https://repo1.maven.org/maven2/org/ow2/asm/$artifactName/$ow2Version/$artifactName-$ow2Version.jar"
def armUrl(scalaMajor: String): String = s"https://repo1.maven.org/maven2/com/jsuereth/scala-arm_$scalaMajor/$scalaArmVersion/scala-arm_$scalaMajor-$scalaArmVersion.jar"

addSbtPlugin("com.jsuereth" %% "scala-arm" % "2.0" from "https://repo1.maven.org/maven2/com/jsuereth/scala-arm_2.11/2.0/scala-arm_2.11-2.0.jar")
addSbtPlugin("com.jsuereth" %% "scala-arm" % "2.0" from "https://repo1.maven.org/maven2/com/jsuereth/scala-arm_2.12/2.0/scala-arm_2.12-2.0.jar")
addSbtPlugin("com.jsuereth" %% "scala-arm" % scalaArmVersion from armUrl("2.11"))
addSbtPlugin("com.jsuereth" %% "scala-arm" % scalaArmVersion from armUrl("2.12"))

addSbtPlugin("za.co.absa.jacoco" % "report" % jacocoVersion from jacocoUrl("report"))
addSbtPlugin("za.co.absa.jacoco" % "core" % jacocoVersion from jacocoUrl("core"))
Expand All @@ -22,4 +27,4 @@ addSbtPlugin("org.ow2.asm" % "asm" % ow2Version from ow2Url("asm"))
addSbtPlugin("org.ow2.asm" % "asm-commons" % ow2Version from ow2Url("asm-commons"))
addSbtPlugin("org.ow2.asm" % "asm-tree" % ow2Version from ow2Url("asm-tree"))

addSbtPlugin("za.co.absa.sbt" % "sbt-jacoco" % "3.4.1-absa.3" from "https://github.com/AbsaOSS/sbt-jacoco/releases/download/3.4.1-absa.3/sbt-jacoco-3.4.1-absa.3.jar")
addSbtPlugin("za.co.absa.sbt" % "sbt-jacoco" % sbtJacocoVersion from s"https://github.com/AbsaOSS/sbt-jacoco/releases/download/$sbtJacocoVersion/sbt-jacoco-$sbtJacocoVersion.jar")

0 comments on commit f53b507

Please sign in to comment.