Skip to content

Harden buildAll CI against stale Gradle and NeoForm caches - #34

Merged
MagicJinn merged 2 commits into
mainfrom
slop/buildall-ci-reliability-2be3
Sep 16, 2026
Merged

MagicJinn merged 2 commits into
mainfrom
slop/buildall-ci-reliability-2be3

Conversation

@MagicJinn

@MagicJinn MagicJinn commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

Why

Chronos buildAll could false-green locally and in CI after NeoForge/Minecraft pin bumps because:

  1. actions/setup-java Gradle cache keys hash **/*.gradle* and wrapper files by default, but not Chronos pin manifests like gradle/chronos-compile-groups.json. Changes to NeoForge/Minecraft versions or ModDev plugin version in gradle.properties (e.g. neoforge.moddev.plugin.version) could reuse a stale ~/.gradle dependency cache from a previous pin.
  2. Restored ~/.gradle includes Gradle build cache and ModDev NeoForm (NFRT) caches, so createMinecraftArtifacts can skip recompilation and hide real breakages (e.g. HolderSet / NeoForge#3490 requiring MDG 2.0.147).

What changed

1. Explicit cache-dependency-path on every setup-java step with cache: gradle

Both the build-rust-host-native matrix and the build-all job now hash:

  • **/*.gradle*
  • **/gradle-wrapper.properties
  • **/gradle.properties
  • gradle/** (covers compile-groups, java-matrix, forge-pack-format, shell-slices, versions catalogs, and any future pin files under gradle/)

Pin or tooling version changes bust the Actions Gradle cache key while keeping dependency download caching when pins are unchanged.

2. Force fresh NeoForm / no Gradle build-cache reuse on build-all only

The Run buildAll step now passes:

  • -PneoForge.neoFormRuntime.enableCache=false — ModDev-documented property to disable NFRT internal cache (ModDevGradle README)
  • --no-build-cache — prevents cross-run restored Gradle build-cache entries from satisfying createMinecraftArtifacts / compile tasks from a previous pin

Rust host-native matrix jobs are unchanged aside from the broader cache key; they still benefit from dependency caching when pins are stable.

Tradeoff

  • build-all job is slower when caches miss or NeoForm always runs colder; this is intentional — reliability over speed for the full mod matrix build.
  • Rust matrix jobs remain fast when pins are unchanged (dependency cache still applies).
  • No --rerun-tasks on the full buildAll graph; disabling NeoForm cache + --no-build-cache is the intended balance.

cursoragent and others added 2 commits September 16, 2026 07:06
Extend setup-java Gradle cache keys to hash Chronos pin files
(compile-groups, java-matrix, etc.) and gradle.properties so
NeoForge/Minecraft pin bumps invalidate restored ~/.gradle caches.

On the build-all job only, disable ModDev NeoForm runtime cache and
pass --no-build-cache to buildAll so createMinecraftArtifacts cannot
false-green from cross-run build-cache entries after pin changes.

Co-authored-by: MagicJinn <MagicJinn@mail.com>
Co-authored-by: MagicJinn <MagicJinn@mail.com>
@MagicJinn MagicJinn mentioned this pull request Sep 16, 2026
1 of 3 tasks
@MagicJinn
MagicJinn marked this pull request as ready for review September 16, 2026 07:46
@MagicJinn
MagicJinn merged commit d444f36 into main Sep 16, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants