-
-
Notifications
You must be signed in to change notification settings - Fork 239
71 lines (59 loc) · 1.79 KB
/
Copy pathbenchmark.yml
File metadata and controls
71 lines (59 loc) · 1.79 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:
push:
branches:
- master
- develop-*
pull_request:
# Not supported by CodSpeed!
# issue_comment:
# types: [created]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
id-token: write
env:
RUST_LOG: info
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
bench:
name: Bench
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' ||
github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref,
'refs/heads/develop-'))
# || github.event.issue.pull_request && contains(github.event.comment.body, '!benchmark')
strategy:
fail-fast: false
matrix:
include:
- package: moon_affected
runner: depot-ubuntu-24.04-16 # 64GB mem
mode: walltime
- package: moon_cache
runner: depot-ubuntu-24.04-4 # 16GB mem
mode: walltime
- package: moon_toolchain_plugin
runner: depot-ubuntu-24.04-8 # 32GB mem
mode: walltime
- package: moon_workspace
runner: depot-ubuntu-24.04-8 # 32GB mem
mode: walltime
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v6
- uses: moonrepo/setup-rust@v1
with:
bins: cargo-codspeed
cache: false
cache-target: release
- uses: arduino/setup-protoc@v3
- name: Build the benchmark targets
run: cargo codspeed build -m ${{ matrix.mode }} -p ${{ matrix.package }}
- name: Run the benchmarks
uses: CodSpeedHQ/action@v4
with:
mode: ${{ matrix.mode }}
run: cargo codspeed run -p ${{ matrix.package }}