From 82b0459f4dc35d42d361a23bb327b0bd4abba3d0 Mon Sep 17 00:00:00 2001 From: layue13 Date: Mon, 9 Nov 2026 20:37:39 +0000 Subject: [PATCH] ci: stop caching entire ~/.gradle/caches (was ~4GB) 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. --- .github/workflows/gradle.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 064c0dc997..d0ee3be478 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -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). -- 2.47.3