Add testing support for GraalVM's and OpenJ9 JVM.

This commit is contained in:
Kavin 2022-06-02 12:33:07 +01:00
parent ad736729a1
commit 1c454b4fdf
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD
3 changed files with 33 additions and 2 deletions

View file

@ -1,8 +1,8 @@
.* .*
build build
bin bin
Dockerfile Dockerfile*
Dockerfile.* docker-compose.yml
*.bat *.bat
LICENSE LICENSE
*.md *.md

View file

@ -16,6 +16,10 @@ jobs:
- testing/docker-compose.hsqldb.yml - testing/docker-compose.hsqldb.yml
- testing/docker-compose.cockroachdb.yml - testing/docker-compose.cockroachdb.yml
- testing/docker-compose.yugabytedb.yml - testing/docker-compose.yugabytedb.yml
dockerfile:
- Dockerfile
- Dockerfile.openj9
- Dockerfile.graalvm-jvm
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Create Version File - name: Create Version File
@ -25,6 +29,7 @@ jobs:
with: with:
context: . context: .
load: true load: true
file: ${{ matrix.dockerfile }}
tags: 1337kavin/piped:latest tags: 1337kavin/piped:latest
- name: Start Docker-Compose services - name: Start Docker-Compose services
run: docker-compose -f ${{ matrix.docker-compose-file }} up -d && sleep 5 run: docker-compose -f ${{ matrix.docker-compose-file }} up -d && sleep 5

26
Dockerfile.graalvm-jvm Normal file
View file

@ -0,0 +1,26 @@
FROM ghcr.io/graalvm/native-image:latest as build
WORKDIR /app/
COPY . /app/
RUN --mount=type=cache,target=/root/.gradle/caches/ \
./gradlew shadowJar
RUN jlink \
--add-modules java.base,java.logging,java.sql,java.management,java.xml,java.naming,java.desktop,jdk.crypto.ec \
--strip-debug \
--no-man-pages \
--no-header-files \
--compress=2 \
--output /javaruntime
FROM debian:stable-slim
ENV JAVA_HOME=/opt/java/openjdk
ENV PATH "${JAVA_HOME}/bin:${PATH}"
COPY --from=build /javaruntime $JAVA_HOME
WORKDIR /app/
COPY --from=build /app/build/libs/piped-1.0-all.jar .