From 867d40cbbce51ef3e28905112226070e994e3eb9 Mon Sep 17 00:00:00 2001 From: Guillaume Lagrange Date: Thu, 13 Nov 2025 11:52:21 +0100 Subject: [PATCH 1/3] feat: use --locked during cargo install for the runner --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index e161508..ea35457 100644 --- a/action.yml +++ b/action.yml @@ -132,11 +132,11 @@ runs: elif [ "$VERSION_TYPE" = "branch" ]; then # Install from specific branch using cargo source $HOME/.cargo/env - cargo install --git https://github.com/CodSpeedHQ/runner --branch "$RUNNER_VERSION" + cargo install --locked --git https://github.com/CodSpeedHQ/runner --branch "$RUNNER_VERSION" elif [ "$VERSION_TYPE" = "rev" ]; then # Install from specific commit/rev using cargo source $HOME/.cargo/env - cargo install --git https://github.com/CodSpeedHQ/runner --rev "$RUNNER_VERSION" + cargo install --locked --git https://github.com/CodSpeedHQ/runner --rev "$RUNNER_VERSION" else # Release version head_status=$(curl -I -fsSL -w "%{http_code}" -o /dev/null https://github.com/CodSpeedHQ/runner/releases/download/v$RUNNER_VERSION/codspeed-runner-installer.sh) From ef58ee899ebb367d20e14384a1127fde4bc3463d Mon Sep 17 00:00:00 2001 From: Guillaume Lagrange Date: Thu, 13 Nov 2025 12:07:03 +0100 Subject: [PATCH 2/3] feat: accept both instrumentation and simulation for mode input --- .github/workflows/ci.yml | 3 ++- README.md | 10 +++++----- action.yml | 9 +++++---- examples/nodejs-typescript-codspeed.yml | 2 +- examples/python-pytest-codspeed.yml | 2 +- examples/rust-cargo-codspeed.yml | 2 +- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e50ad12..dedeb6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,7 @@ jobs: - codspeedhq-arm64-ubuntu-22.04 - codspeedhq-arm64-ubuntu-24.04 mode: + - simulation - instrumentation - walltime @@ -81,5 +82,5 @@ jobs: uses: ./ with: runner-version: ${{ matrix.version }} - mode: instrumentation + mode: simulation run: echo "Testing version format ${{ matrix.version }}!" diff --git a/README.md b/README.md index c9e21f7..fda6aec 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ GitHub Actions for running [CodSpeed](https://codspeed.io) in your CI. run: "" # [REQUIRED] - # The measurement mode to use, either: "instrumentation" or "walltime". + # The measurement mode to use: "simulation" (recommended), or "walltime". # More details on the instruments at https://docs.codspeed.io/instruments/ - mode: "instrumentation" + mode: "simulation" # [OPTIONAL] # CodSpeed recommends using OpenID Connect (OIDC) for authentication. @@ -105,7 +105,7 @@ jobs: - name: Run benchmarks uses: CodSpeedHQ/action@v4 with: - mode: instrumentation + mode: simulation run: pytest tests/ --codspeed ``` @@ -150,7 +150,7 @@ jobs: - name: Run the benchmarks uses: CodSpeedHQ/action@v4 with: - mode: instrumentation + mode: simulation run: cargo codspeed run ``` @@ -190,6 +190,6 @@ jobs: - name: Run benchmarks uses: CodSpeedHQ/action@v4 with: - mode: instrumentation + mode: simulation run: npx vitest bench ``` diff --git a/action.yml b/action.yml index ea35457..0d711d6 100644 --- a/action.yml +++ b/action.yml @@ -12,11 +12,12 @@ inputs: mode: description: | - The mode to to run the benchmarks in. The following modes are available: - - `instrumentation`: Run the benchmarks with CPU instrumentation measurements. + The mode to run the benchmarks in. The following modes are available: + - `simulation`: Run the benchmarks with CPU simulation measurements. - `walltime`: Run the benchmarks with walltime measurement. + - `instrumentation`: (Deprecated) Legacy name for `simulation`. Please use `simulation` instead. - We strongly recommend starting with the `instrumentation` mode. + We strongly recommend starting with the `simulation` mode. Using the `walltime` mode on traditional VMs/Hosted Runners might lead to inconsistent data. For the best results, we recommend using CodSpeed Hosted Macro Runners, which are fine-tuned for performance measurement consistency. Check out the [Walltime Instrument Documentation](https://docs.codspeed.io/instruments/walltime/) for more details. @@ -99,7 +100,7 @@ runs: # Validate required inputs # (custom message for smoother v4 migration) if [ -z "${{ inputs.mode }}" ]; then - echo "::error title=Missing required input 'mode'::The 'mode' input is required as of CodSpeed Action v4. Please explicitly set 'mode' to 'instrumentation' or 'walltime'. Before, this variable was automatically set to instrumentation on every runner except for CodSpeed macro runners where it was set to walltime by default. See https://codspeed.io/docs/instruments for details." + echo "::error title=Missing required input 'mode'::The 'mode' input is required as of CodSpeed Action v4. Please explicitly set 'mode' to 'simulation' or 'walltime'. Before, this variable was automatically set to instrumentation on every runner except for CodSpeed macro runners where it was set to walltime by default. See https://codspeed.io/docs/instruments for details." exit 1 fi diff --git a/examples/nodejs-typescript-codspeed.yml b/examples/nodejs-typescript-codspeed.yml index 8780575..b064be1 100644 --- a/examples/nodejs-typescript-codspeed.yml +++ b/examples/nodejs-typescript-codspeed.yml @@ -27,5 +27,5 @@ jobs: - name: Run benchmarks uses: CodSpeedHQ/action@v4 with: - mode: instrumentation + mode: simulation run: node -r esbuild-register benches/bench.ts diff --git a/examples/python-pytest-codspeed.yml b/examples/python-pytest-codspeed.yml index 1f52755..84861c1 100644 --- a/examples/python-pytest-codspeed.yml +++ b/examples/python-pytest-codspeed.yml @@ -29,5 +29,5 @@ jobs: - name: Run benchmarks uses: CodSpeedHQ/action@v4 with: - mode: instrumentation + mode: simulation run: pytest tests/ --codspeed diff --git a/examples/rust-cargo-codspeed.yml b/examples/rust-cargo-codspeed.yml index e93f6ab..b9f9e27 100644 --- a/examples/rust-cargo-codspeed.yml +++ b/examples/rust-cargo-codspeed.yml @@ -32,5 +32,5 @@ jobs: - name: Run the benchmarks uses: CodSpeedHQ/action@v4 with: - mode: instrumentation + mode: simulation run: cargo codspeed run From 41b649aa682b8a2df48609d8ef2ea9f7caed12c0 Mon Sep 17 00:00:00 2001 From: Guillaume Lagrange Date: Wed, 19 Nov 2025 11:35:08 +0100 Subject: [PATCH 3/3] ci: update runner version in version parsing test --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dedeb6c..6c1ae5a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,8 +70,8 @@ jobs: matrix: version: - "latest" - - "4.2.0" - - "v4.2.0" + - "4.4.0" + - "v4.4.0" runs-on: ubuntu-latest env: