Skip to content

Commit

Permalink
ci: try to fix docker memory
Browse files Browse the repository at this point in the history
  • Loading branch information
QuadStingray committed Oct 11, 2023
1 parent 232fb26 commit e397613
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/all_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ jobs:
- name: Docker Info
run: docker info
- name: Build Docker Container on ${{ matrix.docker-platform }}
run: docker buildx build --memory=16g --platform=${{ matrix.docker-platform }} . --tag mongocamp-server:test
run: docker buildx build --platform=${{ matrix.docker-platform }} . --tag mongocamp-server:test
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio
RUN chmod +x /mongocamp-cli/prepare-build.sh;
RUN /mongocamp-cli/prepare-build.sh;
WORKDIR /mongocamp-cli/
RUN eval "$(cs java --jvm $GRAAL_VERSION --env)"; $JAVA_HOME/bin/gu install native-image; env JAVA_OPTS="-Xmx10G -XX:-UseParallelGC" sbt clean publishLocal mongocamp-cli/graalvm-native-image:packageBin;
RUN eval "$(cs java --jvm $GRAAL_VERSION --env)"; $JAVA_HOME/bin/gu install native-image; sbt clean publishLocal mongocamp-cli/graalvm-native-image:packageBin;
# todo: reactivate build if fixed. https://github.com/oracle/graal/issues/7264
#RUN /mongocamp-cli/mongocamp-cli/target/graalvm-native-image/mongocamp-cli prepare native
RUN /mongocamp-cli/mongocamp-cli/target/graalvm-native-image/mongocamp-cli prepare cache;
Expand Down
2 changes: 1 addition & 1 deletion build_docker.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ commands += Command.command("ci-docker")((state: State) => {
val listOfPlatforms = List("linux/amd64", "linux/arm64/v8", "linux/arm64")

val containerName = s"mongocamp-server:${version.value}"
val buildCommand = s"docker buildx build --memory=16g --platform=${listOfPlatforms.mkString(",")} --tag $containerName --push ."
val buildCommand = s"docker buildx build --platform=${listOfPlatforms.mkString(",")} --tag $containerName --push ."
if (buildCommand.!(ProcessLogger(stout => state.log.info(stout), sterr => state.log.info(sterr))) != 0) {
throw new Exception(s"Not zero exit code for build base image: ${containerName}")
}
Expand Down
4 changes: 2 additions & 2 deletions mongocamp-cli/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ graalVMNativeImageOptions ++= Seq(
"-H:+ReportUnsupportedElementsAtRuntime",
"-H:+ReportExceptionStackTraces",
"--report-unsupported-elements-at-runtime",
"--trace-object-instantiation=java.io.File,java.util.jar.JarFile",
"-J-Xmx16g"
"--trace-object-instantiation=java.io.File,java.util.jar.JarFile"
// "-J-Xmx16g"
)

enablePlugins(BuildInfoPlugin)
Expand Down

0 comments on commit e397613

Please sign in to comment.