# Run checks, tests and commands

> Install Sorus, run Cargo checks or other commands, and set machine sizes and deadlines.

Source: https://www.sorus.run/docs/sorus-ci
Reviewed: 2026-10-21

Your account must be authorised for the repository. For a guided first submission, use the [Cargo check tutorial](https://www.sorus.run/docs/quickstart).

## Install

The public **0.3.0** client supports Linux and macOS on x86_64 and arm64. It includes the standalone `sorus` command and the `cargo sorus` entry point.

Choose your platform and installation method:


### macOS · Homebrew

Use [Homebrew](https://brew.sh) if it is already installed:

```sh
brew install sorus-run/tap/sorus
sorus --version
```


### macOS · Installer

```sh
curl --proto '=https' --tlsv1.2 -fsSL https://github.com/sorus-run/sorus/releases/download/v0.3.0/install.sh | SORUS_VERSION=0.3.0 sh
export PATH="$HOME/.local/bin:$PATH"
sorus --version
```

The installer verifies the release checksums and, when GitHub CLI is available, the provenance attestation. It installs `sorus` and `cargo-sorus` in `~/.local/bin`.

Add `export PATH="$HOME/.local/bin:$PATH"` to `~/.zshrc` if you use macOS's default zsh, then open a new terminal. If you use another shell, add that directory to its startup configuration.


### Linux · Installer

```sh
curl --proto '=https' --tlsv1.2 -fsSL https://github.com/sorus-run/sorus/releases/download/v0.3.0/install.sh | SORUS_VERSION=0.3.0 sh
export PATH="$HOME/.local/bin:$PATH"
sorus --version
```

The installer verifies the release checksums and, when GitHub CLI is available, the provenance attestation. It installs `sorus` and `cargo-sorus` in `~/.local/bin`.

Add `export PATH="$HOME/.local/bin:$PATH"` to `~/.bashrc` if you use Bash, then open a new terminal. If you use another shell, add that directory to its startup configuration.


### Manual download

Download the executable for your operating system and architecture, its `SHA256SUMS` and provenance attestation from [public releases](https://github.com/sorus-run/sorus/releases). Follow that release's verification instructions before installing it as `sorus` in a directory on your `PATH`.

Create a `cargo-sorus` symlink beside `sorus` to use the `cargo sorus` entry point. The installer and Homebrew do this for you. Check the installed client with `sorus --version`.



The installer examples pin `0.3.0`. Set `SORUS_INSTALL_DIR` to select another destination.

## Credentials

Choose how Sorus will be called:


### Your terminal

```sh
sorus login
sorus whoami
```

Approve the printed device code in your browser, then confirm the active identity.


### CI or coding agent

Create a named credential with `read` and `submit` scopes using the [authentication guide](https://www.sorus.run/docs/guides/authentication#ci-and-agent-credentials). Inject it as `SORUS_TOKEN` or `SORUS_CREDENTIAL_FILE` through the host's secret mechanism, then verify the caller:

```sh
sorus whoami --json
```

[Install the skill](https://www.sorus.run/docs/guides/install-skill) for a coding agent. Use `--json` on job commands for structured results; see [agent integrations](https://www.sorus.run/docs/guides/agents).



## First job

From the authorised checkout, select the command that matches your local check:


### Check

```sh
cargo sorus check --workspace --locked
```

Check that the workspace compiles without producing final executables.


### Build

```sh
cargo sorus build --release --locked
```

Build the selected targets with the release profile.


### Test

```sh
cargo sorus test --workspace --locked
```

Run the workspace tests.


### Clippy

```sh
cargo sorus clippy --workspace --locked -- -D warnings
```

Run Clippy and treat warnings as errors.


### Format

```sh
cargo sorus fmt --all --check
```

Check formatting without changing source files.



The client prints the command, uploads the source and follows the job. A passing workload exits `0`.

`fmt` requires `--check`; formatting changes belong in your local checkout. `clippy --fix` is refused. Cargo arguments retain their meaning, including lint flags after `--`.

## GitHub workflow

Use [the CI integration guide](https://www.sorus.run/docs/guides/ci) for a complete workflow with the public setup action, credentials and commit checks.

## Sizes

Omit `--size` to let Sorus choose a machine. Jobs with usable prebuilt state, format checks and repositories without retained build state normally use 4 vCPU. Jobs that need to compile dependencies without a usable prebuilt state normally use 8 vCPU. A large set of test binaries can require a larger class. Declared services are [not yet offered](https://www.sorus.run/docs/reference/services#availability).

To select one explicitly, add `--size lathe-2cpu`, `lathe-4cpu`, `lathe-8cpu` or `lathe-16cpu`. These identifiers retain their existing names. Inspect `size_decision` in the job record for the selected class and reason.

## Wall-clock ceiling

Set a deadline for this job in seconds:

```sh
cargo sorus test --locked --wall-clock-ceiling 3600
```

The value must be a whole number from `60` to `21600`. Put it before `--`. It takes precedence over the repository setting and the `wall_clock_ceiling_seconds` pin in `sorus.toml`. The job records the chosen ceiling; invalid or repeated values are refused before upload.


## Pin dependencies for CI

Use `--locked` for reproducible CI with the committed dependency resolution. Sorus supplies the crates recorded by the lockfile through its dependency gateway.

Do not add `--offline` to a job that needs to fetch dependencies. An explicitly offline command cannot retrieve a missing crate. Offline operation is appropriate only when the job already has all its inputs, such as a workspace with path dependencies only. See [dependency access](https://www.sorus.run/docs/guides/environment#dependencies-and-network).

## Nextest

Run a nextest suite with its repository configuration:

```sh
cargo sorus nextest run --workspace --locked
```

Sorus uses the guest's nextest and preserves the selected profile, filters, retries and test groups. After an unfiltered run passes, it runs Cargo doctests for selected packages that have a library. A test filter, target selection or partition skips that additional doctest step. The client prints both the commands and the condition before uploading.

Only `nextest run` is accepted. Build-only `--no-run`, archive execution, `--rerun`/`-R`, an interactive debugger and help-only options are refused. To compile tests without running them, use `cargo sorus test --no-run --locked`.

For results and JUnit output, see [inspect a job](https://www.sorus.run/docs/guides/results#test-results).

## Non-Cargo steps

Run a program directly with `exec`:

```sh
cargo sorus exec --wall-clock-ceiling 600 -- ./scripts/check-generated
```

Replace the path with an executable script in your repository. Sorus starts the program without a shell; each word after `--` is a program argument. The program and its interpreter must exist in the captured source or [job environment](https://www.sorus.run/docs/guides/environment). Pipes, redirects and variable expansion require a shell or script that you explicitly choose to run.

## Split a suite into test binaries

Select the targets your repository defines:


### Library

```sh
cargo sorus test --locked --lib
```

Run library unit tests.


### Binary

```sh
cargo sorus test --locked --bin server
```

Replace `server` with the binary target whose unit tests you want to run.


### Integration

```sh
cargo sorus test --locked --test integration
```

Replace `integration` with an integration test target in your repository.


### Doctests

```sh
cargo sorus test --locked --doc
```

Run documentation tests separately from other target flags.



Test filters and test-program arguments follow `--`, as in Cargo.

## Results

Keep the job identifier and submission key. [Inspect results](https://www.sorus.run/docs/guides/results), [retrieve artifacts](https://www.sorus.run/docs/guides/artifacts), or [resume an interrupted upload](https://www.sorus.run/docs/guides/source#resume-a-submission) without starting the same work again.

## Exit codes

Exit `0` means success, `1` a workload outcome, `2` an invalid or refused request, `3` an authentication failure, `4` no outcome observed, `5` a terminal platform failure, and `130` an interrupted follow. Use the [full exit-code table](https://www.sorus.run/docs/reference/cli#exit-codes) when writing automation.

## Limits

[Supported workloads](https://www.sorus.run/docs/supported-workloads) lists execution limits. Your organization's agreement defines concurrency and commercial terms; see [pricing and usage](https://www.sorus.run/docs/billing).
