forked from lambdaclass/cairo-vm
-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (70 loc) · 2.34 KB
/
iai_pr.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
name: Benchmark PR (iai)
on:
pull_request:
branches: [ '**' ]
jobs:
fetch-iai-results:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.sha }}
- name: Initialize IAI cache for ${{ github.event.pull_request.base.sha }}
uses: actions/cache@v3
id: cache-iai-results
with:
path: |
*/target/iai/iai_benchmark/
key: ${{ runner.os }}-iai-benchmark-cache-${{ github.event.pull_request.base.sha }}
lookup-only: true
- name: Install Rust
if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }}
uses: dtolnay/[email protected]
- name: Set up cargo cache
if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }}
uses: Swatinem/rust-cache@v2
- name: Python3 Build
if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }}
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install test dependencies
if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }}
run: |
pip install -r requirements.txt
sudo apt update
sudo apt install -y valgrind
cargo install --version 0.3.1 iai-callgrind-runner
- name: Run iai benchmarks
if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }}
run: make iai-benchmark-action
run-iai-benchmark:
needs: fetch-iai-results
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/[email protected]
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
- name: Python3 Build
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install test dependencies
run: |
pip install -r requirements.txt
sudo apt update
sudo apt install -y valgrind
cargo install --version 0.3.1 iai-callgrind-runner
- name: Restore cache for ${{ github.event.pull_request.base.sha }}
uses: actions/cache/restore@v3
with:
path: |
*/target/iai/iai_benchmark/
key: ${{ runner.os }}-iai-benchmark-cache-${{ github.event.pull_request.base.sha }}
fail-on-cache-miss: true
- name: Run iai benchmarks
run: make iai-benchmark-action