mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Merge pull request #549 from TeamPiped/java-19
Attempt to migrate to Java 19.
This commit is contained in:
commit
04bc80f6c8
10 changed files with 63 additions and 61 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -11,7 +11,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java: [ 17 ]
|
||||
java: [ 19 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
@ -20,7 +20,6 @@ jobs:
|
|||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
distribution: temurin
|
||||
check-latest: true
|
||||
cache: "gradle"
|
||||
- name: Run Build
|
||||
run: ./gradlew build
|
||||
|
|
8
.github/workflows/docker-build-test.yml
vendored
8
.github/workflows/docker-build-test.yml
vendored
|
@ -21,17 +21,17 @@ jobs:
|
|||
dockerfile:
|
||||
- Dockerfile.ci
|
||||
- Dockerfile.openj9.ci
|
||||
- Dockerfile.graalvm-jvm.ci
|
||||
# - Dockerfile.graalvm-jvm.ci
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Create Version File
|
||||
run: echo $(git log -1 --date=short --pretty=format:%cd)-$(git rev-parse --short HEAD) > VERSION
|
||||
- name: set up JDK 17
|
||||
- name: set up JDK 19
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 17
|
||||
java-version: 19
|
||||
distribution: temurin
|
||||
check-latest: true
|
||||
cache: "gradle"
|
||||
- name: Run Build
|
||||
run: ./gradlew shadowJar
|
||||
|
|
5
.github/workflows/docker-build.yml
vendored
5
.github/workflows/docker-build.yml
vendored
|
@ -23,12 +23,11 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- name: Create Version File
|
||||
run: echo $(git log -1 --date=short --pretty=format:%cd)-$(git rev-parse --short HEAD) > VERSION
|
||||
- name: set up JDK 17
|
||||
- name: set up JDK 19
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 17
|
||||
java-version: 19
|
||||
distribution: temurin
|
||||
check-latest: true
|
||||
cache: "gradle"
|
||||
- name: Run Build
|
||||
run: ./gradlew shadowJar
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM eclipse-temurin:17-jdk AS build
|
||||
FROM eclipse-temurin:19-jdk AS build
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
|
@ -7,7 +7,7 @@ COPY . /app/
|
|||
RUN --mount=type=cache,target=/root/.gradle/caches/ \
|
||||
./gradlew shadowJar
|
||||
|
||||
FROM eclipse-temurin:17-jre
|
||||
FROM eclipse-temurin:19-jre
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
|
@ -17,4 +17,4 @@ COPY VERSION .
|
|||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD java -jar /app/piped.jar
|
||||
CMD ["java", "--enable-preview", "-jar", "/app/piped.jar"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM eclipse-temurin:17-jre
|
||||
FROM eclipse-temurin:19-jre
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
|
@ -8,4 +8,4 @@ COPY VERSION .
|
|||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD java -jar /app/piped.jar
|
||||
CMD ["java", "--enable-preview", "-jar", "/app/piped.jar"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM ibm-semeru-runtimes:open-17-jdk AS build
|
||||
FROM 1337kavin/openj9-19 AS build
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
|
@ -7,7 +7,7 @@ COPY . /app/
|
|||
RUN --mount=type=cache,target=/root/.gradle/caches/ \
|
||||
./gradlew shadowJar
|
||||
|
||||
FROM ibm-semeru-runtimes:open-17-jre
|
||||
FROM 1337kavin/openj9-19:latest-jre
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
|
@ -17,4 +17,4 @@ COPY VERSION .
|
|||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD java -server -Xmx1G -Xaggressive -XX:+UnlockExperimentalVMOptions -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseNUMA -XX:+IdleTuningGcOnIdle -Xgcpolicy:gencon -Xshareclasses:allowClasspaths -Xtune:virtualized -jar /app/piped.jar
|
||||
CMD java -server -Xmx1G -Xaggressive -XX:+UnlockExperimentalVMOptions -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseNUMA -XX:+IdleTuningGcOnIdle -Xgcpolicy:gencon -Xshareclasses:allowClasspaths -Xtune:virtualized --enable-preview -jar /app/piped.jar
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM ibm-semeru-runtimes:open-17-jre
|
||||
FROM 1337kavin/openj9-19:latest-jre
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
|
@ -8,4 +8,4 @@ COPY VERSION .
|
|||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD java -server -Xmx1G -Xaggressive -XX:+UnlockExperimentalVMOptions -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseNUMA -XX:+IdleTuningGcOnIdle -Xgcpolicy:gencon -Xshareclasses:allowClasspaths -Xtune:virtualized -jar /app/piped.jar
|
||||
CMD java -server -Xmx1G -Xaggressive -XX:+UnlockExperimentalVMOptions -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseNUMA -XX:+IdleTuningGcOnIdle -Xgcpolicy:gencon -Xshareclasses:allowClasspaths -Xtune:virtualized --enable-preview -jar /app/piped.jar
|
||||
|
|
|
@ -56,7 +56,11 @@ jar {
|
|||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).each {
|
||||
it.options.compilerArgs.add('--enable-preview')
|
||||
}
|
||||
|
||||
group = 'me.kavin.piped'
|
||||
version = '1.0'
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
sourceCompatibility = JavaVersion.VERSION_19
|
||||
targetCompatibility = JavaVersion.VERSION_19
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.function.Supplier;
|
|||
|
||||
public class Multithreading {
|
||||
|
||||
private static final ExecutorService es = Executors.newCachedThreadPool();
|
||||
private static final ExecutorService es = Executors.newVirtualThreadPerTaskExecutor();
|
||||
private static final ExecutorService esLimited = Executors
|
||||
.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 8);
|
||||
private static final ExecutorService esLimitedPubSub = Executors
|
||||
|
|
|
@ -8,7 +8,7 @@ services:
|
|||
- ./config.yugabytedb.properties:/app/config.properties
|
||||
depends_on:
|
||||
- yb-tserver
|
||||
command: [ "sh", "-c", "sleep 10 && java -jar piped.jar" ]
|
||||
command: [ "sh", "-c", "sleep 10 && java --enable-preview -jar piped.jar" ]
|
||||
yb-master:
|
||||
image: yugabytedb/yugabyte:latest
|
||||
command:
|
||||
|
|
Loading…
Reference in a new issue