Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish Chippy package

on:
workflow_dispatch:
inputs:
module:
description: "Module to publish, e.g. rocketchip.dependencies.diplomacy, chippy, rocketchip. Look at documentation for more details: https://rohkud.github.io/chippy/available-packages/"
required: true
default: rocketchip.dependencies.diplomacy
version:
description: "Version to publish, e.g. 3.0.0"
required: true

permissions:
contents: read
packages: write

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v6
with:
submodules: recursive

- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "17"

- name: Make Mill executable
run: chmod +x ./mill

- name: Set module and version
run: |
echo "MODULE=${{ github.event.inputs.module }}" >> $GITHUB_ENV
echo "CHIPPY_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV

- name: Publish selected module
env:
MILL_MAVEN_USERNAME: ${{ github.actor }}
MILL_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: |
./mill mill.javalib.MavenPublishModule/ \
--publishArtifacts "$MODULE.publishArtifacts" \
--releaseUri https://maven.pkg.github.com/ucb-substrate/chippy \
--snapshotUri https://maven.pkg.github.com/ucb-substrate/chippy
22 changes: 11 additions & 11 deletions build.mill
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ trait ChippyPublishModule extends ChippyModule, PublishModule {
}

object rocketchip extends ChippyPublishModule {
def publishVersion = "0.0.1"
def publishVersion = sys.env.getOrElse("CHIPPY_VERSION", "LOCAL-SNAPSHOT")

def moduleDir = super.moduleDir / os.up / "rocket-chip"
def resources = Task.Sources { moduleDir / "src" / "main" / "resources" }
Expand All @@ -52,7 +52,7 @@ object rocketchip extends ChippyPublishModule {
def pomSettings = makePomSettings("Hardware floating-point units written in Chisel.")

object macros extends ChippyPublishModule {
def publishVersion = "0.0.1"
def publishVersion = sys.env.getOrElse("CHIPPY_VERSION", "LOCAL-SNAPSHOT")

def mvnDeps = Seq(
mvn"org.scala-lang:scala-reflect:${scalaVersion}",
Expand All @@ -63,7 +63,7 @@ object rocketchip extends ChippyPublishModule {

object dependencies extends Module {
object cde extends ChippyPublishModule {
def publishVersion = "0.0.1"
def publishVersion = sys.env.getOrElse("CHIPPY_VERSION", "LOCAL-SNAPSHOT")
def artifactName = "cde"

def sources = Task.Sources(this.moduleDir / "cde" / "src")
Expand All @@ -80,7 +80,7 @@ object rocketchip extends ChippyPublishModule {
}

object diplomacy extends ChippyPublishModule {
def publishVersion = "0.0.1"
def publishVersion = sys.env.getOrElse("CHIPPY_VERSION", "LOCAL-SNAPSHOT")
def artifactName = "diplomacy"

def sources = Task.Sources(this.moduleDir / "diplomacy" / "src")
Expand All @@ -99,7 +99,7 @@ object rocketchip extends ChippyPublishModule {
}

object hardfloat extends ChippyPublishModule {
def publishVersion = "0.0.1"
def publishVersion = sys.env.getOrElse("CHIPPY_VERSION", "LOCAL-SNAPSHOT")
def artifactName = "hardfloat"

def sources = Task.Sources(this.moduleDir / "hardfloat" / "src")
Expand Down Expand Up @@ -127,7 +127,7 @@ object rocketchip extends ChippyPublishModule {
}

object `rocketchip-blocks` extends ChippyPublishModule {
def publishVersion = "0.0.1"
def publishVersion = sys.env.getOrElse("CHIPPY_VERSION", "LOCAL-SNAPSHOT")

def moduleDir = super.moduleDir / os.up / "rocket-chip-blocks"

Expand All @@ -144,7 +144,7 @@ object `rocketchip-blocks` extends ChippyPublishModule {
}

object `rocketchip-inclusive-cache` extends ChippyPublishModule {
def publishVersion = "0.0.1"
def publishVersion = sys.env.getOrElse("CHIPPY_VERSION", "LOCAL-SNAPSHOT")

def moduleDir = super.moduleDir / os.up / "rocket-chip-inclusive-cache"
def sources = Task.Sources(moduleDir / "design" / "craft" / "inclusivecache")
Expand All @@ -162,7 +162,7 @@ object `rocketchip-inclusive-cache` extends ChippyPublishModule {
}

object testchipip extends ChippyPublishModule {
def publishVersion = "0.0.1"
def publishVersion = sys.env.getOrElse("CHIPPY_VERSION", "LOCAL-SNAPSHOT")

def resources = Task.Sources { moduleDir / "src" / "main" / "resources" }

Expand All @@ -179,7 +179,7 @@ object testchipip extends ChippyPublishModule {
}

object constellation extends ChippyPublishModule {
def publishVersion = "0.0.1"
def publishVersion = sys.env.getOrElse("CHIPPY_VERSION", "LOCAL-SNAPSHOT")

def sources = Task.Sources(this.moduleDir / "src" / "main")

Expand All @@ -204,7 +204,7 @@ object constellation extends ChippyPublishModule {
}

object chippy extends ChippyPublishModule {
def publishVersion = "0.0.1"
def publishVersion = sys.env.getOrElse("CHIPPY_VERSION", "LOCAL-SNAPSHOT")

def moduleDeps = Seq(rocketchip.dependencies.cde, rocketchip.dependencies.diplomacy, rocketchip)

Expand All @@ -219,7 +219,7 @@ object chippy extends ChippyPublishModule {
}

object chipyard extends ChippyPublishModule {
def publishVersion = "0.0.1"
def publishVersion = sys.env.getOrElse("CHIPPY_VERSION", "LOCAL-SNAPSHOT")

def sources = Task.Sources(this.moduleDir / "src" / "main")
def resources = Task.Sources { moduleDir / "src" / "main" / "resources" }
Expand Down