User Guide
How to use Buildish Mammoth Cache for Gradle and Maven in your workflows.
The latest stable release is 0.8.4.
Buildish Mammoth Cache for Gradle and Maven is a pair of CI actions that cache the build tool’s local artifact store across workflow runs:
GRADLE_USER_HOME and provisions Gradle wrapper JARs securely before the
build starts.~/.m2 by default).Both actions share the same two-phase prepare/finalize lifecycle and support single-job and distributed multi-job topologies.
For Gradle, Mammoth also preserves entries from Gradle’s local build cache, allowing Gradle to reuse task outputs. For Maven, Mammoth caches repository artifacts; build-output caching requires a separately configured extension.
Use Adoption and Migration to choose a topology, understand costs and plan a small pilot, then follow Getting Started for workflow wiring.
In the most common setup, the action wraps a single build job: it restores the newest compatible immutable generation before the build and publishes a new complete generation after a material change. This avoids re-downloading dependencies on every run without creating duplicate entries for unchanged runs.
When a workflow runs multiple build jobs in parallel — for example, one job per subproject or one job per test suite — independent full-cache generations diverge. Restoring only the newest generation then loses the dependency downloads that exist solely in the other workers’ generations.
This action solves that with a delta exchange model:
Aggregate partitions combine workers’ contributions subject to conflict policies; single-writer metadata partitions retain their designated writer’s view. See Adoption and Migration for the coverage tradeoffs.
graph LR
BC["Base cache\n(previous run)"] --> W1 & W2 & W3
W1["Worker A\nbuild + delta"] -- "Δ artifact A" --> AGG
W2["Worker B\nbuild + delta"] -- "Δ artifact B" --> AGG
W3["Worker C\nbuild + delta"] -- "Δ artifact C" --> AGG
AGG["Aggregator\nmerge + save"] --> BC2["Base cache\n(this run)"]
Mammoth’s own code is Apache-2.0 licensed. The same license covers its cache orchestration in public and private repositories, including commercial builds. You can inspect and modify the implementation, maintain a fork, and redistribute it subject to the license conditions, including applicable license, notice and change-marking requirements. Using the caching implementation requires no separate Mammoth caching subscription.
Bundled dependencies retain their own licenses and attribution requirements; consult the distribution license inventory and notices for the version you use. GitHub cache/artifact services keep their own terms, limits and charges. Downloaded JDKs, Gradle/Maven distributions and separately used build services also retain their applicable terms.
When choosing a cache implementation, consider the rights to inspect, fix and maintain it, any separate provider agreements, and the effort required to migrate if its availability, terms or pricing change. Evaluate feature coverage and measured performance separately; an open-source license alone does not establish either.
How to use Buildish Mammoth Cache for Gradle and Maven in your workflows.
Design documents covering the internal architecture of Buildish Mammoth Cache for Gradle and Maven.
Architecture, portability, and release information for contributors to Buildish Mammoth Cache for Gradle and Maven.
Threat model for Buildish Mammoth Cache for Gradle and Maven.
This patch makes producer-name collisions between distributed matrix cells visible and adds documentation for matrix jobs and restricted action allow-lists. Highlights Explain producer-name collisions between matrix cells. All cells of a matrix job share one job ID, which is also Mammoth’s default producer name. When two cells uploaded the same worker artifact name, the second upload was rejected and that cell’s contribution was lost with only a generic Raw worker upload unconfirmed warning. When the names differed, the aggregator failed with a bare Ambiguous raw worker artifacts error. Both messages now say to give each cell its own github-job-name, list those names in dependent-jobs, and link to the matrix-jobs section of the 0.6.1 docs. Document distributed matrix jobs, including a complete workflow that is also available as examples/gradle-distributed-matrix.yml. Document the allow-list entries needed in repositories and organizations that allow only specified actions, with a pointer for Apache Software Foundation projects, and the resulting setup failure in the troubleshooting guide. Drop actions/setup-java from aggregator jobs in the docs and examples. Mammoth does not run Java, and an aggregator runs no build. Upgrade notes No action-input or workflow changes are required. Cache formats are unchanged, and existing 0.6.0 cache generations can be reused. Distributed matrix workflows that do not set a distinct github-job-name per cell were already affected by the collision. After upgrading, they report it through the new messages; follow the linked guidance to fix the workflow. Aggregator jobs can drop actions/setup-java unless they also run Gradle or Maven. Review v0.6.1-rc1 as the first release candidate and use v0.6.1 after final promotion.