diff options
| author | Jack Koenig | 2021-09-17 21:01:26 -0700 |
|---|---|---|
| committer | Jack Koenig | 2021-09-17 21:01:26 -0700 |
| commit | 5c8c19345e6711279594cf1f9ddab33623c8eba7 (patch) | |
| tree | d9d6ced3934aa4a8be3dec19ddcefe50a7a93d5a /build.sbt | |
| parent | e63b9667d89768e0ec6dc8a9153335cb48a213a7 (diff) | |
| parent | 958904cb2f2f65d02b2ab3ec6d9ec2e06d04e482 (diff) | |
Merge branch 'master' into 3.5-release
Diffstat (limited to 'build.sbt')
| -rw-r--r-- | build.sbt | 68 |
1 files changed, 54 insertions, 14 deletions
@@ -4,7 +4,8 @@ enablePlugins(SiteScaladocPlugin) val defaultVersions = Map( "firrtl" -> "edu.berkeley.cs" %% "firrtl" % "1.5-SNAPSHOT", - "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.5-SNAPSHOT" + "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.5-SNAPSHOT", + "chiseltest" -> "edu.berkeley.cs" %% "chiseltest" % "0.5-SNAPSHOT", ) lazy val commonSettings = Seq ( @@ -15,12 +16,23 @@ lazy val commonSettings = Seq ( organization := "edu.berkeley.cs", version := "3.5-SNAPSHOT", autoAPIMappings := true, - scalaVersion := "2.12.12", - crossScalaVersions := Seq("2.12.12"), - scalacOptions := Seq("-deprecation", "-feature", - ), + scalaVersion := "2.13.6", + crossScalaVersions := Seq("2.13.6", "2.12.15"), + scalacOptions := Seq("-deprecation", "-feature"), libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value, - addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full), + // Macros paradise is integrated into 2.13 but requires a scalacOption + scalacOptions ++= { + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, n)) if n >= 13 => "-Ymacro-annotations" :: Nil + case _ => Nil + } + }, + libraryDependencies ++= { + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, n)) if n >= 13 => Nil + case _ => compilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full) :: Nil + } + } ) lazy val publishSettings = Seq ( @@ -59,9 +71,9 @@ lazy val chiselSettings = Seq ( name := "chisel3", libraryDependencies ++= Seq( - "org.scalatest" %% "scalatest" % "3.1.2" % "test", - "org.scalatestplus" %% "scalacheck-1-14" % "3.1.1.1" % "test", - "com.github.scopt" %% "scopt" % "3.7.1" + "org.scalatest" %% "scalatest" % "3.2.9" % "test", + "org.scalatestplus" %% "scalacheck-1-14" % "3.2.2.0" % "test", + "com.lihaoyi" %% "os-lib" % "0.7.8", ), ) ++ ( // Tests from other projects may still run concurrently @@ -92,6 +104,16 @@ lazy val pluginScalaVersions = Seq( "2.12.10", "2.12.11", "2.12.12", + "2.12.13", + "2.12.14", + "2.12.15", + "2.13.0", + "2.13.1", + "2.13.2", + "2.13.3", + "2.13.4", + "2.13.5", + "2.13.6" ) lazy val plugin = (project in file("plugin")). @@ -107,9 +129,7 @@ lazy val plugin = (project in file("plugin")). crossTarget := { // workaround for https://github.com/sbt/sbt/issues/5097 target.value / s"scala-${scalaVersion.value}" - }, - // Only publish for Scala 2.12 - publish / skip := !scalaVersion.value.startsWith("2.12") + } ). settings( mimaPreviousArtifacts := { @@ -195,11 +215,30 @@ lazy val chisel = (project in file(".")). } else { s"v${version.value}" } - s"https://github.com/freechipsproject/chisel3/tree/$branch/€{FILE_PATH}.scala" + s"https://github.com/chipsalliance/chisel3/tree/$branch€{FILE_PATH_EXT}#L€{FILE_LINE}" } ) ) +lazy val noPluginTests = (project in file ("no-plugin-tests")). + dependsOn(chisel). + settings(commonSettings: _*). + settings(chiselSettings: _*). + settings(Seq( + // Totally don't know why GitHub Action won't introduce FIRRTL to dependency. + libraryDependencies += defaultVersions("firrtl"), + )) + +// tests elaborating and executing/formally verifying a Chisel circuit with chiseltest +lazy val integrationTests = (project in file ("integration-tests")). + dependsOn(chisel). + settings(commonSettings: _*). + settings(chiselSettings: _*). + settings(usePluginSettings: _*). + settings(Seq( + libraryDependencies += defaultVersions("chiseltest") % "test", + )) + lazy val docs = project // new documentation project .in(file("docs-target")) // important: it must not be docs/ .dependsOn(chisel) @@ -210,7 +249,8 @@ lazy val docs = project // new documentation project scalacOptions += "-language:reflectiveCalls", mdocIn := file("docs/src"), mdocOut := file("docs/generated"), - mdocExtraArguments := Seq("--cwd", "docs"), + // None of our links are hygienic because they're primarily used on the website with .html + mdocExtraArguments := Seq("--cwd", "docs", "--no-link-hygiene"), mdocVariables := Map( "BUILD_DIR" -> "docs-target" // build dir for mdoc programs to dump temp files ) |
