User Guide
How to use Buildish Mammoth Cache for Gradle and Maven in your workflows.
You are reading documentation for 0.8.3. The latest release in the 0.8 line 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 release makes distributed jobs easier to set up and to diagnose. Matrix cells get distinct producer names by default, aggregators can explain why a worker is missing, and job summaries show how each job takes part in the cache. Cache and worker artifact formats are unchanged. Highlights Name each cell of a matrix job <job ID>-<matrix values> by default, for example build-21 and build-25, so distributed matrix workers no longer need github-job-name. An explicit github-job-name still takes precedence, and a job with one cell keeps its job ID. Add the recommended github-needs aggregator input. With ${{ toJSON(needs) }}, the aggregator reports a missing worker as skipped, failed, cancelled or succeeded without an artifact, and flags dependent-jobs entries that match no job in needs. Show each job’s producer name, runner platform, cache family and single-writer partition ownership in its job summary. An aggregator also lists the merged workers and the listed jobs without an artifact, and warns about worker artifacts it did not request. Warn when an aggregator publishes a single-writer partition without a configured writer, or when the named writer contributed no snapshot. Name the likely cause when prepare finds files already present in a managed partition, such as another caching step or a self-hosted runner that kept the home, and link the troubleshooting guide. Group the action inputs into basic and advanced, and show the advanced ones with an “Advanced:” prefix. Show this release’s action ref, commit SHA and tag, in the workflow snippets of the released documentation, and per-release allow-list entries in the adoption guide. Upgrade notes A matrix job with several cells and no github-job-name now uses the derived cell names. Such a workflow previously worked only when a single cell ran Mammoth. Update its dependent-jobs and metadata writer to that cell’s name, shown in the job summary. No other action-input or workflow changes are required. Adding github-needs: ${{ toJSON(needs) }} to distributed aggregators is recommended. Cache and worker artifact formats are unchanged. Existing 0.8.x cache generations are reused.