-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from abs-tudelft/feature/ci
Enable CI
- Loading branch information
Showing
33 changed files
with
797 additions
and
588 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: ["main"] | ||
tags: ["v*"] | ||
pull_request: | ||
branches: ["*"] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'sbt' | ||
|
||
- name: Test | ||
run: sbt --client ci | ||
|
||
- name: Test publishing | ||
run: sbt --client publishLocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
rules = [ | ||
OrganizeImports, | ||
DisableSyntax, | ||
LeakingImplicitClassVal, | ||
NoValInForComprehension, | ||
ProcedureSyntax, | ||
ExplicitResultTypes | ||
] | ||
ExplicitResultTypes.memberKind = [ | ||
Def | ||
] | ||
OrganizeImports { | ||
coalesceToWildcardImportThreshold = 5 | ||
expandRelative = false | ||
groupExplicitlyImportedImplicitsSeparately = false | ||
groupedImports = Merge | ||
groups = ["re:javax?\\.", "scala.", "*"] | ||
importSelectorsOrder = SymbolsFirst | ||
importsOrder = Ascii | ||
removeUnused = false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version = 3.7.17 | ||
maxColumn = 120 | ||
runner.dialect = scala213Source3 | ||
preset=IntelliJ | ||
indent.extendSite = 6 | ||
align.preset=more | ||
rewrite.redundantBraces.stringInterpolation = true | ||
newlines.afterCurlyLambdaParams=squash | ||
docstrings.style = keep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,44 @@ | ||
ThisBuild / name := "Tydi-Chisel" | ||
ThisBuild / description := "Tydi-Chisel is an implementation of Tydi concepts in the Chisel HDL." | ||
ThisBuild / homepage := Some(url("https://github.com/ccromjongh/tydi-chisel")) | ||
ThisBuild / name := "Tydi-Chisel" | ||
ThisBuild / description := "Tydi-Chisel is an implementation of Tydi concepts in the Chisel HDL." | ||
ThisBuild / homepage := Some(url("https://github.com/abs-tudelft/tydi-chisel")) | ||
ThisBuild / organizationHomepage := Some(url("https://github.com/abs-tudelft/")) | ||
ThisBuild / licenses := List(License.Apache2) | ||
ThisBuild / version := "0.1.0" | ||
ThisBuild / organization := "nl.tudelft" | ||
ThisBuild / licenses := List(License.Apache2) | ||
ThisBuild / version := "0.1.0" | ||
ThisBuild / organization := "nl.tudelft" | ||
ThisBuild / organizationName := "ABS Group, Delft University of Technology" | ||
ThisBuild / startYear := Some(2023) | ||
|
||
ThisBuild / scalaVersion := "2.13.12" | ||
|
||
val chiselVersion = "5.1.0" | ||
|
||
lazy val root = (project in file(".")) | ||
.settings( | ||
name := "Tydi-Chisel", | ||
libraryDependencies += "org.chipsalliance" %% "chisel" % chiselVersion, | ||
libraryDependencies += "edu.berkeley.cs" %% "chiseltest" % "5.0.2", | ||
libraryDependencies += "org.chipsalliance" %% "chisel" % chiselVersion, | ||
libraryDependencies += "edu.berkeley.cs" %% "chiseltest" % "5.0.2", | ||
scalacOptions ++= Seq( | ||
"-language:reflectiveCalls", | ||
"-deprecation", | ||
"-feature", | ||
"-Xcheckinit", | ||
"-Ymacro-annotations", | ||
"-Ymacro-annotations" | ||
), | ||
addCompilerPlugin("org.chipsalliance" % "chisel-plugin" % chiselVersion cross CrossVersion.full), | ||
addCompilerPlugin("org.chipsalliance" % "chisel-plugin" % chiselVersion cross CrossVersion.full) | ||
) | ||
|
||
inThisBuild( | ||
List( | ||
semanticdbEnabled := true, | ||
semanticdbVersion := scalafixSemanticdb.revision, | ||
scalafixScalaBinaryVersion := scalaBinaryVersion.value | ||
) | ||
) | ||
|
||
val CICommands = | ||
Seq("clean", "compile", "test", "scalafmtCheckAll", "scalafmtSbtCheck", "scalafixAll --check").mkString(";") | ||
|
||
val PrepareCICommands = Seq("scalafixAll", "scalafmtAll", "scalafmtSbt").mkString(";") | ||
|
||
addCommandAlias("ci", CICommands) | ||
|
||
addCommandAlias("preCI", PrepareCICommands) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
logLevel := Level.Warn | ||
|
||
// Code quality | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") | ||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ object Main { | |
def main(args: Array[String]): Unit = { | ||
println("Hello world!") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.