Skip to content

Commit

Permalink
New GraalVM distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
danslapman committed Oct 12, 2023
1 parent 511c7dc commit 38d7d0b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ jobs:

runs-on: ubuntu-latest

env:
SBT_OPTS: "-Xms2048m -Xmx2048m -XX:+AlwaysPreTouch -XX:ReservedCodeCacheSize=128M -XX:MaxMetaspaceSize=512M -Xss2m -XX:+TieredCompilation -XX:+UseParallelGC"

steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -126,6 +129,7 @@ jobs:

env:
CI: true
SBT_OPTS: "-Xms1024m -Xmx1024m -XX:+AlwaysPreTouch -XX:ReservedCodeCacheSize=128M -XX:MaxMetaspaceSize=512M -Xss2m -XX:+TieredCompilation -XX:+UseParallelGC"

steps:
- uses: actions/checkout@v4
Expand All @@ -138,8 +142,8 @@ jobs:

- uses: graalvm/setup-graalvm@v1
with:
version: '22.3.1'
java-version: '17'
distribution: 'graalvm'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
Expand Down
8 changes: 0 additions & 8 deletions backend/.sbtopts
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
-J-Xms1536m
-J-Xmx1536m
-J-XX:+AlwaysPreTouch
-J-XX:ReservedCodeCacheSize=128M
-J-XX:MaxMetaspaceSize=512M
-J-Xss2m
-J-XX:+TieredCompilation
-J-XX:+UseParallelGC
-Dsbt.io.implicit.relative.glob.conversion=allow
8 changes: 5 additions & 3 deletions backend/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,11 @@ lazy val `mockingbird-native` = (project in file("mockingbird-native"))
Compile / run / mainClass := Some("ru.tinkoff.tcb.mockingbird.Mockingbird"),
Compile / packageDoc / mappings := Seq(),
GraalVMNativeImage / mainClass := Some("ru.tinkoff.tcb.mockingbird.Mockingbird"),
GraalVMNativeImage / graalVMNativeImageOptions ++= Seq("-H:+StaticExecutableWithDynamicLibC").filter(_ =>
dockerize.value
),
GraalVMNativeImage / graalVMNativeImageOptions ++= Seq(
"-J-Xmx5632m", // Required to fit native-image runtime heap in Standard GitHub-hosted runners
"-H:+StaticExecutableWithDynamicLibC",
"--gc=G1"
).filter(_ => dockerize.value),
nativeImageInstalled := true,
nativeImageAgentMerge := true,
run / javaOptions += "-Dconfig.resource=local.conf",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Args = -H:+AddAllCharsets \
-H:+BuildReport \
--no-fallback \
--initialize-at-run-time=io.netty.bootstrap.Bootstrap,\
io.netty.bootstrap.ServerBootstrap,\
Expand Down

0 comments on commit 38d7d0b

Please sign in to comment.