Skip to content

Commit

Permalink
Merge pull request #4 from numero-744/scaladoc
Browse files Browse the repository at this point in the history
Scaladoc
  • Loading branch information
numero-744 authored Oct 20, 2022
2 parents c54eebf + 6784777 commit 928ba6e
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 23 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/push-docs.yml
Original file line number Diff line number Diff line change
@@ -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 }}
18 changes: 15 additions & 3 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: Run tests
run: sbt "++2.11.12; testWithoutFormal"

formal:
runs-on: ubuntu-latest
timeout-minutes: 90
Expand All @@ -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
17 changes: 2 additions & 15 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
7 changes: 3 additions & 4 deletions core/src/main/scala/spinal/core/core.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down Expand Up @@ -562,4 +561,4 @@ package object core extends BaseTypeFactory with BaseTypeCast {
object LITTLE extends Endianness
/** Big-Endian */
object BIG extends Endianness
}
}
2 changes: 1 addition & 1 deletion project/plugin.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 928ba6e

Please sign in to comment.