diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index 681468660..a2f1d12cf 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -20,3 +20,5 @@ jobs: distribution: 'adopt' - name: Run tests run: sbt test + - name: Compile benchmarks + run: sbt 'benchmark / compile' diff --git a/macros/build.sbt b/macros/build.sbt index 845443c3d..9318f97dc 100644 --- a/macros/build.sbt +++ b/macros/build.sbt @@ -14,12 +14,13 @@ 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" @@ -27,7 +28,7 @@ unmanagedSourceDirectories in Compile += { } } -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" diff --git a/math/build.sbt b/math/build.sbt index 07fd09be7..793fa0f7a 100644 --- a/math/build.sbt +++ b/math/build.sbt @@ -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") @@ -39,9 +39,6 @@ testOptions in Test += Tests.Setup(classLoader => case _: Exception => }) -fork in Test := true +Test / fork := true javaOptions := Seq("-Xmx4g", "-Xss10m") - - - diff --git a/project/Build.scala b/project/Build.scala index 45181c2a7..4e9aad5ac 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -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( @@ -63,7 +63,7 @@ object Common { }, // stuff related to publishing - publishArtifact in Test := false, + Test / publishArtifact := false, pomIncludeRepository := { _ => false }, @@ -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", diff --git a/version.sbt b/version.sbt index 7913c6026..096edd471 100644 --- a/version.sbt +++ b/version.sbt @@ -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 := {