Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZIO SBT CI: Add Installing SBT Step #443

Merged
merged 1 commit into from
Dec 28, 2024
Merged
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
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
distribution: corretto
java-version: '17'
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Check all code compiles
Expand All @@ -61,6 +63,8 @@ jobs:
distribution: corretto
java-version: '17'
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Check if the site workflow is up to date
Expand All @@ -87,6 +91,8 @@ jobs:
distribution: corretto
java-version: ${{ matrix.java }}
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Git Checkout
Expand All @@ -113,6 +119,8 @@ jobs:
distribution: corretto
java-version: '17'
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Generate Readme
Expand Down Expand Up @@ -187,6 +195,8 @@ jobs:
distribution: corretto
java-version: '17'
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Release
Expand Down Expand Up @@ -216,6 +226,8 @@ jobs:
distribution: corretto
java-version: '17'
check-latest: true
- name: Setup SBT
uses: sbt/setup-sbt@v1
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Setup NodeJs
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7")

libraryDependencies += "org.snakeyaml" % "snakeyaml-engine" % "2.7"
libraryDependencies += "dev.zio" %% "zio" % "2.1.8"
libraryDependencies += "io.circe" %% "circe-yaml" % "0.16.0"
libraryDependencies += "io.circe" %% "circe-yaml" % "0.15.2"
2 changes: 1 addition & 1 deletion zio-sbt-ci/build.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
libraryDependencies += "dev.zio" %% "zio" % "2.1.8"
libraryDependencies += "io.circe" %% "circe-yaml" % "0.16.0"
libraryDependencies += "io.circe" %% "circe-yaml" % "0.15.2"
3 changes: 2 additions & 1 deletion zio-sbt-ci/src/main/scala/zio/sbt/V.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ object V {
"actions/checkout" -> "v4",
"coursier/cache-action" -> "v6",
"actions/setup-java" -> "v4",
"actions/setup-node" -> "v4"
"actions/setup-node" -> "v4",
"sbt/setup-sbt" -> "v1"
).map { case (k, v) => (k, s"$k@$v") }.apply(packageName)
}
16 changes: 15 additions & 1 deletion zio-sbt-ci/src/main/scala/zio/sbt/ZioSbtCiPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ object ZioSbtCiPlugin extends AutoPlugin {
checkout,
SetupLibuv,
SetupJava(javaVersion),
SetupSBT,
CacheDependencies
) ++ checkAllCodeCompiles ++ checkArtifactBuildProcess ++ checkWebsiteBuildProcess
}
Expand All @@ -130,7 +131,9 @@ object ZioSbtCiPlugin extends AutoPlugin {
id = "lint",
name = "Lint",
steps = (if (swapSizeGB > 0) Seq(setSwapSpace) else Seq.empty) ++
Seq(checkout, SetupLibuv, SetupJava(javaVersion), CacheDependencies) ++ checkGithubWorkflow ++ Seq(lint)
Seq(checkout, SetupLibuv, SetupJava(javaVersion), SetupSBT, CacheDependencies) ++ checkGithubWorkflow ++ Seq(
lint
)
)
)
}
Expand Down Expand Up @@ -171,6 +174,7 @@ object ZioSbtCiPlugin extends AutoPlugin {
(if (swapSizeGB > 0) Seq(setSwapSpace) else Seq.empty) ++ Seq(
SetupLibuv,
SetupJava("${{ matrix.java }}"),
SetupSBT,
CacheDependencies,
checkout
) ++ (if (javaPlatformMatrix.values.toSet.isEmpty) {
Expand Down Expand Up @@ -251,6 +255,7 @@ object ZioSbtCiPlugin extends AutoPlugin {
Seq(
SetupLibuv,
SetupJava("${{ matrix.java }}"),
SetupSBT,
CacheDependencies,
checkout,
if (javaPlatformMatrix.values.toSet.isEmpty) {
Expand Down Expand Up @@ -304,6 +309,7 @@ object ZioSbtCiPlugin extends AutoPlugin {
Seq(
SetupLibuv,
SetupJava("${{ matrix.java }}"),
SetupSBT,
CacheDependencies,
checkout,
Step.SingleStep(
Expand Down Expand Up @@ -355,6 +361,7 @@ object ZioSbtCiPlugin extends AutoPlugin {
checkout,
SetupLibuv,
SetupJava(javaVersion),
SetupSBT,
CacheDependencies,
generateReadme,
Step.SingleStep(
Expand Down Expand Up @@ -434,6 +441,7 @@ object ZioSbtCiPlugin extends AutoPlugin {
checkout,
SetupLibuv,
SetupJava(javaVersion),
SetupSBT,
CacheDependencies,
release
)
Expand Down Expand Up @@ -466,6 +474,7 @@ object ZioSbtCiPlugin extends AutoPlugin {
checkout,
SetupLibuv,
SetupJava(javaVersion),
SetupSBT,
CacheDependencies,
SetupNodeJs,
publishToNpmRegistry
Expand Down Expand Up @@ -669,6 +678,11 @@ object ZioSbtCiPlugin extends AutoPlugin {
)
)

lazy val SetupSBT: Step.SingleStep = Step.SingleStep(
name = "Setup SBT",
uses = Some(ActionRef(V("sbt/setup-sbt")))
)

lazy val CacheDependencies: Step.SingleStep = Step.SingleStep(
name = "Cache Dependencies",
uses = Some(ActionRef(V("coursier/cache-action")))
Expand Down
2 changes: 1 addition & 1 deletion zio-sbt-ecosystem/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3")

libraryDependencies += "org.snakeyaml" % "snakeyaml-engine" % "2.7"
libraryDependencies += "dev.zio" %% "zio" % "2.1.8"
libraryDependencies += "io.circe" %% "circe-yaml" % "0.16.0"
libraryDependencies += "io.circe" %% "circe-yaml" % "0.15.2"
2 changes: 1 addition & 1 deletion zio-sbt-githubactions/build.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
libraryDependencies += "dev.zio" %% "zio" % "2.1.8"
libraryDependencies += "io.circe" %% "circe-yaml" % "0.16.0"
libraryDependencies += "io.circe" %% "circe-yaml" % "0.15.2"
2 changes: 1 addition & 1 deletion zio-sbt-website/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2")

libraryDependencies += "dev.zio" %% "zio" % "2.1.8"
libraryDependencies += "io.circe" %% "circe-yaml" % "0.16.0"
libraryDependencies += "io.circe" %% "circe-yaml" % "0.15.2"
Loading