> ## Documentation Index
> Fetch the complete documentation index at: https://site.aspect.build/llms.txt
> Use this file to discover all available pages before exploring further.

# aspect ci warming

> Pre-populate a CI runner's Bazel caches with aspect ci warming, then upload them as the warming archive on Aspect Workflows runners.

`aspect ci warming` fills a runner's Bazel caches so the runner group's jobs start warm. It's the one command a scheduled warming job runs.

```shell theme={null}
aspect ci warming --task:name warming -- //...
```

In order, it:

1. Runs the runner health check, the same one every task runs during setup.
2. Clears the previous Bazel state under the runner's storage mount (`ASPECT_WORKFLOWS_RUNNER_STORAGE_PATH`), when that's set.
3. Runs `bazel build --nobuild` against the target patterns, which fetches external repositories and fills the repository and output caches without building anything.
4. On an Aspect Workflows runner, uploads the populated caches as the warming archive.

Off a Workflows runner, the upload is reported as skipped and the task passes. The whole run reports as one status check, covering both the populate and the archive phases.

<Note>
  Requires Aspect CLI [v2026.39.10](https://github.com/aspect-build/aspect-cli/releases/tag/v2026.39.10)
  or newer. For turning warming on for a runner group, see
  [runner warming](/docs/aspect-workflows/enterprise/ci-runners/warming).
</Note>

## Options

| Flag                          | Default | What it does                                                                                                                                               |
| ----------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| positional targets            | `...`   | Target patterns to warm. `...` is every rule target in the package at and beneath the current directory. Separate hyphen-led patterns from flags with `--` |
| `--bazel-flag <flag>`         | none    | Extra Bazel flag for the warming build. Repeatable. Only needed when a Bazel flag collides with one of the task's own                                      |
| `--bazel-startup-flag <flag>` | none    | Extra Bazel startup flag. Repeatable. Changing startup flags restarts the Bazel server                                                                     |
| `--announce-bazel-rc`         | `auto`  | Print the resolved `.bazelrc` flags before the build. `auto` prints on CI and stays quiet locally; `true` or `false` forces it                             |
| `--announce-bazel-version`    | `auto`  | Print the detected Bazel version before the build                                                                                                          |
| `--announce-bazel-command`    | `auto`  | Print the exact `bazel` command line before the build                                                                                                      |
| `--bes-backend <uri>`         | none    | Extra Build Event Service backend the CLI streams to. Repeatable                                                                                           |
| `--bes-header <key=value>`    | none    | Header sent on every CLI-streamed BES stream. Repeatable                                                                                                   |

Bazel flags the task doesn't recognize are forwarded to Bazel as they are: after the task name as command options, before it as startup options. See [Flag passthrough](/docs/cli/tasks/run#flag-passthrough).

There's no `--output-base` flag. On a Workflows runner the output base comes from the runner.

```shell theme={null}
aspect ci warming -- //...                         # warm everything
aspect ci warming -- //services/... //libs/...     # warm a subset
aspect ci warming --config=ci -- //...             # a Bazel flag, forwarded
```

## CI example

Run it on a schedule against your main branch, on the runner group you want warm. Per-provider examples are in [Migrating from YAML: aspect ci warming](/docs/cli/migration/warming#examples).

```yaml GitHub Actions theme={null}
on:
  schedule:
    - cron: '0 12 * * *'
  workflow_dispatch:

permissions:
  contents: read    # actions/checkout
  id-token: write   # artifact uploads and the PR summary comment

jobs:
  warming:
    runs-on: [self-hosted, aspect-workflows, aspect-default]
    steps:
      - uses: actions/checkout@v6
      - uses: aspect-build/setup-aspect@ebca96eb49ef58c00d4226de8bd3a0813507dd87 # v2026.38.3
        with:
          aspect-api-token: ${{ secrets.ASPECT_API_TOKEN }}
      - run: aspect ci warming --task:name warming -- //...
```

## Related

* [`aspect ci runner-health-check`](/docs/cli/tasks/ci_runner_health_check): run only the health check.
* [`aspect ci runner-metadata`](/docs/cli/tasks/ci_runner_metadata): print the runner's cache paths and warming status.
