From 6c668ffb7728539eaa55ae03020f20ae26d33cc0 Mon Sep 17 00:00:00 2001 From: Guillaume Lagrange Date: Thu, 19 Mar 2026 18:13:52 +0100 Subject: [PATCH 1/2] docs: add documentation about multiple modes in a single run --- .github/workflows/ci.yml | 1 + README.md | 3 ++- action.yml | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7871a1d..7ac9050 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,7 @@ jobs: - simulation - instrumentation - walltime + - simulation,memory runs-on: ${{ matrix.os }} env: diff --git a/README.md b/README.md index 263069b..c3cb3da 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,8 @@ GitHub Actions for running [CodSpeed](https://codspeed.io) in your CI. run: "" # [REQUIRED] - # The measurement mode to use: "simulation" (recommended), or "walltime". + # The measurement mode(s) to use. Possible values: "simulation" (recommended), "walltime". + # Accepts a single value or a comma-separated list (e.g., "simulation,walltime"). # More details on the instruments at https://docs.codspeed.io/instruments/ mode: "simulation" diff --git a/action.yml b/action.yml index 9445084..5e547f6 100644 --- a/action.yml +++ b/action.yml @@ -12,7 +12,8 @@ inputs: mode: description: | - The mode to run the benchmarks in. The following modes are available: + The mode(s) to run the benchmarks in. Accepts a single value or a comma-separated list (e.g., "simulation,walltime"). + The following modes are available: - `simulation`: Run the benchmarks with CPU simulation measurements. - `walltime`: Run the benchmarks with walltime measurement. - `memory`: Run the benchmarks with allocation measurements. From 37726323a3af4e4c11cba3df567770d20488342c Mon Sep 17 00:00:00 2001 From: Guillaume Lagrange Date: Fri, 20 Mar 2026 10:48:12 +0100 Subject: [PATCH 2/2] fix: remove commas from cache key --- action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 5e547f6..edcdbce 100644 --- a/action.yml +++ b/action.yml @@ -124,14 +124,18 @@ runs: KERNEL_VERSION=$(uname -r) echo "kernel-version=$KERNEL_VERSION" >> $GITHUB_OUTPUT + # Normalize mode for cache key (commas are not allowed in cache keys) + MODE_CACHE_KEY=$(echo "${{ inputs.mode }}" | tr ',' '-') + echo "mode-cache-key=$MODE_CACHE_KEY" >> $GITHUB_OUTPUT + - name: Cache CodSpeed instruments if: inputs.cache-instruments == 'true' uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: ${{ inputs.instruments-cache-dir }} - key: codspeed-instruments-${{ inputs.mode }}-${{ runner.os }}-${{ runner.arch }}-${{steps.versions.outputs.kernel-version }}-${{ steps.versions.outputs.runner-version }} + key: codspeed-instruments-${{ steps.versions.outputs.mode-cache-key }}-${{ runner.os }}-${{ runner.arch }}-${{ steps.versions.outputs.kernel-version }}-${{ steps.versions.outputs.runner-version }} restore-keys: | - codspeed-instruments-${{ inputs.mode }}-${{ runner.os }}-${{ runner.arch }}-${{steps.versions.outputs.kernel-version }}- + codspeed-instruments-${{ steps.versions.outputs.mode-cache-key }}-${{ runner.os }}-${{ runner.arch }}-${{ steps.versions.outputs.kernel-version }}- - name: Lookup installer hash id: installer-hash