Skip to content

Commit

Permalink
Set high JVM memory for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
987Nabil committed May 28, 2024
1 parent d79808e commit 35d5bf4
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 39 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ on:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVA_OPTS: -Xms15G -Xmx15G -Xss10M -XX:MaxMetaspaceSize=2G -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
JVM_OPTS: -Xms15G -Xmx15G -Xss10M -XX:MaxMetaspaceSize=2G -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8

JAVA_OPTS: '-Xms15G -Xmx15G -Xss10M -XX:MaxMetaspaceSize=2G -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8'
JVM_OPTS: '-Xms15G -Xmx15G -Xss10M -XX:MaxMetaspaceSize=2G -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8'

jobs:
build:
Expand Down Expand Up @@ -793,7 +792,7 @@ jobs:
concurrency: ${{steps.result.outputs.concurrency}}
requests/sec: ${{steps.result.outputs.request_per_second}}
- name: Performance Report
id: perf-report
env:
Expand Down Expand Up @@ -872,7 +871,7 @@ jobs:
concurrency: ${{steps.result.outputs.concurrency}}
requests/sec: ${{steps.result.outputs.request_per_second}}
- name: Performance Report
id: perf-report
env:
Expand Down
73 changes: 39 additions & 34 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ val releaseDrafterVersion = "5"
val _ = sys.props += ("ZIOHttpLogLevel" -> Debug.ZIOHttpLogLevel)

// CI Configuration
ThisBuild / githubWorkflowEnv += ("JAVA_OPTS" -> "-Xms15G -Xmx15G -Xss10M -XX:MaxMetaspaceSize=2G -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8")
ThisBuild / githubWorkflowEnv += ("JVM_OPTS" -> "-Xms15G -Xmx15G -Xss10M -XX:MaxMetaspaceSize=2G -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8")

ThisBuild / githubWorkflowJavaVersions := Seq(
JavaSpec.graalvm(Graalvm.Distribution("graalvm"), "17"),
JavaSpec.graalvm(Graalvm.Distribution("graalvm"), "21"),
Expand Down Expand Up @@ -292,8 +295,10 @@ lazy val zioHttpGen = (project in file("zio-http-gen"))
`zio-test`,
`zio-test-sbt`,
scalafmt.cross(CrossVersion.for3Use2_13),
scalametaParsers.cross(CrossVersion.for3Use2_13).exclude("org.scala-lang.modules", "scala-collection-compat_2.13"),
`zio-json-yaml` % Test
scalametaParsers
.cross(CrossVersion.for3Use2_13)
.exclude("org.scala-lang.modules", "scala-collection-compat_2.13"),
`zio-json-yaml` % Test,
),
)
.settings(
Expand All @@ -314,8 +319,8 @@ lazy val sbtZioHttpGrpc = (project in file("sbt-zio-http-grpc"))
libraryDependencies ++= Seq(
"com.thesamet.scalapb" %% "compilerplugin" % "0.11.15",
"com.thesamet.scalapb" %% "scalapb-runtime" % "0.11.15" % "protobuf",
"com.google.protobuf" % "protobuf-java" % "4.26.1" % "protobuf"
)
"com.google.protobuf" % "protobuf-java" % "4.26.1" % "protobuf",
),
)
.settings(
libraryDependencies ++= {
Expand All @@ -329,31 +334,31 @@ lazy val sbtZioHttpGrpc = (project in file("sbt-zio-http-grpc"))
.dependsOn(zioHttpJVM, zioHttpGen)

lazy val sbtZioHttpGrpcTests = (project in file("sbt-zio-http-grpc-tests"))
.enablePlugins(LocalCodeGenPlugin)
.settings(stdSettings("sbt-zio-http-grpc-tests"))
.settings(publishSetting(false))
.settings(
Test / skip := (CrossVersion.partialVersion(scalaVersion.value) != Some((2, 12))),
libraryDependencies ++= Seq(
`zio-test-sbt`,
`zio-test`,
"com.google.protobuf" % "protobuf-java" % "4.26.1" % "protobuf",
"com.thesamet.scalapb" %% "scalapb-runtime" % "0.11.15" % "protobuf",
),
Compile / run / fork := true,
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
Compile / PB.targets := {
if (CrossVersion.partialVersion(scalaVersion.value) == Some((2, 12)))
Seq(
scalapb.gen(grpc = false) -> (Compile / sourceManaged).value,
genModule("zio.http.grpc.ZIOHttpGRPCGen$")-> (Compile / sourceManaged).value
)
else Seq.empty
},
codeGenClasspath := (sbtZioHttpGrpc / Compile / fullClasspath).value
)
.dependsOn(zioHttpJVM, sbtZioHttpGrpc)
.disablePlugins(ScalafixPlugin)
.enablePlugins(LocalCodeGenPlugin)
.settings(stdSettings("sbt-zio-http-grpc-tests"))
.settings(publishSetting(false))
.settings(
Test / skip := (CrossVersion.partialVersion(scalaVersion.value) != Some((2, 12))),
libraryDependencies ++= Seq(
`zio-test-sbt`,
`zio-test`,
"com.google.protobuf" % "protobuf-java" % "4.26.1" % "protobuf",
"com.thesamet.scalapb" %% "scalapb-runtime" % "0.11.15" % "protobuf",
),
Compile / run / fork := true,
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
Compile / PB.targets := {
if (CrossVersion.partialVersion(scalaVersion.value) == Some((2, 12)))
Seq(
scalapb.gen(grpc = false) -> (Compile / sourceManaged).value,
genModule("zio.http.grpc.ZIOHttpGRPCGen$") -> (Compile / sourceManaged).value,
)
else Seq.empty
},
codeGenClasspath := (sbtZioHttpGrpc / Compile / fullClasspath).value,
)
.dependsOn(zioHttpJVM, sbtZioHttpGrpc)
.disablePlugins(ScalafixPlugin)

lazy val zioHttpTestkit = (project in file("zio-http-testkit"))
.enablePlugins(Shading.plugins() *)
Expand Down Expand Up @@ -386,17 +391,17 @@ lazy val docs = project
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
libraryDependencies ++= Seq(
`jwt-core`,
"dev.zio" %% "zio-test" % ZioVersion,
"dev.zio" %% "zio-config" % ZioConfigVersion,
"dev.zio" %% "zio-test" % ZioVersion,
"dev.zio" %% "zio-config" % ZioConfigVersion,
"dev.zio" %% "zio-config-magnolia" % ZioConfigVersion,
"dev.zio" %% "zio-config-typesafe" % ZioConfigVersion
"dev.zio" %% "zio-config-typesafe" % ZioConfigVersion,
),
publish / skip := true,
mdocVariables ++= Map(
"ZIO_VERSION" -> ZioVersion,
"ZIO_VERSION" -> ZioVersion,
"ZIO_SCHEMA_VERSION" -> ZioSchemaVersion,
"ZIO_CONFIG_VERSION" -> ZioConfigVersion,
)
),
)
.dependsOn(zioHttpJVM)
.enablePlugins(WebsitePlugin)
Expand Down

0 comments on commit 35d5bf4

Please sign in to comment.