From d1b65eb01aceffa873e27fa8b7178e580d4427ab Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 6 Dec 2022 04:52:22 +0000 Subject: [PATCH 1/7] Bump version strings. --- build.sbt | 6 +++--- build.sc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index 675ee41d98b..5b34080fdbf 100644 --- a/build.sbt +++ b/build.sbt @@ -3,8 +3,8 @@ enablePlugins(SiteScaladocPlugin) val defaultVersions = Map( - "firrtl" -> "edu.berkeley.cs" %% "firrtl" % "1.6-SNAPSHOT", - "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.6-SNAPSHOT", + "firrtl" -> "edu.berkeley.cs" %% "firrtl" % "1.6.0-M1", + "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.6.0-M1", // chiseltest intentionally excluded so that release automation does not try to set its version // The projects using chiseltest are not published, but SBT resolves dependencies for all projects // when doing publishing and will not find a chiseltest release since chiseltest depends on @@ -17,7 +17,7 @@ lazy val commonSettings = Seq( Resolver.sonatypeRepo("releases") ), organization := "edu.berkeley.cs", - version := "3.6-SNAPSHOT", + version := "3.6.0-M1", autoAPIMappings := true, scalaVersion := "2.12.17", crossScalaVersions := Seq("2.13.10", "2.12.17"), diff --git a/build.sc b/build.sc index 717134a6ae6..23b5fa2586b 100644 --- a/build.sc +++ b/build.sc @@ -12,8 +12,8 @@ object chisel3 extends mill.Cross[chisel3CrossModule]("2.13.10", "2.12.17") // Please retain it. // Provide a managed dependency on X if -DXVersion="" is supplied on the command line. val defaultVersions = Map( - "firrtl" -> "1.6-SNAPSHOT", - "treadle" -> "1.6-SNAPSHOT" + "firrtl" -> "1.6.0-M1", + "treadle" -> "1.6.0-M1" ) def getVersion(dep: String, org: String = "edu.berkeley.cs") = { @@ -64,7 +64,7 @@ trait CommonModule extends CrossSbtModule with PublishModule with ScalafmtModule v.osLib ) ++ firrtlIvyDeps - def publishVersion = "3.6-SNAPSHOT" + def publishVersion = "3.6.0-M1" // 2.12.10 -> Array("2", "12", "10") -> "12" -> 12 protected def majorVersion = crossScalaVersion.split('.')(1).toInt From d5a3b095892b92519c54144d777daca1da20a97c Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 7 Jan 2023 19:09:32 +0000 Subject: [PATCH 2/7] Bump version strings. --- build.sbt | 6 +++--- build.sc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index 8176fb6c15e..ff99bc022a6 100644 --- a/build.sbt +++ b/build.sbt @@ -3,8 +3,8 @@ enablePlugins(SiteScaladocPlugin) val defaultVersions = Map( - "firrtl" -> "edu.berkeley.cs" %% "firrtl" % "1.6.0-M1", - "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.6.0-M1", + "firrtl" -> "edu.berkeley.cs" %% "firrtl" % "1.6.0-M2", + "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.6.0-M2", // chiseltest intentionally excluded so that release automation does not try to set its version // The projects using chiseltest are not published, but SBT resolves dependencies for all projects // when doing publishing and will not find a chiseltest release since chiseltest depends on @@ -15,7 +15,7 @@ lazy val commonSettings = Seq( resolvers ++= Resolver.sonatypeOssRepos("snapshots"), resolvers ++= Resolver.sonatypeOssRepos("releases"), organization := "edu.berkeley.cs", - version := "3.6.0-M1", + version := "3.6.0-M2", autoAPIMappings := true, scalaVersion := "2.12.17", crossScalaVersions := Seq("2.13.10", "2.12.17"), diff --git a/build.sc b/build.sc index 7f93e4a677b..584c1a95644 100644 --- a/build.sc +++ b/build.sc @@ -12,8 +12,8 @@ object chisel3 extends mill.Cross[chisel3CrossModule]("2.13.10", "2.12.17") // Please retain it. // Provide a managed dependency on X if -DXVersion="" is supplied on the command line. val defaultVersions = Map( - "firrtl" -> "1.6.0-M1", - "treadle" -> "1.6.0-M1" + "firrtl" -> "1.6.0-M2", + "treadle" -> "1.6.0-M2" ) def getVersion(dep: String, org: String = "edu.berkeley.cs") = { @@ -66,7 +66,7 @@ trait CommonModule extends CrossSbtModule with PublishModule with ScalafmtModule v.upickle ) ++ firrtlIvyDeps - def publishVersion = "3.6.0-M1" + def publishVersion = "3.6.0-M2" // 2.12.10 -> Array("2", "12", "10") -> "12" -> 12 protected def majorVersion = crossScalaVersion.split('.')(1).toInt From 9732792151875006aef39f39610a7e76b8eafc15 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 16 Feb 2023 05:35:58 +0000 Subject: [PATCH 3/7] Bump version strings. --- build.sbt | 6 +++--- build.sc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index 9be86487e96..a48d02e936d 100644 --- a/build.sbt +++ b/build.sbt @@ -3,8 +3,8 @@ enablePlugins(SiteScaladocPlugin) val defaultVersions = Map( - "firrtl" -> "edu.berkeley.cs" %% "firrtl" % "1.6.0-M2", - "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.6.0-M2", + "firrtl" -> "edu.berkeley.cs" %% "firrtl" % "1.6.0-RC1", + "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.6.0-RC1", // chiseltest intentionally excluded so that release automation does not try to set its version // The projects using chiseltest are not published, but SBT resolves dependencies for all projects // when doing publishing and will not find a chiseltest release since chiseltest depends on @@ -15,7 +15,7 @@ lazy val commonSettings = Seq( resolvers ++= Resolver.sonatypeOssRepos("snapshots"), resolvers ++= Resolver.sonatypeOssRepos("releases"), organization := "edu.berkeley.cs", - version := "3.6.0-M2", + version := "3.6.0-RC1", autoAPIMappings := true, scalaVersion := "2.12.17", crossScalaVersions := Seq("2.13.10", "2.12.17"), diff --git a/build.sc b/build.sc index 584c1a95644..68c6e1cf9e5 100644 --- a/build.sc +++ b/build.sc @@ -12,8 +12,8 @@ object chisel3 extends mill.Cross[chisel3CrossModule]("2.13.10", "2.12.17") // Please retain it. // Provide a managed dependency on X if -DXVersion="" is supplied on the command line. val defaultVersions = Map( - "firrtl" -> "1.6.0-M2", - "treadle" -> "1.6.0-M2" + "firrtl" -> "1.6.0-RC1", + "treadle" -> "1.6.0-RC1" ) def getVersion(dep: String, org: String = "edu.berkeley.cs") = { @@ -66,7 +66,7 @@ trait CommonModule extends CrossSbtModule with PublishModule with ScalafmtModule v.upickle ) ++ firrtlIvyDeps - def publishVersion = "3.6.0-M2" + def publishVersion = "3.6.0-RC1" // 2.12.10 -> Array("2", "12", "10") -> "12" -> 12 protected def majorVersion = crossScalaVersion.split('.')(1).toInt From e33d2a5e9a066e022200abc8d342b15bc23a8a10 Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 28 Feb 2023 02:14:45 +0000 Subject: [PATCH 4/7] Bump version strings. --- build.sbt | 6 +++--- build.sc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index eb147ea72d5..54c363449d5 100644 --- a/build.sbt +++ b/build.sbt @@ -3,8 +3,8 @@ enablePlugins(SiteScaladocPlugin) val defaultVersions = Map( - "firrtl" -> "edu.berkeley.cs" %% "firrtl" % "1.6.0-RC1", - "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.6.0-RC1", + "firrtl" -> "edu.berkeley.cs" %% "firrtl" % "1.6.0-RC2", + "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.6.0-RC2", // chiseltest intentionally excluded so that release automation does not try to set its version // The projects using chiseltest are not published, but SBT resolves dependencies for all projects // when doing publishing and will not find a chiseltest release since chiseltest depends on @@ -15,7 +15,7 @@ lazy val commonSettings = Seq( resolvers ++= Resolver.sonatypeOssRepos("snapshots"), resolvers ++= Resolver.sonatypeOssRepos("releases"), organization := "edu.berkeley.cs", - version := "3.6.0-RC1", + version := "3.6.0-RC2", autoAPIMappings := true, scalaVersion := "2.13.10", crossScalaVersions := Seq("2.13.10", "2.12.17"), diff --git a/build.sc b/build.sc index 0365529e0b9..2514d11c231 100644 --- a/build.sc +++ b/build.sc @@ -12,8 +12,8 @@ object chisel3 extends mill.Cross[chisel3CrossModule]("2.13.10", "2.12.17") // Please retain it. // Provide a managed dependency on X if -DXVersion="" is supplied on the command line. val defaultVersions = Map( - "firrtl" -> "1.6.0-RC1", - "treadle" -> "1.6.0-RC1" + "firrtl" -> "1.6.0-RC2", + "treadle" -> "1.6.0-RC2" ) def getVersion(dep: String, org: String = "edu.berkeley.cs") = { @@ -57,7 +57,7 @@ trait CommonModule extends CrossSbtModule with PublishModule with ScalafmtModule v.upickle ) ++ firrtlIvyDeps - def publishVersion = "3.6.0-RC1" + def publishVersion = "3.6.0-RC2" // 2.12.10 -> Array("2", "12", "10") -> "12" -> 12 protected def majorVersion = crossScalaVersion.split('.')(1).toInt From 9f3bef5e660e62a492d082d2871fb19319c3cf7b Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 5 Apr 2023 00:34:42 +0000 Subject: [PATCH 5/7] Bump version strings. --- build.sbt | 6 +++--- build.sc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index e2897affbfd..b84c48e7894 100644 --- a/build.sbt +++ b/build.sbt @@ -3,8 +3,8 @@ enablePlugins(SiteScaladocPlugin) val defaultVersions = Map( - "firrtl" -> "edu.berkeley.cs" %% "firrtl" % "1.6.0-RC2", - "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.6.0-RC2", + "firrtl" -> "edu.berkeley.cs" %% "firrtl" % "1.6.0-RC3", + "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.6.0-RC3", // chiseltest intentionally excluded so that release automation does not try to set its version // The projects using chiseltest are not published, but SBT resolves dependencies for all projects // when doing publishing and will not find a chiseltest release since chiseltest depends on @@ -15,7 +15,7 @@ lazy val commonSettings = Seq( resolvers ++= Resolver.sonatypeOssRepos("snapshots"), resolvers ++= Resolver.sonatypeOssRepos("releases"), organization := "edu.berkeley.cs", - version := "3.6.0-RC2", + version := "3.6.0-RC3", autoAPIMappings := true, scalaVersion := "2.13.10", crossScalaVersions := Seq("2.13.10", "2.12.17"), diff --git a/build.sc b/build.sc index 2514d11c231..e70e7508757 100644 --- a/build.sc +++ b/build.sc @@ -12,8 +12,8 @@ object chisel3 extends mill.Cross[chisel3CrossModule]("2.13.10", "2.12.17") // Please retain it. // Provide a managed dependency on X if -DXVersion="" is supplied on the command line. val defaultVersions = Map( - "firrtl" -> "1.6.0-RC2", - "treadle" -> "1.6.0-RC2" + "firrtl" -> "1.6.0-RC3", + "treadle" -> "1.6.0-RC3" ) def getVersion(dep: String, org: String = "edu.berkeley.cs") = { @@ -57,7 +57,7 @@ trait CommonModule extends CrossSbtModule with PublishModule with ScalafmtModule v.upickle ) ++ firrtlIvyDeps - def publishVersion = "3.6.0-RC2" + def publishVersion = "3.6.0-RC3" // 2.12.10 -> Array("2", "12", "10") -> "12" -> 12 protected def majorVersion = crossScalaVersion.split('.')(1).toInt From 8a44b25eb33a055335725ccaf06a378df5e3df55 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 14 Apr 2023 21:24:56 +0000 Subject: [PATCH 6/7] Bump version strings. --- build.sbt | 6 +++--- build.sc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index e60a967f82f..b68f8f840ab 100644 --- a/build.sbt +++ b/build.sbt @@ -6,8 +6,8 @@ addCommandAlias("fmt", "; scalafmtAll ; scalafmtSbt") addCommandAlias("fmtCheck", "; scalafmtCheckAll ; scalafmtSbtCheck") val defaultVersions = Map( - "firrtl" -> "edu.berkeley.cs" %% "firrtl" % "1.6.0-RC3", - "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.6.0-RC3", + "firrtl" -> "edu.berkeley.cs" %% "firrtl" % "1.6.0", + "treadle" -> "edu.berkeley.cs" %% "treadle" % "1.6.0", // chiseltest intentionally excluded so that release automation does not try to set its version // The projects using chiseltest are not published, but SBT resolves dependencies for all projects // when doing publishing and will not find a chiseltest release since chiseltest depends on @@ -18,7 +18,7 @@ lazy val commonSettings = Seq( resolvers ++= Resolver.sonatypeOssRepos("snapshots"), resolvers ++= Resolver.sonatypeOssRepos("releases"), organization := "edu.berkeley.cs", - version := "3.6.0-RC3", + version := "3.6.0", autoAPIMappings := true, scalaVersion := "2.13.10", crossScalaVersions := Seq("2.13.10", "2.12.17"), diff --git a/build.sc b/build.sc index e70e7508757..ac5a260bd76 100644 --- a/build.sc +++ b/build.sc @@ -12,8 +12,8 @@ object chisel3 extends mill.Cross[chisel3CrossModule]("2.13.10", "2.12.17") // Please retain it. // Provide a managed dependency on X if -DXVersion="" is supplied on the command line. val defaultVersions = Map( - "firrtl" -> "1.6.0-RC3", - "treadle" -> "1.6.0-RC3" + "firrtl" -> "1.6.0", + "treadle" -> "1.6.0" ) def getVersion(dep: String, org: String = "edu.berkeley.cs") = { @@ -57,7 +57,7 @@ trait CommonModule extends CrossSbtModule with PublishModule with ScalafmtModule v.upickle ) ++ firrtlIvyDeps - def publishVersion = "3.6.0-RC3" + def publishVersion = "3.6.0" // 2.12.10 -> Array("2", "12", "10") -> "12" -> 12 protected def majorVersion = crossScalaVersion.split('.')(1).toInt From f8378695dbcf238327c1a677200c903cc3699a92 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Mon, 24 Jun 2024 11:35:18 -0700 Subject: [PATCH 7/7] Modernize release flow based on 5.x * Pin firrtl version to 1.6.0 * Pin chiseltest version used in testing to 0.6.2 * Switch to unipublish * Remove 3.6.0 as MiMa previous version as unipublish won't work with it Will restore checks with 3.6.1 release, this is mitigated by the fact that every backport to this point has been checked. * Update Github Actions versions * Remove CI for documentation and website (handled by main branch) --- .github/workflows/backport-fixup.yml | 4 +- .../build-scala-cli-example/action.yml | 2 +- .../workflows/enable-bincompat-checking.yml | 6 +- .github/workflows/install-espresso/action.yml | 2 +- .github/workflows/release-notes.yml | 4 +- .github/workflows/scala-cli-example.yml | 6 +- .../workflows/setup-oss-cad-suite/action.yml | 2 +- .github/workflows/test.yml | 79 ++----- build.sbt | 197 ++++++++++-------- project/previous-versions.txt | 1 - 10 files changed, 145 insertions(+), 158 deletions(-) diff --git a/.github/workflows/backport-fixup.yml b/.github/workflows/backport-fixup.yml index 86b73f4e326..af96a054e22 100644 --- a/.github/workflows/backport-fixup.yml +++ b/.github/workflows/backport-fixup.yml @@ -28,7 +28,7 @@ jobs: original_pr: ${{ steps.original.outputs.pr }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Figure out backport PR number id: backport run: | @@ -57,7 +57,7 @@ jobs: if: ${{ needs.resolve_prs.outputs.original_pr }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Copy over labels env: GH_TOKEN: ${{ github.token }} diff --git a/.github/workflows/build-scala-cli-example/action.yml b/.github/workflows/build-scala-cli-example/action.yml index 6fe9fa0ed0f..0924c7c6f3d 100644 --- a/.github/workflows/build-scala-cli-example/action.yml +++ b/.github/workflows/build-scala-cli-example/action.yml @@ -26,7 +26,7 @@ runs: # Need to publishLocal to test the example - name: Publish Local shell: bash - run: sbt publishLocal + run: sbt "unipublish / publishLocal" - name: Test Scala CLI Example shell: bash run: scala-cli chisel-example.scala diff --git a/.github/workflows/enable-bincompat-checking.yml b/.github/workflows/enable-bincompat-checking.yml index 6d7e8ae7f05..b5cc9c0a8e2 100644 --- a/.github/workflows/enable-bincompat-checking.yml +++ b/.github/workflows/enable-bincompat-checking.yml @@ -37,7 +37,7 @@ jobs: branches: ${{ steps.determine-branches.outputs.branches }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Check Valid @@ -70,14 +70,14 @@ jobs: branch: ${{ fromJson(needs.determine_branches.outputs.branches) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Create file run: | VERSION=${{ needs.determine_version.outputs.version }} VERSION_NO_V=${VERSION#v} echo $VERSION_NO_V >> project/previous-versions.txt - name: Open PR - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v6 with: base: ${{ matrix.branch }} branch: bincompat/${{ matrix.branch }}/${{ needs.determine_version.outputs.version }} diff --git a/.github/workflows/install-espresso/action.yml b/.github/workflows/install-espresso/action.yml index fb1d655aafa..e43775e3df0 100644 --- a/.github/workflows/install-espresso/action.yml +++ b/.github/workflows/install-espresso/action.yml @@ -10,7 +10,7 @@ runs: using: composite steps: - id: cache-espresso - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /usr/local/bin/espresso key: espresso-${{ runner.os }}-${{ inputs.version }} diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml index f3bac67dbaa..9535763777b 100644 --- a/.github/workflows/release-notes.yml +++ b/.github/workflows/release-notes.yml @@ -18,7 +18,7 @@ on: jobs: generate_release_notes: name: Generate Release Notes - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Checkout @@ -41,7 +41,7 @@ jobs: run: echo "$CHANGELOG" >> $GITHUB_STEP_SUMMARY - name: Upload Release Notes (on release) if: github.event_name == 'release' - uses: softprops/action-gh-release@v0.1.15 + uses: softprops/action-gh-release@v2.0.5 with: body: ${{ steps.release-notes.outputs.changelog }} - name: Error on uncategorized PRs diff --git a/.github/workflows/scala-cli-example.yml b/.github/workflows/scala-cli-example.yml index 329b0f12aeb..6ef9185defa 100644 --- a/.github/workflows/scala-cli-example.yml +++ b/.github/workflows/scala-cli-example.yml @@ -12,21 +12,21 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Need to fetch full history for deriving version with: fetch-depth: 0 - name: Build and Test Scala-CLI Example uses: ./.github/workflows/build-scala-cli-example - name: Upload Example - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: chisel-example.scala path: chisel-example.scala retention-days: 7 - name: Upload To Release Page if: github.event_name == 'release' - uses: softprops/action-gh-release@v0.1.15 + uses: softprops/action-gh-release@v2.0.5 with: files: chisel-example.scala diff --git a/.github/workflows/setup-oss-cad-suite/action.yml b/.github/workflows/setup-oss-cad-suite/action.yml index 63d70e926bb..3b881db718b 100644 --- a/.github/workflows/setup-oss-cad-suite/action.yml +++ b/.github/workflows/setup-oss-cad-suite/action.yml @@ -10,7 +10,7 @@ runs: using: composite steps: - id: cache-oss-cad-suite - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: oss-cad-suite key: oss-cad-suite-${{ runner.os }}-${{ inputs.version }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 412cab69fef..3c0b35a713a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,15 +1,14 @@ name: Continuous Integration on: + workflow_dispatch: pull_request: push: + tags: + - '*' branches: - - master - - 3.6.x - - 3.5.x - - 3.4.x - - 3.3.x - - 3.2.x + - main + - '*.x' jobs: ci: @@ -25,7 +24,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Tabby OSS Cad Suite uses: ./.github/workflows/setup-oss-cad-suite - name: Install Espresso @@ -33,7 +32,7 @@ jobs: with: version: ${{ matrix.espresso }} - name: Setup Scala - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'adopt' java-version: ${{ matrix.jvm }} @@ -45,16 +44,16 @@ jobs: - name: Test run: sbt ++${{ matrix.scala }} test - name: Binary compatibility - run: sbt ++${{ matrix.scala }} mimaReportBinaryIssues + run: sbt ++${{ matrix.scala }} unipublish/mimaReportBinaryIssues doc: name: Formatting runs-on: ubuntu-20.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Scala - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'adopt' java-version: '11' @@ -66,10 +65,10 @@ jobs: integration: name: Integration Tests (w/ chiseltest) - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Tabby OSS Cad Suite uses: ./.github/workflows/setup-oss-cad-suite - name: Install Espresso @@ -77,7 +76,7 @@ jobs: - name: Install CIRCT uses: ./.github/workflows/install-circt - name: Setup Scala - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'adopt' java-version: '11' @@ -98,11 +97,11 @@ jobs: scala: [ "2.13.10", "2.12.17" ] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Tabby OSS Cad Suite uses: ./.github/workflows/setup-oss-cad-suite - name: Setup Scala - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'adopt' java-version: '11' @@ -113,48 +112,12 @@ jobs: - name: Unit Tests run: sbt ++${{ matrix.scala }} standardLibrary/test - website: - name: Build Mdoc & Website - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup Scala - uses: olafurpg/setup-scala@v10 - with: - java-version: adopt@1.8 - - name: Cache Scala - uses: coursier/cache-action@v5 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - - name: Setup Jekyll - run: | - gem install jekyll -v 4.2.0 - gem install jekyll-redirect-from - - name: Install CIRCT - uses: ./.github/workflows/install-circt - #TODO: make the microsite building include building ScalaDoc - - name: Build the docs - run: sbt doc - - name: Build the microsite - run: make -C website - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Tar built website - run: tar zcf website.tar.gz website/docs/target/site - - name: Share Built Website - uses: actions/upload-artifact@v3 - with: - name: website - path: website.tar.gz - scala-cli-example: name: Test Chisel Scala-CLI Example runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Need to fetch full history for deriving version with: fetch-depth: 0 @@ -167,7 +130,7 @@ jobs: # When adding new jobs, please add them to `needs` below check-tests: name: "check tests" - needs: [ci, integration, std, doc, website, scala-cli-example] + needs: [ci, integration, std, doc, scala-cli-example] runs-on: ubuntu-20.04 if: success() # only run if all tests have passed outputs: @@ -208,11 +171,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Install CIRCT uses: ./.github/workflows/install-circt - name: Setup Scala - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'adopt' java-version: '8' @@ -222,6 +187,8 @@ jobs: - name: Publish run: sbt -DdisableFatalWarnings ci-release env: + CI_SNAPSHOT_RELEASE: "+unipublish/publish" + CI_SONATYPE_RELEASE: "+unipublish/publishSigned" PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} PGP_SECRET: ${{ secrets.PGP_SECRET }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} diff --git a/build.sbt b/build.sbt index fdcffa60508..4b5e7f4ecd3 100644 --- a/build.sbt +++ b/build.sbt @@ -37,19 +37,10 @@ emitVersion := { IO.write(new java.io.File("version.txt"), version.value) } -val defaultVersions = Map( - "firrtl" -> "edu.berkeley.cs" %% "firrtl" % "1.6-SNAPSHOT" - // chiseltest intentionally excluded so that release automation does not try to set its version - // The projects using chiseltest are not published, but SBT resolves dependencies for all projects - // when doing publishing and will not find a chiseltest release since chiseltest depends on - // chisel3 -) - lazy val commonSettings = Seq( resolvers ++= Resolver.sonatypeOssRepos("snapshots"), resolvers ++= Resolver.sonatypeOssRepos("releases"), organization := "edu.berkeley.cs", - version := "3.6-SNAPSHOT", autoAPIMappings := true, scalaVersion := "2.13.10", crossScalaVersions := Seq("2.13.10", "2.12.17"), @@ -97,13 +88,27 @@ lazy val warningSuppression = Seq( ).mkString(",") ) +// This should only be mixed in by projects that are published +// See 'unipublish' project below lazy val publishSettings = Seq( versionScheme := Some("pvp"), publishMavenStyle := true, Test / publishArtifact := false, + pomIncludeRepository := { x => false }, + homepage := Some(url("https://www.chisel-lang.org")), + organizationHomepage := Some(url("https://www.chipsalliance.org")), + licenses := List(License.Apache2), + developers := List( + Developer("jackbackrack", "Jonathan Bachrach", "", url("http://www.eecs.berkeley.edu/~jrb/")) + ), // We are just using 'publish / skip' as a hook to run checks required for publishing, // but that are not necessarily required for local development or running testing in CI publish / skip := { + // Check that SBT Dynver can properly derive a version which requires unshallow clone + val v = version.value + if (dynverGitDescribeOutput.value.hasNoTags) { + sys.error(s"Failed to derive version from git tags. Maybe run `git fetch --unshallow`? Version: $v") + } // Check that firtool exists on the PATH so Chisel can use the version it was tested against // in error messages if (firtoolVersion.value.isEmpty) { @@ -111,22 +116,6 @@ lazy val publishSettings = Seq( } (publish / skip).value }, - pomIncludeRepository := { x => false }, - pomExtra := http://chisel.eecs.berkeley.edu/ - - - apache-v2 - https://opensource.org/licenses/Apache-2.0 - repo - - - - - jackbackrack - Jonathan Bachrach - http://www.eecs.berkeley.edu/~jrb/ - - , publishTo := { val v = version.value val nexus = "https://oss.sonatype.org/" @@ -232,17 +221,12 @@ lazy val usePluginSettings = Seq( lazy val macros = (project in file("macros")) .settings(name := "chisel3-macros") .settings(commonSettings: _*) - .settings(publishSettings: _*) .settings( - mimaPreviousArtifacts := previousVersions.value.map { version => - organization.value %% name.value % version - } + // Published as part of unipublish + publish / skip := true ) -lazy val firrtlRef = ProjectRef(workspaceDirectory / "firrtl", "firrtl") - lazy val core = (project in file("core")) - .sourceDependency(firrtlRef, defaultVersions("firrtl")) .settings(commonSettings: _*) .enablePlugins(BuildInfoPlugin) .settings( @@ -250,22 +234,16 @@ lazy val core = (project in file("core")) buildInfoUsePackageAsPath := true, buildInfoKeys := Seq[BuildInfoKey](buildInfoPackage, version, scalaVersion, sbtVersion, firtoolVersion) ) - .settings(publishSettings: _*) .settings( - mimaPreviousArtifacts := previousVersions.value.map { version => - organization.value %% name.value % version - }, - // MiMa waivers - mimaBinaryIssueFilters ++= Seq( - // Technically users could extend LitArg but its in an internal package and there is no reason to. - ProblemFilters.exclude[ReversedMissingMethodProblem]("chisel3.internal.firrtl.LitArg.cloneWithValue") - ) + // Published as part of unipublish + publish / skip := true ) .settings(warningSuppression: _*) .settings(fatalWarningsSettings: _*) .settings( name := "chisel3-core", libraryDependencies ++= Seq( + "edu.berkeley.cs" %% "firrtl" % "1.6.0", "com.lihaoyi" %% "upickle" % "2.0.0", "com.lihaoyi" %% "os-lib" % "0.8.1" ), @@ -288,7 +266,6 @@ lazy val chisel = (project in file(".")) .enablePlugins(ScalaUnidocPlugin) .settings(commonSettings: _*) .settings(chiselSettings: _*) - .settings(publishSettings: _*) .settings(usePluginSettings: _*) .dependsOn(macros) .dependsOn(core) @@ -296,51 +273,9 @@ lazy val chisel = (project in file(".")) .settings(warningSuppression: _*) .settings(fatalWarningsSettings: _*) .settings( - mimaPreviousArtifacts := previousVersions.value.map { version => - organization.value %% name.value % version - }, - Test / scalacOptions ++= Seq("-language:reflectiveCalls"), - // Forward doc command to unidoc - Compile / doc := (ScalaUnidoc / doc).value, - // Include unidoc as the ScalaDoc for publishing - Compile / packageDoc / mappings := (ScalaUnidoc / packageDoc / mappings).value, - Compile / doc / scalacOptions ++= Seq( - "-diagrams", - "-groups", - "-skip-packages", - "chisel3.internal", - "-diagrams-max-classes", - "25", - "-doc-version", - version.value, - "-doc-title", - name.value, - "-doc-root-content", - baseDirectory.value + "/root-doc.txt", - "-sourcepath", - (ThisBuild / baseDirectory).value.toString, - "-doc-source-url", { - val branch = - if (version.value.endsWith("-SNAPSHOT")) { - "master" - } else { - s"v${version.value}" - } - s"https://github.com/chipsalliance/chisel3/tree/$branch€{FILE_PATH_EXT}#L€{FILE_LINE}" - } - ) ++ - // Suppress compiler plugin for source files in core - // We don't need this in regular compile because we just don't add the chisel3-plugin to core's scalacOptions - // This works around an issue where unidoc uses the exact same arguments for all source files. - // This is probably fundamental to how ScalaDoc works so there may be no solution other than this workaround. - // See https://github.com/sbt/sbt-unidoc/issues/107 - (core / Compile / sources).value.map("-P:chiselplugin:INTERNALskipFile:" + _) - ++ { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, n)) if n >= 13 => "-implicits" :: Nil - case _ => Nil - } - } + // Published as part of unipublish + publish / skip := true, + Test / scalacOptions ++= Seq("-language:reflectiveCalls") ) // tests elaborating and executing/formally verifying a Chisel circuit with chiseltest @@ -354,10 +289,96 @@ lazy val integrationTests = (project in file("integration-tests")) .settings(usePluginSettings: _*) .settings( Seq( - libraryDependencies += "edu.berkeley.cs" %% "chiseltest" % "0.6-SNAPSHOT" % "test" + libraryDependencies += "edu.berkeley.cs" %% "chiseltest" % "0.6.2" % "test" ) ) +def addUnipublishDeps(proj: Project)(deps: Project*): Project = { + def inTestScope(module: ModuleID): Boolean = module.configurations.exists(_ == "test") + deps.foldLeft(proj) { + case (p, dep) => + p.settings( + libraryDependencies ++= (dep / libraryDependencies).value.filterNot(inTestScope), + Compile / packageBin / mappings ++= (dep / Compile / packageBin / mappings).value, + Compile / packageSrc / mappings ++= (dep / Compile / packageSrc / mappings).value + ) + } +} + +// This is a pseudo-project that unifies all compilation units (excluding the plugin) into a single artifact +// It should be used for all publishing and MiMa binary compatibility checking +lazy val unipublish = + addUnipublishDeps(project in file("unipublish"))( + macros, + core, + chisel + ) + .aggregate(plugin) // Also publish the plugin when publishing this project + .settings(name := (chisel / name).value) + .enablePlugins(ScalaUnidocPlugin) + .settings(commonSettings: _*) + .settings(publishSettings: _*) + .settings(usePluginSettings: _*) + .settings(warningSuppression: _*) + .settings(fatalWarningsSettings: _*) + .settings( + mimaPreviousArtifacts := previousVersions.value.flatMap { version => + Seq( + "edu.berkeley.cs" %% "chisel3" % version, + "edu.berkeley.cs" %% "chisel3-core" % version + ) + }, + // This is a pseudo-project with no class files, use the package jar instead + mimaCurrentClassfiles := (Compile / packageBin).value, + // MiMa waivers + mimaBinaryIssueFilters ++= Seq( + // Technically users could extend LitArg but its in an internal package and there is no reason to. + ProblemFilters.exclude[ReversedMissingMethodProblem]("chisel3.internal.firrtl.LitArg.cloneWithValue") + ), + // Forward doc command to unidoc + Compile / doc := (ScalaUnidoc / doc).value, + // Include unidoc as the ScalaDoc for publishing + Compile / packageDoc / mappings := (ScalaUnidoc / packageDoc / mappings).value, + Compile / doc / scalacOptions ++= Seq( + "-diagrams", + "-groups", + "-skip-packages", + "chisel3.internal", + "-diagrams-max-classes", + "25", + "-doc-version", + version.value, + "-doc-title", + name.value, + "-doc-root-content", + baseDirectory.value + "/root-doc.txt", + "-sourcepath", + (ThisBuild / baseDirectory).value.toString, + "-doc-source-url", { + val branch = + if (version.value.endsWith("-SNAPSHOT")) { + "master" + } else { + s"v${version.value}" + } + s"https://github.com/chipsalliance/chisel/tree/$branch€{FILE_PATH_EXT}#L€{FILE_LINE}" + }, + "-language:implicitConversions" + ) ++ + // Suppress compiler plugin for source files in core + // We don't need this in regular compile because we just don't add the chisel-plugin to core's scalacOptions + // This works around an issue where unidoc uses the exact same arguments for all source files. + // This is probably fundamental to how ScalaDoc works so there may be no solution other than this workaround. + // See https://github.com/sbt/sbt-unidoc/issues/107 + (core / Compile / sources).value.map("-P:chiselplugin:INTERNALskipFile:" + _) + ++ { + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, n)) if n >= 13 => "-implicits" :: Nil + case _ => Nil + } + } + ) + // the chisel standard library lazy val standardLibrary = (project in file("stdlib")) .dependsOn(chisel) diff --git a/project/previous-versions.txt b/project/previous-versions.txt index 40c341bdcdb..e69de29bb2d 100644 --- a/project/previous-versions.txt +++ b/project/previous-versions.txt @@ -1 +0,0 @@ -3.6.0