-
-
Notifications
You must be signed in to change notification settings - Fork 2
128 lines (111 loc) · 3.39 KB
/
Copy pathbenchmark.yml
File metadata and controls
128 lines (111 loc) · 3.39 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
name: Benchmark
on:
push:
branches: [main]
# Benchmark inputs: C source, TS source, benchmarks, and build config.
# Docs-only and CI-only changes skip the workflow entirely.
paths:
- "src/**"
- "clay" # submodule pointer
- "patches/**"
- "Makefile"
- "*.ts"
- "bench/**"
- "tasks/**"
- "deno.json"
- "deno.lock"
- "package.json"
- "package-lock.json"
pull_request:
branches: [main]
paths:
- "src/**"
- "clay" # submodule pointer
- "patches/**"
- "Makefile"
- "*.ts"
- "bench/**"
- "tasks/**"
- "deno.json"
- "deno.lock"
- "package.json"
- "package-lock.json"
# `workflow_dispatch` allows CodSpeed to trigger
workflow_dispatch:
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-24.04
permissions:
contents: read # clone repo
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: true
persist-credentials: false
- name: Setup Deno
uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5
with:
deno-version: v2.x
- name: Build WASM
run: make
- name: Cache dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
id: deno-cache
with:
path: node_modules
key: deno-${{ hashFiles('deno.lock') }}
- name: Install dependencies
if: steps.deno-cache.outputs.cache-hit != 'true'
run: deno install
- name: Upload build artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: bench-build
retention-days: 1
path: wasm.ts
benchmarks:
name: Run benchmarks (walltime)
needs: build
runs-on: codspeed-macro
permissions:
contents: read # clone repo
id-token: write # upload benchmark results to codspeed
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Deno
uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5
with:
deno-version: v2.x
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- name: Download build artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: bench-build
- name: Restore dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
id: deno-cache
with:
path: node_modules
key: deno-codspeed-${{ runner.arch }}-${{ hashFiles('deno.lock') }}
- name: Install dependencies
if: steps.deno-cache.outputs.cache-hit != 'true'
run: deno install
- name: Run walltime benchmarks
uses: CodSpeedHQ/action@373d6868929f444bc08d901fd0eb0ad52a8875ea # v5.2.1
with:
mode: walltime
run: |
node bench/startup.bench.ts
node bench/throughput.bench.ts
node bench/render.bench.ts
node bench/ops.bench.ts