forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (112 loc) · 3.96 KB
/
turbopack-benchmark.yml
File metadata and controls
134 lines (112 loc) · 3.96 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Turbopack Benchmark
on:
workflow_dispatch:
push:
branches:
- canary
pull_request:
types: ['opened', 'reopened', 'synchronize', 'labeled']
paths:
- '**/crates/**'
- '**/Cargo.toml'
- '**/Cargo.lock'
concurrency:
# Limit concurrent runs to 1 per PR, but allow concurrent runs on canary branch
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow, github.event.pull_request.number) || format('{0}-{1}-{2}', github.workflow, github.ref_name, github.run_id) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
CI: 1
CARGO_INCREMENTAL: 0
# For faster CI
RUST_LOG: 'off'
TURBO_TEAM: 'vercel'
TURBO_CACHE: 'remote:rw'
jobs:
benchmark-small-apps:
name: Benchmark Rust Crates (small apps)
runs-on: ['self-hosted', 'linux', 'x64', 'metal']
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: ./.github/actions/setup-rust
- name: Install cargo-codspeed
uses: taiki-e/install-action@v2
with:
tool: cargo-codspeed@3.0.5
- name: Cache on ${{ github.ref_name }}
uses: ijjk/rust-cache@turbo-cache-v1.0.9
with:
save-if: 'true'
cache-provider: 'turbo'
shared-key: build-turbopack-benchmark-small-apps-${{ hashFiles('.cargo/config.toml') }}
- name: Install pnpm dependencies
working-directory: turbopack/benchmark-apps
run: |
npm i -g corepack@0.31
corepack enable
pnpm install --loglevel error
- name: Build app build benchmarks
env:
CODSPEED_RUNNER_MODE: instrumentation
run: cargo codspeed build -p turbopack-cli small_apps
- name: Run the benchmarks
uses: CodSpeedHQ/action@v4
with:
mode: instrumentation
run: cargo codspeed run -p turbopack-cli small_apps
token: ${{ secrets.CODSPEED_TOKEN }}
benchmark-analyzer:
name: Benchmark Rust Crates (analyzer)
runs-on: ['self-hosted', 'linux', 'x64', 'metal']
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: ./.github/actions/setup-rust
- name: Install cargo-codspeed
uses: taiki-e/install-action@v2
with:
tool: cargo-codspeed@3.0.5
- name: Cache on ${{ github.ref_name }}
uses: ijjk/rust-cache@turbo-cache-v1.0.9
with:
save-if: 'true'
cache-provider: 'turbo'
shared-key: build-turbopack-benchmark-analyzer-${{ hashFiles('.cargo/config.toml') }}
- name: Install pnpm dependencies
working-directory: turbopack/benchmark-apps
run: |
npm i -g corepack@0.31
corepack enable
pnpm install --loglevel error
- name: Build app build benchmarks
env:
CODSPEED_RUNNER_MODE: instrumentation
run: cargo codspeed build -p turbopack-ecmascript references
- name: Run the benchmarks
uses: CodSpeedHQ/action@v4
with:
mode: instrumentation
run: cargo codspeed run -p turbopack-ecmascript references
token: ${{ secrets.CODSPEED_TOKEN }}
benchmark-large:
name: Benchmark Rust Crates (large)
if: ${{ github.event.label.name == 'benchmark' || github.event_name == 'workflow_dispatch' }}
runs-on: ['self-hosted', 'linux', 'x64', 'metal']
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: ./.github/actions/setup-rust
- name: Install cargo-codspeed
uses: taiki-e/install-action@v2
with:
tool: cargo-codspeed@3.0.5
- name: Build the benchmark target(s)
env:
CODSPEED_RUNNER_MODE: instrumentation
run: cargo codspeed build -p turbopack -p turbopack-bench
- name: Run the benchmarks
uses: CodSpeedHQ/action@v4
with:
mode: instrumentation
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}