Compare commits

..
Author SHA1 Message Date
layue13 82b0459f4d ci: stop caching entire ~/.gradle/caches (was ~4GB)
Mirror Repository / Mirror to CNB (push) Skipped
Mirror Repository / Mirror to Gitee (push) Skipped
Java CI / build (pull_request) Successful in 12m22s
Match ForestryMC/IC2: Gitea uses setup-gradle cache-provider external
with no whole-home actions/cache. Keep wrapper-only cache so restores
stay small on the Windows Docker runner.
2026-11-09 20:37:39 +00:00
layue13 b8305f85b0 Merge pull request 'ci: align Gradle/JDK caching with TDLM org workflows' (#16) from cursor/ci-cache-optimize-1729 into main
Mirror Repository / Mirror to CNB (push) Skipped
Mirror Repository / Mirror to Gitee (push) Skipped
Java CI / build (push) Successful in 13m8s
ci: align Gradle/JDK caching with TDLM org workflows (#16)
2026-11-09 19:57:41 +00:00
+6 -8
View File
@@ -36,25 +36,23 @@ jobs:
cache-jdk: true
# Nest mirrors github.com/gradle/actions as actions/gradle-actions (also as gradle/actions).
# v5 rejects cache-provider; v6 supports it. Default on v6 is "enhanced" (commercial) —
# on Gitea use external and cache Gradle home with actions/cache below (org IC2/Forestry pattern).
# Match ForestryMC/IC2: on Gitea use cache-provider external (no setup-gradle Actions cache).
# Do NOT actions/cache the whole ~/.gradle/caches — that hit ~4GB here and OOM'd the
# Windows Docker runner on restore; siblings never cache that tree.
- name: Setup Gradle
uses: actions/gradle-actions/setup-gradle@v6
with:
cache-cleanup: never
cache-provider: ${{ github.server_url == 'https://github.com' && 'basic' || 'external' }}
# Cache wrapper + dependency/build caches (covers what setup-gradle skips under external).
- name: Cache Gradle home
# Wrapper only (small). Dependency jars re-download when cold — same as org mod CI on Gitea.
- name: Cache Gradle wrapper
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
.gradle/wrapper-neo
key: gradle-home-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'gradle/wrapper/GradleWrapperNeo.java', '**/libs.versions.toml', '**/*.gradle.kts', '**/*.gradle') }}
restore-keys: |
gradle-home-${{ runner.os }}-
key: gradle-wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'gradle/wrapper/GradleWrapperNeo.java') }}
# Xvfb alone is not enough: JavaFX Glass needs GTK/X11 libs or Platform.startup fails with
# GtkPlatformFactory "Internal Error" and :HMCL:test can hang (looks like a checkstyle stall).