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

Add CI step to compile benchmark code #860

Merged
merged 2 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ jobs:
distribution: 'adopt'
- name: Run tests
run: sbt test
- name: Compile benchmarks
run: sbt 'benchmark / compile'
9 changes: 5 additions & 4 deletions macros/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,21 @@ libraryDependencies ++= {
"org.scala-lang" % "scala-reflect" % s"${scalaVersion.value}",
"org.typelevel" %% "spire" % "0.18.0"
)
case Some((3, _)) => Seq(
)
case Some((3, _)) =>
Seq(
)
case _ => ???
}
}
unmanagedSourceDirectories in Compile += {
Compile / unmanagedSourceDirectories += {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) => baseDirectory.value / "src" / "main" / "scala_2"
case Some((3, _)) => baseDirectory.value / "src" / "main" / "scala_3"
case _ => ???
}
}

unmanagedSourceDirectories in Test += {
Test / unmanagedSourceDirectories += {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) => baseDirectory.value / "src" / "test" / "scala_2"
case Some((3, _)) => baseDirectory.value / "src" / "test" / "scala_3"
Expand Down
7 changes: 2 additions & 5 deletions math/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ libraryDependencies += {
}

// see https://github.com/typesafehub/scalalogging/issues/23
testOptions in Test += Tests.Setup(classLoader =>
Test / testOptions += Tests.Setup(classLoader =>
try {
classLoader
.loadClass("org.slf4j.LoggerFactory")
Expand All @@ -39,9 +39,6 @@ testOptions in Test += Tests.Setup(classLoader =>
case _: Exception =>
})

fork in Test := true
Test / fork := true

javaOptions := Seq("-Xmx4g", "-Xss10m")



6 changes: 3 additions & 3 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ object Common {
Resolver.sonatypeRepo("releases"),
Resolver.typesafeRepo("releases")
),
testOptions in Test += Tests.Argument("-oDF"),
Test / testOptions += Tests.Argument("-oDF"),

// test dependencies
libraryDependencies ++= Seq(
Expand Down Expand Up @@ -63,7 +63,7 @@ object Common {
},

// stuff related to publishing
publishArtifact in Test := false,
Test / publishArtifact := false,
pomIncludeRepository := { _ =>
false
},
Expand All @@ -73,7 +73,7 @@ object Common {
publishTo := sonatypePublishTo.value,
sonatypeProjectHosting := Some(GitHubHosting("scalanlp", "breeze", "David Hall", "[email protected]")),

unmanagedSourceDirectories in Compile ++= {
Compile / unmanagedSourceDirectories ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 11|12)) => Seq(
baseDirectory.value / "src" / "main" / "scala_2.11_2.12",
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ git.baseVersion := "2.1.0"

val VersionRegex = "v([0-9]+.[0-9]+.[0-9]+)-?(.*)?".r

version in ThisBuild := "2.1.0"
ThisBuild / version := "2.1.0"

/*
git.gitTagToVersionNumber := {
Expand Down
Loading