forked from lynx-family/lynx-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (55 loc) · 2.11 KB
/
workflow-bench.yml
File metadata and controls
56 lines (55 loc) · 2.11 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
name: Benchmark
on:
workflow_call:
env:
CI: 1
TURBO_TELEMETRY_DISABLED: 1
jobs:
nodejs-benchmark:
permissions: {}
timeout-minutes: 30
# CodSpeed does not support merge_group event.
#
# Error: Event merge_group is not supported by CodSpeed
# Error: unknown variant `merge_group`, expected one of `push`, `pull_request`, `workflow_dispatch`, `schedule`, `local` at line 1 column 13
if: github.event_name != 'merge_group'
runs-on: lynx-ubuntu-24.04-xlarge
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
persist-credentials: false
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: "24"
package-manager-cache: false
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
- name: TurboCache
uses: lynx-infra/cache@5c6160a6a4c7fca80a2f3057bb9dfc9513fcb732
with:
path: .turbo
# We have to be strict here to make sure getting the cache of build-all
key: turbo-v4-${{ runner.os }}-${{ hashFiles('**/packages/**/src/**/*.rs') }}-${{ github.sha }}
fail-on-cache-miss: true
- name: Install
run: |
npm install -g corepack@latest
corepack enable
pnpm install --frozen-lockfile
- name: Build
run: |
pnpm turbo build
- name: Prepare CodSpeed
run: |
curl -fsSL https://github.com/CodSpeedHQ/codspeed/releases/download/v4.10.6/codspeed-runner-installer.sh | bash -s -- --quiet
- name: Run benchmark
run: |
. "$HOME/.cargo/env"
codspeed run --mode simulation -- pnpm -r run --workspace-concurrency=1 bench
- name: React benchmark - Run perfetto
run: |
pnpm -r run --workspace-concurrency=1 perfetto
- name: React benchmark - Upload perfetto output
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: benchmark-react-ptrace-${{ github.sha }}
path: ./benchmark/react/dist/*.ptrace