-
Notifications
You must be signed in to change notification settings - Fork 139
69 lines (61 loc) · 2.41 KB
/
benchmark.yml
File metadata and controls
69 lines (61 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Benchmark
on: [push, pull_request_target, workflow_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.event.pull_request.head.sha || github.sha }}
cancel-in-progress: true
jobs:
benchmark:
name: Performance regression check
if: contains(toJSON(github.event.head_commit.message), 'Merge pull request ') == false
timeout-minutes: 30
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Test changed files
id: changed-files
uses: tj-actions/changed-files@v46
with:
files: |
src/riscv.c
src/decode.c
src/emulate.c
src/rv32_template.c
src/rv32_constopt.c
src/cache.c
src/io.c
src/jit.c
- name: Cache benchmark artifacts
if: steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch'
uses: actions/cache@v4
with:
path: build/
key: benchmark-artifacts-${{ runner.os }}-${{ hashFiles('mk/artifact.mk') }}
restore-keys: |
benchmark-artifacts-${{ runner.os }}-
- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch'
run: |
sudo pip3 install numpy --break-system-packages
shell: bash
- name: Build for benchmark
if: steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch'
run: make ENABLE_SDL=0 all artifact
- name: Run benchmark
if: steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch'
run: |
tests/bench-aggregator.py
- name: Store benchmark results
if: steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch'
uses: benchmark-action/github-action-benchmark@v1
with:
name: Benchmarks
tool: 'customBiggerIsBetter'
output-file-path: benchmark_output.json
github-token: ${{ secrets.RV32EMU_BENCH_TOKEN }}
gh-repository: 'github.com/sysprog21/rv32emu-bench'
gh-pages-branch: 'master'
auto-push: true
comment-always: true
benchmark-data-dir-path: .