Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.

Commit 2697f45

Browse files
Update CI/CD workflow with resource limits
Increased memory and CPU limits for Docker build and run commands.
1 parent adc349d commit 2697f45

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/cicd.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,16 +291,16 @@ jobs:
291291
# (from setup-graalvm) are reused across runs to minimise build time.
292292
- name: Compile native image
293293
shell: bash
294-
run: ./gradlew nativeCompile -x test --no-daemon
295-
294+
run: ./gradlew nativeCompile -x test --no-daemon -Dorg.gradle.jvmargs="-Xmx2g -XX:MaxMetaspaceSize=512m"
295+
296296
# Build a minimal Docker image from the pre-compiled native binary.
297297
# Using an inline Dockerfile avoids re-running the expensive native compile
298298
# inside Docker and leverages the runner's Gradle build cache instead.
299299
- name: Build native Docker image
300300
shell: bash
301301
run: |
302302
set -euo pipefail
303-
docker build --tag "native-validation:ci" -f - . << 'DOCKERFILE'
303+
docker build --memory="2g" --cpus="0.8" --tag "native-validation:ci" -f - . << 'DOCKERFILE'
304304
FROM debian:12-slim
305305
WORKDIR /app
306306
RUN apt-get update \
@@ -326,6 +326,8 @@ jobs:
326326
run: |
327327
docker run -d \
328328
--name native-validation \
329+
--memory="256m" \
330+
--cpus="0.3" \
329331
--network host \
330332
-e "SPRING_DATASOURCE_URL=jdbc:mysql://127.0.0.1:3306/espacogeekdb" \
331333
-e "SPRING_DATASOURCE_USERNAME=testuser" \

0 commit comments

Comments
 (0)