|
7 | 7 | pull_request: |
8 | 8 | workflow_dispatch: |
9 | 9 |
|
10 | | -env: |
11 | | - # renovate: datasource=github-releases depName=codspeed packageName=CodSpeedHQ/runner |
12 | | - CODSPEED_RUNNER_VERSION: v4.3.4 |
13 | | - |
14 | 10 | jobs: |
15 | 11 | benchmarks: |
16 | 12 | name: Run benchmarks |
|
31 | 27 | ~/go/bin |
32 | 28 | ~/go/pkg/mod |
33 | 29 | key: go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }} |
34 | | - |
35 | | - # The following comes from https://github.com/CodSpeedHQ/action/blob/6a8e2b/action.yml with significant modifications. |
36 | | - # Copyright (c) 2022 CodSpeed and contributors |
37 | | - # TODO: Switch to a setup-codspeed action when available, see https://github.com/CodSpeedHQ/action/issues/146 |
38 | | - - name: Determine kernel version |
39 | | - id: versions |
40 | | - shell: bash |
41 | | - run: | |
42 | | - # Get kernel version for cache key |
43 | | - KERNEL_VERSION=$(uname -r) |
44 | | - echo "kernel-version=$KERNEL_VERSION" >> $GITHUB_OUTPUT |
45 | | - - name: Cache CodSpeed instruments |
46 | | - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 |
| 30 | + - name: Run the benchmarks |
| 31 | + uses: CodSpeedHQ/action@6a8e2b874c338bf81cc5e8be715ada75908d3871 # v4.3.4 |
47 | 32 | with: |
48 | | - path: ~/.cache/codspeed-action |
49 | | - key: codspeed-instruments-instrumentation-${{ runner.os }}-${{ runner.arch }}-${{steps.versions.outputs.kernel-version }}-${{ env.CODSPEED_RUNNER_VERSION }} |
50 | | - restore-keys: | |
51 | | - codspeed-instruments-instrumentation-${{ runner.os }}-${{ runner.arch }}-${{steps.versions.outputs.kernel-version }}-${{ env.CODSPEED_RUNNER_VERSION }} |
52 | | - # TODO: Remove 'cargo install' once https://github.com/CodSpeedHQ/codspeed-go/issues/31 fix is released |
53 | | - - name: Setup codspeed |
54 | | - run: | |
55 | | - curl -fsSL https://github.com/CodSpeedHQ/runner/releases/download/${{ env.CODSPEED_RUNNER_VERSION }}/codspeed-runner-installer.sh | bash -s -- --quiet |
56 | | - cargo install --git https://github.com/CodSpeedHQ/codspeed-go/ --branch cod-1666-codspeed-go-is-unable-to-run-benchmarks-on-go-modules-with |
57 | | - - name: Run benchmarks |
58 | | - run: | |
59 | | - make for-all-target TARGET="codspeed-benchmark" |
60 | | -
|
| 33 | + mode: walltime |
| 34 | + run: make for-all-target TARGET="benchmark"' |
0 commit comments