-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (94 loc) · 2.5 KB
/
Copy pathbench.yml
File metadata and controls
95 lines (94 loc) · 2.5 KB
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
92
93
94
95
name: Benchmark
on:
push:
branches: ["master"]
pull_request:
branches: ["**"]
jobs:
criterion:
name: criterion
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- nightly
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{matrix.toolchain}}
- uses: actions/cache@v4
with:
path: |
/home/runner/.cargo
**/target/release
key: ${{matrix.toolchain}}-${{hashFiles('**/Cargo.lock')}}-criterion
- name: Run criterion
run: cargo +${{matrix.toolchain}} bench --bench criterion
- name: Save report
uses: actions/upload-artifact@v4
with:
name: criterion
path: target/criterion
iai:
name: iai
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- nightly
steps:
- run: sudo apt-get install -y valgrind
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{matrix.toolchain}}
- uses: actions/cache@v4
with:
path: |
/home/runner/.cargo
**/target/release
key: ${{matrix.toolchain}}-${{hashFiles('**/Cargo.lock')}}-iai
- run: mkdir -p target/iai
- name: Run iai
run: cargo +${{matrix.toolchain}} bench --bench iai >target/iai/summary.txt
- name: Save report
uses: actions/upload-artifact@v4
with:
name: iai
path: target/iai
prepare-pages:
name: Prepare GitHub pages
runs-on: ubuntu-latest
needs: [criterion, iai]
steps:
- uses: actions/download-artifact@v4
with:
name: criterion
path: pages
- uses: actions/download-artifact@v4
with:
name: iai
path: pages/iai
- run: tree pages
- uses: actions/upload-pages-artifact@v3
with:
path: pages
deploy-pages:
name: Deploy GitHub pages
runs-on: ubuntu-latest
needs: [prepare-pages]
permissions:
contents: read
pages: write
id-token: write
environment:
name: "github-pages"
url: "${{ steps.deployment.outputs.page_url }}"
concurrency:
group: gh-pages
cancel-in-progress: true
if: github.event_name == 'push' && (github.ref_type == 'tag' || (github.ref_type == 'branch' && github.ref_name == 'master'))
steps:
- uses: actions/deploy-pages@v4
id: deployment