WarpBuild LogoWarpBuild Docs

Setup Actions

Drop-in replacements for popular setup-* GitHub Actions that use WarpBuild Cache for toolchain and dependency caching

WarpBuild maintains forks of the popular setup-* GitHub Actions that are drop-in replacements for their upstream counterparts. They accept the same inputs and produce the same outputs, but bundle the WarpBuild cache client so that toolchain and package-manager caching is served by WarpBuild Cache instead of GitHub Actions Cache.

To adopt one, replace the upstream action reference with the matching WarpBuilds/* action. No other workflow changes are required.

These actions automatically use WarpBuild Cache when run on WarpBuild runners. No extra configuration is required.

Supported actions

ActionReplacesWhat it caches
WarpBuilds/setup-nodeactions/setup-nodenpm, yarn, and pnpm dependencies
WarpBuilds/setup-pythonactions/setup-pythonpip, pipenv, and poetry dependencies
WarpBuilds/setup-goactions/setup-goGo modules and build outputs
WarpBuilds/setup-javaactions/setup-javaMaven, Gradle, and sbt dependencies
WarpBuilds/setup-dotnetactions/setup-dotnetNuGet global packages
WarpBuilds/setup-rubyruby/setup-rubyInstalled gems via bundle install
WarpBuilds/setup-ziggoto-bus-stop/setup-zigDownloaded Zig compilers
WarpBuilds/rust-cacheSwatinem/rust-cacheCargo registry, git deps, and target dir
WarpBuilds/gradle-actionsgradle/actionsGradle User Home (wrappers, deps, caches)
WarpBuilds/mise-actionjdx/mise-actionTools installed by mise

Node.js

WarpBuilds/setup-node installs Node.js and caches npm, yarn, or pnpm dependencies via the cache input. From v6, npm caching is enabled automatically when the packageManager or devEngines.packageManager field in package.json is set to npm.

- uses: WarpBuilds/setup-node@v6
  with:
    node-version: 20
    cache: npm

Key cache inputs:

  • cache - Package manager to cache for: npm, yarn, or pnpm.
  • cache-dependency-path - Path to the lockfile(s) used for the cache key. Supports wildcards and multiple paths.
  • package-manager-cache - Set to false to disable the automatic npm caching. Default: true

Python

WarpBuilds/setup-python installs Python or PyPy and caches pip, pipenv, or poetry dependencies. Caching is off by default; enable it with the cache input.

- uses: WarpBuilds/setup-python@v6
  with:
    python-version: '3.12'
    cache: pip

Key cache inputs:

  • cache - Package manager to cache for: pip, pipenv, or poetry.
  • cache-dependency-path - Path to the dependency file(s) used for the cache key (e.g. requirements.txt, poetry.lock).

Go

WarpBuilds/setup-go installs Go and caches Go modules and build outputs. Caching is on by default, keyed on the hash of go.mod.

- uses: WarpBuilds/setup-go@v6
  with:
    go-version: '1.22'
    cache: true

Key cache inputs:

  • cache - Set to false to disable caching. Default: true
  • cache-dependency-path - Path to the dependency file(s) used for the cache key, e.g. **/go.sum or multiple go.sum files in a monorepo.

Java

WarpBuilds/setup-java installs a JDK and caches dependencies for Maven, Gradle, or sbt. Caching is off by default; enable it with the cache input.

- uses: WarpBuilds/setup-java@v5
  with:
    distribution: temurin
    java-version: '21'
    cache: maven

Key cache inputs:

  • cache - Package manager to cache for: maven, gradle, or sbt.
  • cache-dependency-path - Path to the build file(s) used for the cache key (e.g. pom.xml, build.gradle). Useful for monorepos.

For advanced Gradle caching (build outputs, configuration cache, read-only caches), use WarpBuilds/gradle-actions instead.

.NET

WarpBuilds/setup-dotnet installs the .NET SDK and caches the NuGet global-packages folder. Caching is off by default and requires a NuGet lock file (packages.lock.json).

- uses: WarpBuilds/setup-dotnet@v4
  with:
    dotnet-version: '8.0'
    cache: true
    cache-dependency-path: '**/packages.lock.json'

Key cache inputs:

  • cache - Set to true to enable NuGet package caching. Default: false
  • cache-dependency-path - Path to the lock file(s) when they are not in the repository root.

Ruby

WarpBuilds/setup-ruby installs Ruby and, with bundler-cache: true, runs bundle install and caches the installed gems automatically. Any separate bundle install step can be removed.

- uses: WarpBuilds/[email protected]
  with:
    ruby-version: '3.3'
    bundler-cache: true

Key cache inputs:

  • bundler-cache - Runs bundle install and caches installed gems. Default: false
  • cache-version - Arbitrary string to bust the gem cache when needed.

Zig

WarpBuilds/setup-zig installs the Zig compiler and caches the downloaded compiler archives by default.

- uses: WarpBuilds/setup-zig@v2
  with:
    version: 0.13.0

Key cache inputs:

  • cache - Set to false to disable compiler caching. Default: true

Rust

WarpBuilds/rust-cache implements smart caching for Rust/Cargo projects with sensible defaults, caching the Cargo registry, git dependencies, and workspace target directories. Install your toolchain before this action runs, as the rustc version is part of the cache key. Set cache-provider: warpbuild to store the cache in WarpBuild Cache.

- run: rustup toolchain install stable --profile minimal
- uses: WarpBuilds/rust-cache@v2
  with:
    cache-provider: warpbuild

Key cache inputs:

  • cache-provider - Cache backend to use. Set to warpbuild for WarpBuild Cache. Default: github
  • shared-key - Stable cache key shared across multiple jobs, instead of the automatic per-job key.
  • workspaces - Newline-separated $workspace -> $target entries for non-standard workspace layouts.
  • cache-directories - Additional non-workspace directories to cache.
  • cache-on-failure - Save the cache even when the workflow fails. Default: false
  • cache-all-crates - Cache all crates, including CI tooling crates. Default: false
  • save-if - Condition controlling whether the cache is saved, e.g. ${{ github.ref == 'refs/heads/main' }}.

Gradle

WarpBuilds/gradle-actions is a fork of gradle/actions with WarpBuild Cache integration. Its setup-gradle action configures Gradle and caches the Gradle User Home, including wrapper distributions, downloaded dependencies, and build caches.

- uses: WarpBuilds/setup-java@v5
  with:
    distribution: temurin
    java-version: '21'
- uses: WarpBuilds/gradle-actions/setup-gradle@v5
- run: ./gradlew build

Key cache inputs:

  • cache-disabled - Set to true to disable caching. Default: false
  • cache-read-only - Restore existing cache entries without writing new ones, e.g. on non-default branches.
  • cache-write-only - Write cache entries without restoring, useful for seeding a cache.
  • gradle-home-cache-includes / gradle-home-cache-excludes - Fine-grained control over which Gradle User Home paths are cached.

See the setup-gradle documentation for the full input reference.

mise

WarpBuilds/mise-action is a fork of jdx/mise-action that installs the mise tool manager, runs mise install for the tools defined in your .tool-versions or mise.toml, and caches the installed tools in WarpBuild Cache.

- uses: WarpBuilds/mise-action@v2
  with:
    version: 2024.10.0
    cache: true

Key cache inputs:

  • cache - Cache the mise tool installations. Default: true

Version pinning

Each action is tagged with the same major versions as its upstream, so an existing pin like actions/setup-node@v6 maps directly to WarpBuilds/setup-node@v6. Check each repository's releases page for the latest tags.

Last updated on

On this page