4 Commits

Author SHA1 Message Date
Readon
8df03d6a42 Merge aef775ddf1 into 766b80b3f1 2023-11-02 07:23:42 -06:00
Yindong Xiao
aef775ddf1 fix missing command of git clone. 2023-04-16 00:52:24 +08:00
Yindong Xiao
a6773349ee use mill the same version as spinalhdl. 2023-04-16 00:49:05 +08:00
Yindong Xiao
9094b6ce2a generate images that support template compiling. 2023-04-16 00:48:40 +08:00
8 changed files with 61 additions and 9 deletions

10
.github/Dockerfile vendored Normal file
View File

@@ -0,0 +1,10 @@
FROM ghcr.io/readon/spinalhdl:master
ARG JAVA_EXTRA_OPTS="-Xmx2g -Xms2g"
ENV JAVA_OPTS="${JAVA_OPTS} ${JAVA_EXTRA_OPTS}"
RUN git clone https://github.com/SpinalHDL/SpinalTemplateSbt.git && \
cd SpinalTemplateSbt && \
git submodule update --init --recursive && \
sbt compile && \
mill _.compile && \
cd .. && rm -rf SpinalTemplateSbt

43
.github/workflows/docker.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Build and Push Docker Image
on:
push:
branches:
- master
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: .github/Dockerfile
push: true
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}

View File

@@ -1 +1 @@
0.11.11 0.10.9

View File

@@ -13,7 +13,7 @@ More specifically:
* instructions to get this repository locally are available in the [Create a SpinalHDL project](https://spinalhdl.github.io/SpinalDoc-RTD/master/SpinalHDL/Getting%20Started/Install%20and%20setup.html#create-a-spinalhdl-project) section. * instructions to get this repository locally are available in the [Create a SpinalHDL project](https://spinalhdl.github.io/SpinalDoc-RTD/master/SpinalHDL/Getting%20Started/Install%20and%20setup.html#create-a-spinalhdl-project) section.
### TL;DR Things have already been set up in my environment, how do I run things to try SpinalHDL? ### TL;DR Things have arleady been set up in my environment, how do I run things to try SpinalHDL?
Once in the `SpinalTemplateSbt` directory, when tools are installed, the commands below can be run to use `sbt`. Once in the `SpinalTemplateSbt` directory, when tools are installed, the commands below can be run to use `sbt`.

View File

@@ -1,15 +1,14 @@
ThisBuild / version := "1.0" ThisBuild / version := "1.0"
ThisBuild / scalaVersion := "2.13.14" ThisBuild / scalaVersion := "2.12.18"
ThisBuild / organization := "org.example" ThisBuild / organization := "org.example"
val spinalVersion = "1.12.3" val spinalVersion = "1.9.4"
val spinalCore = "com.github.spinalhdl" %% "spinalhdl-core" % spinalVersion val spinalCore = "com.github.spinalhdl" %% "spinalhdl-core" % spinalVersion
val spinalLib = "com.github.spinalhdl" %% "spinalhdl-lib" % spinalVersion val spinalLib = "com.github.spinalhdl" %% "spinalhdl-lib" % spinalVersion
val spinalIdslPlugin = compilerPlugin("com.github.spinalhdl" %% "spinalhdl-idsl-plugin" % spinalVersion) val spinalIdslPlugin = compilerPlugin("com.github.spinalhdl" %% "spinalhdl-idsl-plugin" % spinalVersion)
lazy val projectname = (project in file(".")) lazy val projectname = (project in file("."))
.settings( .settings(
name := "myproject",
Compile / scalaSource := baseDirectory.value / "hw" / "spinal", Compile / scalaSource := baseDirectory.value / "hw" / "spinal",
libraryDependencies ++= Seq(spinalCore, spinalLib, spinalIdslPlugin) libraryDependencies ++= Seq(spinalCore, spinalLib, spinalIdslPlugin)
) )

View File

@@ -1,9 +1,9 @@
import mill._, scalalib._ import mill._, scalalib._
val spinalVersion = "1.12.3" val spinalVersion = "1.9.0"
object projectname extends SbtModule { object projectname extends SbtModule {
def scalaVersion = "2.13.14" def scalaVersion = "2.12.16"
override def millSourcePath = os.pwd override def millSourcePath = os.pwd
def sources = T.sources( def sources = T.sources(
millSourcePath / "hw" / "spinal" millSourcePath / "hw" / "spinal"

View File

@@ -9,7 +9,7 @@ object Config {
defaultConfigForClockDomains = ClockDomainConfig( defaultConfigForClockDomains = ClockDomainConfig(
resetActiveLevel = HIGH resetActiveLevel = HIGH
), ),
onlyStdLogicVectorAtTopLevelIo = false onlyStdLogicVectorAtTopLevelIo = true
) )
def sim = SimConfig.withConfig(spinal).withFstWave def sim = SimConfig.withConfig(spinal).withFstWave

View File

@@ -1 +1 @@
sbt.version=1.10.2 sbt.version=1.6.0