Repository navigation
Harden buildAll CI against stale Gradle and NeoForm caches - #34
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Chronos
buildAllcould false-green locally and in CI after NeoForge/Minecraft pin bumps because:actions/setup-javaGradle cache keys hash**/*.gradle*and wrapper files by default, but not Chronos pin manifests likegradle/chronos-compile-groups.json. Changes to NeoForge/Minecraft versions or ModDev plugin version ingradle.properties(e.g.neoforge.moddev.plugin.version) could reuse a stale~/.gradledependency cache from a previous pin.~/.gradleincludes Gradle build cache and ModDev NeoForm (NFRT) caches, socreateMinecraftArtifactscan skip recompilation and hide real breakages (e.g. HolderSet / NeoForge#3490 requiring MDG 2.0.147).What changed
1. Explicit
cache-dependency-pathon everysetup-javastep withcache: gradleBoth the
build-rust-host-nativematrix and thebuild-alljob now hash:**/*.gradle***/gradle-wrapper.properties**/gradle.propertiesgradle/**(covers compile-groups, java-matrix, forge-pack-format, shell-slices, versions catalogs, and any future pin files undergradle/)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-allonlyThe
Run buildAllstep 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 satisfyingcreateMinecraftArtifacts/ compile tasks from a previous pinRust host-native matrix jobs are unchanged aside from the broader cache key; they still benefit from dependency caching when pins are stable.
Tradeoff
build-alljob is slower when caches miss or NeoForm always runs colder; this is intentional — reliability over speed for the full mod matrix build.--rerun-taskson the fullbuildAllgraph; disabling NeoForm cache +--no-build-cacheis the intended balance.