-
Notifications
You must be signed in to change notification settings - Fork 371
58 lines (49 loc) · 1.59 KB
/
perf.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
name: Performance Main
on:
push:
branches: [main]
permissions:
contents: write
pull-requests: write
jobs:
benchmark:
runs-on: buildjet-32vcpu-ubuntu-2204
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
path: vm
- name: Set up git private repo access
run: |
git config --global url."https://${{ secrets.PRIVATE_PULL_TOKEN }}@github.com/".insteadOf ssh://[email protected]
git config --global url."https://${{ secrets.PRIVATE_PULL_TOKEN }}@github.com".insteadOf https://github.com
- name: rust-cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
~/.rustup/
key: test-rust-nightly-2024-01-25-${{ hashFiles('**/Cargo.toml') }}
restore-keys: rust-nightly-2024-01-25-
- name: Install nightly toolchain
id: rustc-toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2024-01-25
override: true
- name: Install cargo criterion
run: cd vm && cargo install cargo-criterion --force
- name: Cache main.json
uses: actions/cache@v2
with:
path: vm/core/main.json
key: perf-main-${{ github.sha }}
- name: Run pr benchmark
run: cd vm/core && cargo criterion --message-format=json --features perf > main.json && cat main.json