-
Notifications
You must be signed in to change notification settings - Fork 9
71 lines (59 loc) · 2.03 KB
/
benchmark.yml
File metadata and controls
71 lines (59 loc) · 2.03 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
name: Benchmark
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
paths-ignore:
- "**/*.md"
push:
branches:
- main
paths-ignore:
- "**/*.md"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions:
contents: read
jobs:
benchmark:
name: Benchmark
runs-on: ubuntu-latest
steps:
- name: Checkout Branch
uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
with:
version: 10.33.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: .node-version
cache: pnpm
- name: Setup benchmark data
run: cd benches && pnpm install --ignore-workspace
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1
with:
cache-key: benchmark
cache-save-if: ${{ github.ref_name == 'main' }}
- uses: taiki-e/install-action@055f5df8c3f65ea01cd41e9dc855becd88953486 # v2.75.18
with:
tool: cargo-codspeed
- uses: ./.github/actions/pnpm
- name: Build Benchmark
env:
RUSTFLAGS: "-C debuginfo=1 -C strip=none -g"
run: cargo codspeed build
- name: Run CPU benchmark
uses: CodSpeedHQ/action@281164b0f014a4e7badd2c02cecad9b595b70537 # https://github.com/CodSpeedHQ/action/releases/tag/v4.10.6
timeout-minutes: 30
with:
mode: simulation
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}
- name: Run memory benchmark
uses: CodSpeedHQ/action@281164b0f014a4e7badd2c02cecad9b595b70537 # https://github.com/CodSpeedHQ/action/releases/tag/v4.10.6
timeout-minutes: 30
with:
mode: memory
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}