diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0debc3b..9850557 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,6 +80,19 @@ jobs: if-no-files-found: error retention-days: 14 + - name: Upload JVM crash logs + # A JVM crash writes hs_err_pid*.log into the workspace, which dies + # with the job container; keep it so the failing frame can be read. + if: failure() + uses: actions/upload-artifact@v4 + with: + name: ProLibertateGames-jvm-crash + path: | + hs_err_pid*.log + replay_pid*.log + if-no-files-found: ignore + retention-days: 14 + - name: Upload lint and test reports # Reports are most useful precisely when a step above failed. if: always() diff --git a/gradle.properties b/gradle.properties index c301034..018ef72 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,12 @@ # Project-wide Gradle settings. -org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# C1-only JIT (-XX:TieredStopAtLevel=1): the Gitea runner's JVMs have been +# crashing intermittently (SIGSEGV in HotSpot's compiler, bad Kotlin compiler +# codegen) on Zulu, Corretto and Temurin alike. Dropping C2 is the test for +# whether the optimising JIT is the trigger; it costs some build speed. The +# Kotlin daemon needs its own copy: setting its options stops it inheriting +# org.gradle.jvmargs. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -XX:TieredStopAtLevel=1 +kotlin.daemon.jvm.options=-Xmx2048m,-XX:TieredStopAtLevel=1 org.gradle.parallel=true org.gradle.caching=true