-
Notifications
You must be signed in to change notification settings - Fork 11
69 lines (58 loc) · 1.66 KB
/
benchmarks.yml
File metadata and controls
69 lines (58 loc) · 1.66 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
name: Benchmarks
on:
push:
branches:
- main
paths-ignore:
- "**/*.md"
- "docs/**"
- "assets/**"
- "LICENSE"
workflow_dispatch:
env:
SKIP_INSTALL_SIMPLE_GIT_HOOKS: "1"
concurrency:
group: benchmarks-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
benchmark:
name: Benchmark scripts
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.10
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run bootstrap benchmark
run: |
mkdir -p benchmark-results
bun run bench:bootstrap-load | tee benchmark-results/bootstrap-load.txt
- name: Run highlight prefetch benchmark
run: |
bun run bench:highlight-prefetch | tee benchmark-results/highlight-prefetch.txt
- name: Run large stream benchmark
run: |
bun run bench:large-stream | tee benchmark-results/large-stream.txt
- name: Publish benchmark summary
run: |
{
echo '## Benchmark results'
echo
for file in benchmark-results/*.txt; do
echo "### $(basename "$file")"
echo '```text'
cat "$file"
echo '```'
echo
done
} >> "$GITHUB_STEP_SUMMARY"
- name: Upload benchmark artifacts
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: benchmark-results/*.txt
if-no-files-found: error