-
Notifications
You must be signed in to change notification settings - Fork 16
Release publishing flow #122
base: master
Are you sure you want to change the base?
Changes from all commits
9f6f284
c8d2812
8eed8be
32bbf50
ddcc68f
3283c4b
c40dbc6
c8d8fe3
67a43b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Pull Request | ||
on: | ||
pull_request: | ||
jobs: | ||
test: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
scala: [ "2.12.15", "2.13.8" ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: olafurpg/setup-scala@v13 | ||
with: | ||
java-version: [email protected] | ||
- uses: coursier/[email protected] | ||
- run: sbt ++${{ matrix.scala }} test | ||
|
||
format: | ||
name: Check formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: olafurpg/setup-scala@v13 | ||
with: | ||
java-version: [email protected] | ||
- run: sbt scalafmtCheckAll |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Publish Release | ||
on: | ||
push: | ||
branches: [master, main] | ||
tags: ["*"] | ||
jobs: | ||
publish: | ||
name: Publish to Sonatype Releases | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: olafurpg/setup-scala@v13 | ||
with: | ||
java-version: [email protected] | ||
- uses: coursier/[email protected] | ||
- run: sudo apt update && sudo apt install -y gnupg | ||
- run: echo $PGP_SECRET | base64 --decode | gpg --batch --import | ||
env: | ||
PGP_SECRET: ${{ secrets.PGP_SECRET }} | ||
- run: sbt +test ciReleaseTagNextVersion ciReleaseSonatype | ||
env: | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
Comment on lines
+24
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Who owns these? I'm concerned that these might be lost somewhere when one of the dev's leave. |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ Barstools | |
|
||
--- | ||
|
||
![Test](https://github.com/freechipsproject/ucb-bar/barstools/Test/badge.svg) | ||
![CI Status](https://github.com/ucb-bar/barstools/actions/workflows/publish.yml/badge.svg) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we are publishing to Sonatype, we should also update the readme to mention what needs to be added to peoples |
||
|
||
**Barstools** is a collection of useful utilities for BAR projects | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,57 @@ | ||
// See LICENSE for license details. | ||
|
||
enablePlugins(GitVersioning) | ||
addCompilerPlugin("edu.berkeley.cs" % "chisel3-plugin" % defaultVersions("chisel3") cross CrossVersion.full) | ||
|
||
val defaultVersions = Map( | ||
"chisel3" -> "3.5.1", | ||
"chisel3" -> "3.5.3", | ||
"chisel-iotesters" -> "2.5.1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Should we just bump this to 2.5.4 anyways. |
||
) | ||
|
||
organization := "edu.berkeley.cs" | ||
version := "0.4-SNAPSHOT" | ||
name := "tapeout" | ||
scalaVersion := "2.12.13" | ||
crossScalaVersions := Seq("2.12.13", "2.13.6") | ||
scalacOptions := Seq("-deprecation", "-feature", "-language:reflectiveCalls") | ||
Test / scalacOptions ++= Seq("-language:reflectiveCalls") | ||
fork := true | ||
mainClass := Some("barstools.macros.MacroCompiler") | ||
libraryDependencies ++= Seq("chisel3","chisel-iotesters").map { | ||
dep: String => "edu.berkeley.cs" %% dep % sys.props.getOrElse(dep + "Version", defaultVersions(dep)) | ||
} | ||
libraryDependencies ++= Seq( | ||
"com.typesafe.play" %% "play-json" % "2.9.2", | ||
"org.scalatest" %% "scalatest" % "3.2.9" % "test", | ||
"org.apache.logging.log4j" % "log4j-api" % "2.11.2", | ||
"org.apache.logging.log4j" % "log4j-core" % "2.11.2" | ||
lazy val buildSettings = Seq( | ||
organization := "edu.berkeley.cs", | ||
// version computed by sbt-ci-release-early | ||
name := "barstools", | ||
scalaVersion := "2.12.15", | ||
crossScalaVersions := Seq("2.12.15", "2.13.8"), | ||
scalacOptions := Seq("-deprecation", "-feature", "-language:reflectiveCalls"), | ||
|
||
Test / scalacOptions ++= Seq("-language:reflectiveCalls"), | ||
fork := true, | ||
|
||
mainClass := Some("barstools.macros.MacroCompiler"), | ||
|
||
libraryDependencies ++= (Seq("chisel3","chisel-iotesters").map { | ||
dep: String => "edu.berkeley.cs" %% dep % sys.props.getOrElse(dep + "Version", defaultVersions(dep)) | ||
}), | ||
|
||
libraryDependencies ++= Seq( | ||
"com.typesafe.play" %% "play-json" % "2.9.2", | ||
"org.apache.logging.log4j" % "log4j-api" % "2.18.0", | ||
"org.apache.logging.log4j" % "log4j-core" % "2.18.0", | ||
"org.scalatest" %% "scalatest" % "3.2.9" % "test" | ||
), | ||
|
||
resolvers ++= Seq( | ||
Resolver.sonatypeRepo("snapshots"), | ||
Resolver.sonatypeRepo("releases"), | ||
Resolver.mavenLocal | ||
) | ||
) | ||
addCompilerPlugin("edu.berkeley.cs" % "chisel3-plugin" % defaultVersions("chisel3") cross CrossVersion.full) | ||
resolvers ++= Seq( | ||
Resolver.sonatypeRepo("snapshots"), | ||
Resolver.sonatypeRepo("releases"), | ||
Resolver.mavenLocal | ||
|
||
lazy val publishSettings = Seq( | ||
scmInfo := Some(ScmInfo( | ||
url("https://github.com/ucb-bar/barstools"), | ||
"scm:[email protected]:ucb-bar/barstools.git")), | ||
licenses := List("BSD 3-Clause" -> url("https://opensource.org/licenses/BSD-3-Clause")), | ||
developers := List(Developer("edwardcwang", "Edward Wang", "", url("https://github.com/edwardcwang")), Developer("chick", "Chick Markley", "", url("https://github.com/chick"))), | ||
homepage := Some(url("https://github.com/ucb-bar/barstools/")), | ||
publishTo := sonatypePublishToBundle.value, | ||
|
||
Test / publishArtifact := false, | ||
publishMavenStyle := true | ||
) | ||
|
||
lazy val barstools = (project in file(".")) | ||
.settings(buildSettings) | ||
.settings(publishSettings) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.3.13 | ||
sbt.version=1.6.2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") | ||
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.2") | ||
addSbtPlugin("io.shiftleft" % "sbt-ci-release-early" % "2.0.32") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not related to this PR. I wonder if there is another plugin/CI-flow that auto-bumps the SBT versions, scala versions, etc (and if that is really needed). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto (see the next msg)