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..edcdbce 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. @@ -123,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