-
Notifications
You must be signed in to change notification settings - Fork 151
91 lines (74 loc) · 2.26 KB
/
hyper_threading_benchmarks.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Benchmark Hyper Threading
on:
pull_request:
branches: [ '**' ]
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install Dependencies
run: |
pip install -r requirements.txt
sudo apt update
sudo apt-get install -y hyperfine
- name: Install Rust
uses: dtolnay/[email protected]
with:
components: rustfmt, clippy
- name: Compile PR Version
run: |
make cairo_bench_programs
cargo build --release -p hyper_threading
cp target/release/hyper_threading ./hyper_threading_pr
cp ./examples/hyper_threading/hyper-threading-workflow.sh ./hyper-threading-workflow.sh
- name: Upload PR Binary
uses: actions/upload-artifact@master
with:
name: hyper_threading_pr
path: ./hyper_threading_pr
- name: Upload Workflow Script
uses: actions/upload-artifact@master
with:
name: hyper_threading_workflow_script
path: ./hyper-threading-workflow.sh
- name: Checkout Main Branch
uses: actions/checkout@v2
with:
ref: 'main'
- name: Compile Main Version
run: |
make cairo_bench_programs
cargo build --release -p hyper_threading
cp target/release/hyper_threading ./hyper_threading_main
- name: Upload Main Binary
uses: actions/upload-artifact@master
with:
name: hyper_threading_main
path: ./hyper_threading_main
- name: Download Binaries and Script
uses: actions/download-artifact@master
with:
path: ./
- name: Download script
uses: actions/download-artifact@master
with:
path: ./examples/hyper_threading/
- name: Run Benchmarks
run: source ./examples/hyper_threading/hyper_threading_workflow_script/hyper-threading-workflow.sh > results_pr.txt
- name: Compare Results
run: |
echo "PR Results:"
cat results_pr.txt
- name: Upload Results
uses: actions/upload-artifact@v2
with:
name: benchmark-results
path: results_pr.txt