Skip to content

Commit

Permalink
Merge pull request #860 from bwignall/bmk_ci
Browse files Browse the repository at this point in the history
Add CI step to compile benchmark code
  • Loading branch information
dlwh authored Jul 8, 2024
2 parents 528e448 + 790399a commit 39542c3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
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", "david.lw.hall@gmail.com")),

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

0 comments on commit 39542c3

Please sign in to comment.