-
Notifications
You must be signed in to change notification settings - Fork 27.2k
90 lines (74 loc) · 2.23 KB
/
bench-turbopack.yml
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
name: Benchmark Turbopack
on:
push:
branches: [canary]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
actions: write
contents: read
pull-requests: read
jobs:
turbopack_rust_check:
name: Turbopack rust check
runs-on:
- 'self-hosted'
- 'linux'
- 'x64'
- 'metal'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
targets: wasm32-unknown-unknown
- name: Run cargo check release
run: |
RUSTFLAGS="-D warnings -A deprecated" cargo check --workspace --all-targets --features rustls-tls --release
turbopack_bench_pr:
needs: [turbopack_rust_check]
if: github.event_name == 'pull_request'
name: Benchmark and compare Turbopack performance on ${{ matrix.os.title }}
strategy:
fail-fast: false
matrix:
os:
- name: linux
title: Linux
quiet: false
runs-on:
- 'self-hosted'
- 'linux'
- 'x64'
- 'metal'
runs-on: ${{ matrix.os.runs-on }}
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
# - name: Fetch the base branch
# run: git -c protocol.version=2 fetch --no-tags --progress --no-recurse-submodules --depth=1 origin +${{ github.base_ref }}:base
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.nodeVersion || env.NODE_LTS_VERSION }}
check-latest: true
- run: node -v
- run: corepack enable
- name: Setup Rust
uses: ./.github/actions/setup-rust
- uses: taiki-e/install-action@v2
with:
tool: cargo-codspeed
- name: Build the benchmark target(s)
run: cargo codspeed build --workspace
- name: Run the benchmarks
uses: CodSpeedHQ/action@v3
with:
run: cargo codspeed run --workspace --exclude turbopack-bench
# token: ${{ secrets.CODSPEED_TOKEN }}