Skip to content

Commit

Permalink
add CPU info
Browse files Browse the repository at this point in the history
  • Loading branch information
miparnisari committed Nov 23, 2023
1 parent de4771e commit 418831f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-on-alert: true

- name: Get CPU information
uses: kenchan0130/actions-system-info@master
id: system-info

- name: Save benchmark JSON
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ./cache/benchmark-data.json
# Save with commit hash to avoid "cache already exists"
# Save with OS to prevent comparing against results from different CPUs
key: ${{ github.sha }}-${{ runner.os }}-go-benchmark
# Save with OS & CPU info to prevent comparing against results from different CPUs
key: ${{ github.sha }}-${{ runner.os }}-${{ steps.system-info.outputs.cpu-model }}-go-benchmark
6 changes: 5 additions & 1 deletion .github/workflows/prs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
set -o pipefail
make bench | tee ${{ github.sha }}_bench_output.txt
- name: Get CPU information
uses: kenchan0130/actions-system-info@master
id: system-info

- name: Get Main branch SHA
id: get-main-branch-sha
run: |
Expand All @@ -38,7 +42,7 @@ jobs:
id: cache
with:
path: ./cache/benchmark-data.json
key: ${{ steps.get-main-branch-sha.outputs.sha }}-${{ runner.os }}-go-benchmark
key: ${{ steps.get-main-branch-sha.outputs.sha }}-${{ runner.os }}-${{ steps.system-info.outputs.cpu-model }}-go-benchmark

- name: Compare benchmarks with Main
uses: benchmark-action/github-action-benchmark@v1
Expand Down

0 comments on commit 418831f

Please sign in to comment.