Skip to content

Commit

Permalink
Update ZIO version (#1205)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyri-petrou authored Jan 6, 2025
1 parent 5a37352 commit b082da5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
uses: actions/[email protected]
with:
distribution: temurin
java-version: 8
java-version: 11
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
Expand All @@ -86,6 +86,9 @@ jobs:
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Install Boehm GC
if: ${{ startsWith(matrix.platform, 'Native') }}
run: sudo apt-get update && sudo apt-get install -y libgc-dev
- name: Setup Java
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -124,7 +127,7 @@ jobs:
uses: actions/[email protected]
with:
distribution: temurin
java-version: 8
java-version: 11
check-latest: true
- name: Release
run: sbt ci-release
Expand Down
12 changes: 5 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ addCommandAlias(
"zioJsonNative/test; zioJsonInteropScalaz7xNative/test"
)

val zioVersion = "2.1.7"
val zioVersion = "2.1.14"

lazy val zioJsonRoot = project
.in(file("."))
Expand Down Expand Up @@ -250,12 +250,11 @@ lazy val zioJson = crossProject(JSPlatform, JVMPlatform, NativePlatform)
}
}
)
.nativeSettings(Test / fork := false)
.nativeSettings(nativeSettings)
.nativeSettings(
libraryDependencies ++= Seq(
"io.github.cquiroz" %%% "scala-java-time" % scalaJavaTimeVersion
),
nativeConfig ~= { _.withMultithreading(false) }
)
)
.enablePlugins(BuildInfoPlugin)

Expand Down Expand Up @@ -314,10 +313,9 @@ lazy val zioJsonMacros = crossProject(JSPlatform, JVMPlatform, NativePlatform)
"dev.zio" %%% "zio-test" % zioVersion % "test",
"dev.zio" %%% "zio-test-sbt" % zioVersion % "test"
),
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
nativeConfig ~= { _.withMultithreading(false) }
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")
)
.nativeSettings(Test / fork := false)
.nativeSettings(nativeSettings)

lazy val zioJsonMacrosJVM = zioJsonMacros.jvm.dependsOn(zioJsonJVM)

Expand Down
15 changes: 12 additions & 3 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import sbtbuildinfo.*
import sbtbuildinfo.BuildInfoKeys.*
import sbtcrossproject.CrossPlugin.autoImport.*

import scala.scalanative.sbtplugin.ScalaNativePlugin.autoImport.*

object BuildHelper {
private val versions: Map[String, String] = {
import org.snakeyaml.engine.v2.api.{ Load, LoadSettings }
Expand Down Expand Up @@ -275,9 +277,16 @@ object BuildHelper {
)

def nativeSettings = Seq(
Test / skip := true,
doc / skip := true,
Compile / doc / sources := Seq.empty
nativeConfig ~= { cfg =>
import scala.scalanative.build.{ GC, Mode }

val os = System.getProperty("os.name").toLowerCase
// For some unknown reason, we can't run the test suites in debug mode on MacOS
if (os.contains("mac")) cfg.withMode(Mode.releaseFast)
else cfg.withGC(GC.boehm) // See https://github.com/scala-native/scala-native/issues/4032
},
scalacOptions += "-P:scalanative:genStaticForwardersForNonTopLevelObjects",
Test / fork := false
)

val scalaReflectTestSettings: List[Setting[_]] = List(
Expand Down

0 comments on commit b082da5

Please sign in to comment.