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).