Repository navigation
65 lines (55 loc) · 2.02 KB
/
Copy pathcodspeed.yml
File metadata and controls
65 lines (55 loc) · 2.02 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
name: CodSpeed
on:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
permissions:
contents: read
id-token: write # for OpenID Connect authentication with CodSpeed
env:
CARGO_TERM_COLOR: always
# `.cargo/config.toml` points `rustc-wrapper` at a local cache binary that is
# not available on CI runners.
CARGO_BUILD_RUSTC_WRAPPER: ""
RUSTC_WRAPPER: ""
jobs:
codspeed:
name: Run benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install the pinned toolchain
run: rustup toolchain install "$(sed -n 's/^channel = "\(.*\)"$/\1/p' rust-toolchain.toml)" --profile minimal
- uses: taiki-e/install-action@v2
with:
tool: cargo-codspeed
- uses: Swatinem/rust-cache@v2
- name: Install native dependencies
run: sudo apt-get update && sudo apt-get install -y libfreetype-dev libfontconfig1-dev
# CPU-bound suites only. `contention` (multi-threaded lock contention) and
# `http3_throughput` (real network round-trips) are dominated by system
# calls and scheduling, which the simulation instrument does not measure.
- name: Build the benchmark targets
run: |
cargo codspeed build -m simulation \
-p hpx -p hpx-yawc -p hpx-browser \
-F hpx/json,hpx-browser/cdp-client \
--bench json_parsing \
--bench http_throughput \
--bench connection_pool \
--bench websocket_core \
--bench page_throughput \
--bench challenge_detection \
--bench tls_handshake \
--bench cdp_bench \
--bench memory \
--bench navigation
- name: Run the benchmarks
uses: CodSpeedHQ/action@v5
with:
mode: simulation
run: cargo codspeed run -p hpx -p hpx-yawc -p hpx-browser