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 b2578a4 commit 7405cc3
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 21 deletions.
6 changes: 3 additions & 3 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 ]
scala: [ 2.11.12, 2.12.20, 2.13.15 ]
spark: [ 2.4.8, 3.4.3, 3.5.1 ]
exclude:
- scala: 2.11.12
spark: 3.4.3
- scala: 2.11.12
spark: 3.5.1
- scala: 2.12.19
- 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
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 7405cc3

Please sign in to comment.