-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (56 loc) · 1.81 KB
/
run-benchmark.yml
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
name: Run benchmark suite
on: [push, pull_request]
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
jobs:
run-benchmark:
name: Run benchmark suite on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install dependencies
run: sudo apt update && sudo apt install libasound2-dev libudev-dev
- name: Build latest microwave version
run: |
mkdir -p target/bench/historic
target=target/bench/latest
echo "Building ${target}"
cargo build -p microwave --release
cp target/release/microwave ${target}
- name: Build historic microwave versions
run: |
count=0
for commit in $(git rev-list -n 50 HEAD); do
target=target/bench/historic/$(printf %04d ${count})-${commit:0:12}
echo "Building ${target}"
git checkout ${commit}
cargo build -p microwave --release
cp target/release/microwave ${target}
count=$((count+1))
done
- name: Run benchmarks
run: |
for batch_number in $(seq 1 50); do
echo "Running batch number $batch_number"
for executable in $(find target/bench/historic -type f | shuf); do
echo "Running benchmark for ${executable}"
${executable} bench
done
done
- name: Analyze performance report
run: |
target/bench/latest bench --analyze
- name: Upload performance results
uses: actions/upload-artifact@v3
with:
name: perf-results
path: |
perf-report.yml
perf-analysis.csv
if-no-files-found: error