-
Notifications
You must be signed in to change notification settings - Fork 15
73 lines (60 loc) · 1.77 KB
/
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
62
63
64
65
66
67
68
69
70
71
72
73
name: Run benchmark with workflow_call
on:
workflow_call:
inputs:
ref:
description: "git ref to checkout to"
type: string
default: "master"
tag:
description: "Release tag to upload results to"
type: string
default: "null"
jobs:
benchmark:
name: Run benchmark
runs-on: ubuntu-latest
steps:
- name: Checkout AquaVM
uses: actions/checkout@v4
with:
repository: fluencelabs/aquavm
ref: ${{ inputs.ref }}
- name: Setup Rust toolchain
uses: dsherret/rust-toolchain-file@v1
- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
shared-key: aquavm
save-if: false
- name: Setup marine
uses: fluencelabs/setup-marine@v1
- name: Generate benchmark data
working-directory: junk/gen-bench-data
run: ./gen_benchmark_data.sh
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install python module
run: pip install tools/cli/performance_metering
- name: Run benchmark
run: aquavm_performance_metering run
- name: Upload benchmark results to artifacts
uses: actions/upload-artifact@v3
with:
name: ./benches/PERFORMANCE.txt
path: lcov.info
- name: Print benchmark results to checks
run: |
{
echo '```';
cat ./benches/PERFORMANCE.txt;
echo '```';
} >> $GITHUB_STEP_SUMMARY
- name: Upload benchmark results to release
if: inputs.tag != 'null'
uses: softprops/action-gh-release@v1
with:
files: ./benches/PERFORMANCE.txt
tag_name: ${{ inputs.tag }}