Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SBT project changes #167

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .github/workflows/core-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
spark: ["3.0.1", "3.1.3", "3.2.4", "3.3.4"]
spark: ["3.0.3", "3.1.3", "3.2.4", "3.3.4", "3.4.3", "3.5.3"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unsafe-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
spark: ["3.2.4", "3.3.4"]
spark: ["3.0.3", "3.1.3", "3.2.4", "3.3.4"]
alfonsorr marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand Down
26 changes: 19 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import scala.language.postfixOps

Compile / scalafmtOnCompile := true

organization := "com.github.mrpowers"
name := "spark-daria"

version := "1.2.3"

crossScalaVersions := Seq("2.12.15", "2.13.8")
scalaVersion := "2.12.15"

val versionRegex = """^(.*)\.(.*)\.(.*)$""".r

val scala2_13 = "2.13.14"
val scala2_13 = "2.13.15"
val scala2_12 = "2.12.20"

val sparkVersion = System.getProperty("spark.testVersion", "3.3.4")
crossScalaVersions := {
sparkVersion match {
case versionRegex("3", m, _) if m.toInt >= 2 => Seq(scala2_12, scala2_13)
case versionRegex("3", _, _) => Seq(scala2_12)
case versionRegex("4", _, _) => Seq(scala2_13)
}
}

Expand All @@ -32,9 +32,9 @@ lazy val commonSettings = Seq(
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-sql" % sparkVersion % "provided",
"org.apache.spark" %% "spark-mllib" % sparkVersion % "provided",
"com.github.mrpowers" %% "spark-fast-tests" % "1.1.0" % "test",
"com.lihaoyi" %% "utest" % "0.7.11" % "test",
"com.lihaoyi" %% "os-lib" % "0.8.0" % "test"
"com.github.mrpowers" %% "spark-fast-tests" % "1.3.0" % "test",
"com.lihaoyi" %% "utest" % "0.8.2" % "test",
"com.lihaoyi" %% "os-lib" % "0.10.3" % "test"
),
)

Expand All @@ -48,6 +48,18 @@ lazy val unsafe = (project in file("unsafe"))
.settings(
commonSettings,
name := "unsafe",
Compile / unmanagedSourceDirectories ++= {
sparkVersion match {
case versionRegex(mayor, minor, _) =>
(Compile / sourceDirectory).value ** s"*spark_*$mayor.$minor*" / "scala" get
}
},
Test / unmanagedSourceDirectories ++= {
sparkVersion match {
case versionRegex(mayor, minor, _) =>
(Compile / sourceDirectory).value ** s"*spark_*$mayor.$minor*" / "scala" get
}
},
)

testFrameworks += new TestFramework("com.github.mrpowers.spark.daria.CustomFramework")
Expand Down
Loading