From 9c20b52569bdc44703c1a7f4a45c7c1c4632b3f8 Mon Sep 17 00:00:00 2001 From: squid233 <60126026+squid233@users.noreply.github.com> Date: Mon, 17 Jul 2023 20:55:24 +0800 Subject: [PATCH 1/5] Configure CI for Gradle Use JDK 20 --- .github/workflows/gradle.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 816c8ccf..3d547854 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -23,7 +23,9 @@ jobs: - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@v3 with: - java-version: ${{ matrix.java }} + java-version: | + ${{ matrix.java }} + 20 distribution: 'temurin' - name: Grant execute permission for gradlew if: ${{ runner.os != 'Windows' }} From 127b254a9b6c7ffbea3b751ae67db13d3b177387 Mon Sep 17 00:00:00 2001 From: squid233 <60126026+squid233@users.noreply.github.com> Date: Mon, 17 Jul 2023 21:00:47 +0800 Subject: [PATCH 2/5] Upload build reports --- .github/workflows/gradle.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 3d547854..5b45a68d 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -34,7 +34,13 @@ jobs: uses: gradle/gradle-build-action@v2 with: arguments: build - - name: capture build artifacts + - name: Upload build reports + if: failure() + uses: actions/upload-artifact@v3 + with: + name: build-reports + path: build/reports/ + - name: Capture build artifacts if: ${{ runner.os == 'Linux' && matrix.java == '21-ea' }} uses: actions/upload-artifact@v3 with: From 994a5c5adb9a270c11e7a1a19914a0f6d827efe2 Mon Sep 17 00:00:00 2001 From: squid233 <60126026+squid233@users.noreply.github.com> Date: Mon, 17 Jul 2023 21:04:25 +0800 Subject: [PATCH 3/5] Fix build repors path --- .github/workflows/gradle.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 5b45a68d..469628a8 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -39,7 +39,9 @@ jobs: uses: actions/upload-artifact@v3 with: name: build-reports - path: build/reports/ + path: | + modules/overrungl/**/build/reports/ + modules/**/build/reports/ - name: Capture build artifacts if: ${{ runner.os == 'Linux' && matrix.java == '21-ea' }} uses: actions/upload-artifact@v3 From f882899202af679182220beb3cfeadd3eca8d7cc Mon Sep 17 00:00:00 2001 From: squid233 <60126026+squid233@users.noreply.github.com> Date: Mon, 17 Jul 2023 21:14:36 +0800 Subject: [PATCH 4/5] Figured out the problem Add --enable-preview for tests --- .github/workflows/gradle.yml | 2 +- build.gradle.kts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 469628a8..98ac2272 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -33,7 +33,7 @@ jobs: - name: Build with Gradle uses: gradle/gradle-build-action@v2 with: - arguments: build + arguments: build --no-daemon - name: Upload build reports if: failure() uses: actions/upload-artifact@v3 diff --git a/build.gradle.kts b/build.gradle.kts index c64d43c1..eb3ee69d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -147,6 +147,10 @@ subprojects { options.release.set(targetJavaVersion) } + tasks.withType { + if (enablePreview) jvmArgs("--enable-preview") + } + extensions.configure("java") { val javaVersion = JavaVersion.toVersion(targetJavaVersion) if (JavaVersion.current() < javaVersion) { From 9228ed0a2b10ea535f01faf607b8b5f22d352094 Mon Sep 17 00:00:00 2001 From: squid233 <60126026+squid233@users.noreply.github.com> Date: Mon, 17 Jul 2023 21:24:11 +0800 Subject: [PATCH 5/5] Do not run tests since we don't use JUnit --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 98ac2272..8c5e506a 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -33,7 +33,7 @@ jobs: - name: Build with Gradle uses: gradle/gradle-build-action@v2 with: - arguments: build --no-daemon + arguments: build --no-daemon -x :samples:test - name: Upload build reports if: failure() uses: actions/upload-artifact@v3