From 53d23ffdafbb8315b96f9836ec331ad57420be9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20ALLART?= Date: Thu, 20 Oct 2022 22:05:35 +0200 Subject: [PATCH 1/7] docs: add spinal.sim to unidoc --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index fa942c43a3..b7d7c3f518 100644 --- a/build.sbt +++ b/build.sbt @@ -72,7 +72,7 @@ lazy val all = (project in file(".")) version := SpinalVersion.all, publishArtifact := false, publishLocal := {}, - ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(lib, core) + ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(lib, core, sim) ) .aggregate(sim, idslpayload, idslplugin, core, lib, debugger, tester) From 4c2aa37fa1a767eec8e7ab0771c1407f95887279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20ALLART?= Date: Thu, 20 Oct 2022 22:06:03 +0200 Subject: [PATCH 2/7] build: increment Scala version 2.11.12 -> 2.12.13 It makes scaladoc more beautiful --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index b7d7c3f518..a2b0b42506 100644 --- a/build.sbt +++ b/build.sbt @@ -7,7 +7,7 @@ val defaultSettings = Defaults.coreDefaultSettings ++ xerial.sbt.Sonatype.sonaty organization := "com.github.spinalhdl", version := SpinalVersion.all, crossScalaVersions := SpinalVersion.compilers, - scalaVersion := SpinalVersion.compilers(0), + scalaVersion := SpinalVersion.compilers(1), scalacOptions ++= Seq("-unchecked","-target:jvm-1.8"/*, "-feature" ,"-deprecation"*/), javacOptions ++= Seq("-source", "1.8", "-target", "1.8"), fork := true, From 8b614a767c6bf00f1021d0ddab524f68614804b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20ALLART?= Date: Thu, 20 Oct 2022 22:09:57 +0200 Subject: [PATCH 3/7] docs: fix warning in LiteralBuilder's scaladoc --- core/src/main/scala/spinal/core/core.scala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/src/main/scala/spinal/core/core.scala b/core/src/main/scala/spinal/core/core.scala index 73e87fb8b6..0ba7666136 100644 --- a/core/src/main/scala/spinal/core/core.scala +++ b/core/src/main/scala/spinal/core/core.scala @@ -252,10 +252,9 @@ package object core extends BaseTypeFactory with BaseTypeCast { implicit def BigIntToBits(that: BigInt): Bits = B(that) - /** - * Literal builder S/U/B"[[size']base]value” + /** Literal builder {{{ S/U/B"[[size']base]value" }}} * - * e.g. : B"8'xFF" + * e.g.: {{{ B"8'xFF"` }}} */ implicit class LiteralBuilder(private val sc: StringContext) { @@ -562,4 +561,4 @@ package object core extends BaseTypeFactory with BaseTypeCast { object LITTLE extends Endianness /** Big-Endian */ object BIG extends Endianness -} \ No newline at end of file +} From e28d32263a138b4fb93fc89621b9d485590bd489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20ALLART?= Date: Thu, 20 Oct 2022 22:10:34 +0200 Subject: [PATCH 4/7] build: update unidoc --- project/plugin.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugin.sbt b/project/plugin.sbt index cabd21fba7..971f3d255d 100644 --- a/project/plugin.sbt +++ b/project/plugin.sbt @@ -2,7 +2,7 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0") -addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.1") +addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10") From c7f09e2e6f2532d717e9d870149b2df2bad1f969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20ALLART?= Date: Thu, 20 Oct 2022 22:46:19 +0200 Subject: [PATCH 5/7] ci: add scaladoc check to scala workflow --- .github/workflows/scala.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index be54f48868..42b4df36e4 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -20,7 +20,7 @@ jobs: - name: Run tests run: sbt "++2.11.12; testWithoutFormal" - + formal: runs-on: ubuntu-latest timeout-minutes: 90 @@ -30,8 +30,20 @@ jobs: with: submodules: 'recursive' - uses: ./.github/actions - + ############################################## - + - name: Run tests run: sbt "++2.11.12; testFormal" + + scaladoc: + runs-on: ubuntu-latest + timeout-minutes: 30 + + steps: + - uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: Build scaladoc + run: sbt unidoc From 44181cbbb905a4c328ef987e2fd3dab70baf4d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20ALLART?= Date: Thu, 20 Oct 2022 22:47:06 +0200 Subject: [PATCH 6/7] ci: add workflow to push scaladoc on gh-pages --- .github/workflows/push-docs.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/push-docs.yml diff --git a/.github/workflows/push-docs.yml b/.github/workflows/push-docs.yml new file mode 100644 index 0000000000..3ba3e6a710 --- /dev/null +++ b/.github/workflows/push-docs.yml @@ -0,0 +1,29 @@ +name: "Push scaladoc on gh-pages" + +on: + push: + branches: + - dev + release: + types: + - published + +jobs: + push-docs: + runs-on: ubuntu-latest + timeout-minutes: 30 + + steps: + - uses: actions/checkout@v2 + with: + submodules: 'recursive' + - uses: ./.github/actions + + - name: Build scaladoc + run: sbt clean compile unidoc + + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: target/scala-2.12/unidoc + target-folder: ${{ github.ref_name }} From 6784777e9bc4864629efb979c149807b04347cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20ALLART?= Date: Thu, 20 Oct 2022 22:49:07 +0200 Subject: [PATCH 7/7] build: remove outdated comments to push scaladoc --- build.sbt | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/build.sbt b/build.sbt index a2b0b42506..8bbece4b09 100644 --- a/build.sbt +++ b/build.sbt @@ -208,16 +208,3 @@ addCommandAlias("testFormal", "testOnly * -- -n spinal.tester.formal") addCommandAlias("testWithoutFormal", "testOnly * -- -l spinal.tester.formal") assembly / assemblyOutputPath := file("./release/spinalhdl.jar") - -//To publish the scala doc : -//rm -rf ghpages -//sbt clean compile unidoc -//git clone https://github.com/SpinalHDL/SpinalHDL.git -b gh-pages --depth=1 ghpages -//rm -rf ghpages/* -//cp -r target/scala-2.11/unidoc/* ghpages -//cd ghpages -//git add * -//git commit -m "publish doc" -//git push -//cd .. -//rm -rf ghpages