-
Notifications
You must be signed in to change notification settings - Fork 11
109 lines (88 loc) · 3 KB
/
Copy pathci.yml
File metadata and controls
109 lines (88 loc) · 3 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
name: CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
benchmark:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: taiki-e/checkout-action@afad4df3ab3122b166e8226ac83be4d981fb64e8 # v1.3.2
- uses: oxc-project/setup-node@8958a8e040102244b619c4a94fccb657a44b1c21 # v1.0.6
- uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2.1.2
- name: Install hyperfine
uses: taiki-e/install-action@30eab0fabba9ea3f522099957e668b21876aa39e # v2.66.6
with:
tool: hyperfine
- name: Test Vite build
working-directory: apps/10000
run: |
node --run build:vite
ls -lh dist-vite
- name: Test Rsbuild build
working-directory: apps/10000
run: |
node --run build:rsbuild
ls -lh dist-rsbuild
- name: Test Rspack build
working-directory: apps/10000
run: |
node --run build:rspack
ls -lh dist-rspack
- name: Test Rolldown build
working-directory: apps/10000
run: |
node --run build:rolldown
ls -lh dist-rolldown
- name: Test esbuild build
working-directory: apps/10000
run: |
node --run build:esbuild
ls -lh dist-esbuild
- name: Test Bun build
working-directory: apps/10000
run: |
node --run build:bun
ls -lh dist-bun
- name: Run benchmark
run: node bench.mjs --app apps/10000 > benchmark-output.txt
- name: Upload benchmark results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: benchmark-${{ matrix.os }}
path: benchmark-output.txt
update-readme:
needs: benchmark
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
contents: write
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
token: ${{ secrets.TOKEN }}
- name: Download all benchmark results
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
path: ./results
- uses: oxc-project/setup-node@8958a8e040102244b619c4a94fccb657a44b1c21 # v1.0.6
- name: Update README
run: node scripts/update-readme.mjs
- uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
with:
commit_message: 'chore: update benchmark results in README [skip ci]'
file_pattern: README.md