Skip to content

Commit

Permalink
Remove march=native. Build executable outside.
Browse files Browse the repository at this point in the history
  • Loading branch information
ychescale9 committed Aug 14, 2024
1 parent 000ac53 commit dc064ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ jobs:
steps:
- uses: actions/checkout@v4

# - uses: graalvm/setup-graalvm@v1
# with:
# distribution: 'graalvm-community'
# java-version: '22'
# github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: graalvm/setup-graalvm@v1
with:
distribution: 'graalvm-community'
java-version: '22'
github-token: ${{ secrets.GITHUB_TOKEN }}

- uses: gradle/actions/setup-gradle@v4

# - name: Build GraalVM native executable
# run: ./gradlew nativeCompile --no-configuration-cache
- name: Build GraalVM native executable
run: ./gradlew nativeCompile --no-configuration-cache

- uses: docker/setup-buildx-action@v3

Expand Down
12 changes: 1 addition & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# Build stage
FROM ghcr.io/graalvm/graalvm-community:22 AS build

WORKDIR /app

COPY . .

RUN ./gradlew nativeCompile --no-configuration-cache

# Runtime stage
FROM ubuntu:latest

COPY --from=build /app/build/native/nativeCompile/kstreamlined-backend /app/kstreamlined-backend
COPY build/native/nativeCompile/kstreamlined-backend /app/kstreamlined-backend

ENTRYPOINT ["/app/kstreamlined-backend"]
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ graalvmNative {
resources.autodetect()
buildArgs(
"-R:MaxHeapSize=100m",
"-march=native",
)
}
}
Expand Down

0 comments on commit dc064ee

Please sign in to comment.