-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
63 lines (53 loc) · 1.53 KB
/
benchmark-core.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
name: Benchmark - core
on:
pull_request:
branches: [master]
paths:
- .github/workflows/benchmark-core.yml
- "packages/yew/**"
- "tools/benchmark-core/**"
jobs:
benchmark-core:
name: Benchmark - core
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v4
with:
repository: "yewstack/yew"
ref: master
path: yew-master
- name: Checkout pull request
uses: actions/checkout@v4
with:
path: current-pr
- name: Setup toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Restore Rust cache for yew packages
uses: Swatinem/rust-cache@v2
with:
shared-key: yew-packages
workspaces: |
yew-master
current-pr
- name: Run pull request benchmark
working-directory: current-pr/tools/benchmark-core
run: cargo bench -q > ../output.log
- name: Run master benchmark
working-directory: yew-master/tools/benchmark-core
run: cargo bench -q > ../output.log
- name: Write Pull Request ID
run: |
echo "${{ github.event.number }}" > .PR_NUMBER
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: benchmark-core
include-hidden-files: true
path: |
.PR_NUMBER
yew-master/tools/output.log
current-pr/tools/output.log
retention-days: 1