Skip to content

Commit

Permalink
Support Scala Native
Browse files Browse the repository at this point in the history
  • Loading branch information
kyri-petrou committed Aug 14, 2024
1 parent bd00570 commit 2763b6a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ jobs:
- ++2.12 zioQueryJVM
- ++2.13 zioQueryJVM
- ++3.3 zioQueryJVM
- ++2.12 zioQueryJS
- ++2.13 zioQueryJS
- ++3.3 zioQueryJS
- ++2.13 zioQueryNative
- ++3.3 zioQueryNative
steps:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
Expand Down
2 changes: 1 addition & 1 deletion .sbtopts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-J-Xms1G
-J-Xmx3G
-J-Xmx4G
-J-XX:+UseG1GC
14 changes: 10 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ inThisBuild(
ciTargetJavaVersions := List("11", "21"),
ciTargetScalaVersions :=
Map(
(zioQueryJVM / thisProject).value.id -> allScalas,
(zioQueryJS / thisProject).value.id -> allScalas
(zioQueryJVM / thisProject).value.id -> allScalas,
(zioQueryJS / thisProject).value.id -> List("2.13", "3.3"),
(zioQueryNative / thisProject).value.id -> List("2.13", "3.3")
),
ciReleaseJobs :=
ciReleaseJobs.value.map { job =>
Expand Down Expand Up @@ -64,7 +65,7 @@ lazy val root = project
docs
)

lazy val zioQuery = crossProject(JSPlatform, JVMPlatform)
lazy val zioQuery = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.enablePlugins(BuildInfoPlugin)
.in(file("zio-query"))
.settings(
Expand All @@ -87,7 +88,6 @@ lazy val zioQuery = crossProject(JSPlatform, JVMPlatform)
(if (scalaBinaryVersion.value == "3")
Seq()
else {

Seq(
"-opt:l:method",
"-opt:l:inline",
Expand All @@ -110,6 +110,12 @@ lazy val zioQueryJS = zioQuery.js
}
)

lazy val zioQueryNative = zioQuery.native
.settings(
scala3Settings,
nativeConfig ~= { _.withMultithreading(false) }
)

lazy val zioQueryJVM = zioQuery.jvm.settings(enableMimaSettingsJVM)

lazy val benchmarks = project
Expand Down
7 changes: 4 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ addSbtPlugin("dev.zio" % "zio-sbt-ecosystem" % zioSbtVersion)
addSbtPlugin("dev.zio" % "zio-sbt-website" % zioSbtVersion)
addSbtPlugin("dev.zio" % "zio-sbt-ci" % zioSbtVersion)

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.1.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.1.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.4")

resolvers ++= Resolver.sonatypeOssRepos("public")

0 comments on commit 2763b6a

Please sign in to comment.