Skip to content

Commit

Permalink
Update ZIO SBT
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejressel committed May 27, 2024
1 parent 50dcf7a commit adfdbd0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 25 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,25 +94,24 @@ jobs:
run: sbt +test
compile-examples:
name: Compile examples
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
continue-on-error: false
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
scala:
- 2.12.19
- 2.13.14
java:
- zulu@1.17
- 3.3.3
steps:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Java and Scala
uses: olafurpg/setup-scala@v11
- name: Setup Scala
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: corretto
java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Git Checkout
Expand Down
36 changes: 20 additions & 16 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@ import BuildHelper.*
import Versions.*
import MimaSettings.mimaSettings
import sbtcrossproject.CrossPlugin.autoImport.{ CrossType, crossProject }
import zio.sbt.ZioSbtCiPlugin.{ CacheDependencies, Checkout, SetupLibuv }
import zio.sbt.githubactions.ScalaWorkflow.JavaVersion.ZuluJDK17
import zio.sbt.githubactions.ScalaWorkflow.{ JobOps, setupScala }
import zio.sbt.githubactions.{ Job, ScalaWorkflow }
import zio.sbt.ZioSbtCiPlugin.{ CacheDependencies, Checkout, SetupJava, SetupLibuv }
import zio.sbt.githubactions.OS.UbuntuLatest
import zio.sbt.githubactions.{ Job, Strategy }
import zio.sbt.githubactions.Step.SingleStep

enablePlugins(ZioSbtEcosystemPlugin, ZioSbtCiPlugin)

inThisBuild(
List(
name := "zio-logging",
ciEnabledBranches := Seq("master"),
ciTestJobs := ciTestJobs.value :+ compileExamplesJob.value,
developers := List(
name := "zio-logging",
ciEnabledBranches := Seq("master"),
ciTestJobs := ciTestJobs.value :+ compileExamplesJob.value,
developers := List(
Developer("jdegoes", "John De Goes", "john@degoes.net", url("http://degoes.net")),
Developer(
"pshemass",
Expand All @@ -25,8 +24,8 @@ inThisBuild(
),
Developer("justcoon", "Peter Kotula", "peto.kotula@yahoo.com", url("https://github.com/justcoon"))
),
zioVersion := "2.1.1",
scala213 := "2.13.14"
zioVersion := "2.1.1",
scala213 := "2.13.14"
)
)

Expand Down Expand Up @@ -255,7 +254,7 @@ lazy val docs = project
mainModuleName := (coreJVM / name).value,
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(coreJVM, slf4j, slf4jBridge, jpl),
projectStage := ProjectStage.ProductionReady,
publish / skip := true,
publish / skip := true
)
.settings(macroDefinitionSettings)
.dependsOn(coreJVM, coreJS, slf4j, slf4jBridge, jpl)
Expand All @@ -267,7 +266,7 @@ lazy val compileExamplesJob = Def.setting {
name = "Compile examples",
steps = Seq(
SetupLibuv,
setupScala(),
SetupJava(),
CacheDependencies,
Checkout.value,
SingleStep(
Expand All @@ -278,9 +277,14 @@ lazy val compileExamplesJob = Def.setting {
"examplesSlf4j2Log4j/compile benchmarks/compile"
)
)
)
).matrix(
scalaVersions = Seq(ScalaWorkflow.ScalaVersion(scala212.value), ScalaWorkflow.ScalaVersion(scala213.value)),
javaVersions = Seq(ZuluJDK17)
),
strategy = Some(
Strategy(
matrix = Map(
"scala" -> List(scala212.value, scala213.value, scala3.value)
)
)
),
runsOn = UbuntuLatest.asString
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ import com.typesafe.config.ConfigFactory
import zio.config.typesafe.TypesafeConfigProvider
import zio.http._
import zio.logging.api.http.ApiHandlers
import zio.logging.{ ConfigurableLogger, ConsoleLoggerConfig, LogAnnotation, LoggerConfigurer, makeConsoleLogger }
import zio.logging.{
ConfigurableLogger,
ConsoleLoggerConfig,
LogAnnotation,
LoggerConfigurer,
makeConsoleLogger,
ZLoggerZIOLayerOps
}
import zio.{ ExitCode, Runtime, Scope, ZIO, ZIOAppDefault, _ }

import java.util.UUID
Expand Down

0 comments on commit adfdbd0

Please sign in to comment.