Skip to main content


Agent OS

For now, only the following OS and versions are supported on the agents:

  • Ubuntu 20.04 and later
  • Debian 11 and later


1. Setup the CODSPEED_TOKEN secretโ€‹

First, you need to get your CodSpeed Token. There are multiple ways to retrieve it:

  • Once you enable a repository on CodSpeed, you'll be prompted to copy the token
  • You can also find it on the repository settings page
Token scope

Be mindful that a token is scoped to a specific repository. Make sure that you are on the correct repository settings page when copying the token.

Then, create a new pipeline secret with your preferred method with the name CODSPEED_TOKEN and the value of your token.

2. Install the codspeed-runner CLI in your agentโ€‹

Install the CLI on your agent by running the following commands:

CODSPEED_RUNNER_VERSION=<insert-version> # refer to for available versions
source "$HOME/.cargo/env"

It is important to source the $HOME/.cargo/env file to make sure that the codspeed-runner command will be available in the pipeline.

Refer to the releases page to see all available versions.

3. Create the benchmarks pipelineโ€‹

In a new or existing pipeline, add a step that will run your benchmarks with codspeed-runner:

- label: "Run benchmarks with CodSpeed"
command: |
... # your build commands
codspeed-runner --token=$CODSPEED_TOKEN -- <Insert your benchmark command here>

3. Check the resultsโ€‹

Once the workflow is created, your pull requests will receive a performance report comment and will also receive some additional checks:

Next Stepsโ€‹

Now that everything is up and running (and hopefully green ๐ŸŽ‰), you can start enhancing your workflow to get the most out of CodSpeed.