33 push :
44 workflow_dispatch :
55
6+ # Prevent multiple runs from interfering with each other
7+ concurrency :
8+ group : ${{ github.workflow }}-${{ github.ref }}
9+ cancel-in-progress : true
10+
611jobs :
712 setup :
813 name : ' Setup'
914 runs-on : ubuntu-latest
15+ timeout-minutes : 10
1016 steps :
1117 - uses : actions/checkout@v4
1218 - name : Cache Bins
@@ -21,187 +27,113 @@ jobs:
2127 - name : Install & Setup Tools
2228 run : |
2329 bash ./scripts/setup.sh
24- task :
25- name : ' Benchmark Running Tasks'
26- runs-on : ubuntu-latest
27- needs : [setup]
28- steps :
29- - name : Restore Bins
30- uses : actions/cache/restore@v4
31- with :
32- path : bins
33- key : bins
34- - name : Run Task Execution Benchmarks
35- run : |
36- bash ./scripts/run.sh
37- - name : Upload Benchmark Results
38- uses : actions/upload-artifact@v4
39- with :
40- name : task-benchmark-results
41- path : ./results/run.json
42- next :
43- name : ' Benchmark Next Project'
44- runs-on : ubuntu-latest
45- needs : [setup]
46- steps :
47- - name : Restore Bins
48- uses : actions/cache/restore@v4
49- with :
50- path : bins
51- key : bins
52- - name : Run Project Benchmarks
53- run : |
54- bash ./scripts/install.sh next
55- - name : Upload Benchmark Results
56- uses : actions/upload-artifact@v4
57- with :
58- name : next-benchmark-results
59- path : ./results/next/
60- astro :
61- name : ' Benchmark Astro Project'
62- runs-on : ubuntu-latest
63- needs : [setup]
64- steps :
65- - name : Restore Bins
66- uses : actions/cache/restore@v4
67- with :
68- path : bins
69- key : bins
70- - name : Run Project Benchmarks
71- run : |
72- bash ./scripts/install.sh astro
73- - name : Upload Benchmark Results
74- uses : actions/upload-artifact@v4
75- with :
76- name : astro-benchmark-results
77- path : ./results/astro/
78- svelte :
79- name : ' Benchmark Svelte Project'
30+
31+ benchmark :
32+ name : ' Run Benchmarks'
8033 runs-on : ubuntu-latest
8134 needs : [setup]
35+ timeout-minutes : 30
36+ strategy :
37+ matrix :
38+ project : [next, astro, svelte, vue]
39+ cache : [cold, warm]
40+ include :
41+ - project : next
42+ cache : cold
43+ - project : astro
44+ cache : cold
45+ - project : svelte
46+ cache : cold
47+ - project : vue
48+ cache : cold
49+ - project : next
50+ cache : warm
51+ - project : astro
52+ cache : warm
53+ - project : svelte
54+ cache : warm
55+ - project : vue
56+ cache : warm
8257 steps :
58+ - uses : actions/checkout@v4
8359 - name : Restore Bins
8460 uses : actions/cache/restore@v4
8561 with :
8662 path : bins
8763 key : bins
8864 - name : Run Project Benchmarks
8965 run : |
90- bash ./scripts/install.sh svelte
66+ if [ "${{ matrix.cache }}" = "warm" ]; then
67+ bash ./scripts/install-warm.sh ${{ matrix.project }}
68+ else
69+ bash ./scripts/install.sh ${{ matrix.project }}
70+ fi
9171 - name : Upload Benchmark Results
9272 uses : actions/upload-artifact@v4
9373 with :
94- name : svelete-benchmark-results
95- path : ./results/svelte/
96- vue :
97- name : ' Benchmark Vue Project'
74+ name : ${{ matrix.project }}-${{ matrix.cache }}-results
75+ path : ./results/${{ matrix.project }}/
76+ retention-days : 7
77+
78+ task :
79+ name : ' Benchmark Running Tasks'
9880 runs-on : ubuntu-latest
9981 needs : [setup]
82+ timeout-minutes : 15
10083 steps :
84+ - uses : actions/checkout@v4
10185 - name : Restore Bins
10286 uses : actions/cache/restore@v4
10387 with :
10488 path : bins
10589 key : bins
106- - name : Run Project Benchmarks (Vue)
107- run : |
108- bash ./scripts/install.sh vue
109- - name : Upload Benchmark Results
110- uses : actions/upload-artifact@v4
111- with :
112- name : vue-benchmark-results
113- path : ./results/vue/
114- next-warm :
115- name : ' Benchmark Next Project (warm cache)'
116- runs-on : ubuntu-latest
117- steps :
118- - uses : actions/checkout@v4
119- - name : Install Node
120- uses : actions/setup-node@v2
121- with :
122- node-version : ' 22'
123- - name : Install & Setup Tools
124- run : |
125- bash ./scripts/setup.sh
126- - name : Run Project Benchmarks
127- run : |
128- bash ./scripts/install-warm.sh next
129- - name : Upload Benchmark Results
130- uses : actions/upload-artifact@v4
131- with :
132- name : next-benchmark-results
133- path : ./results/next/
134- astro-warm :
135- name : ' Benchmark Astro Project (warm cache)'
136- runs-on : ubuntu-latest
137- steps :
138- - uses : actions/checkout@v4
139- - name : Install Node
140- uses : actions/setup-node@v2
141- with :
142- node-version : ' 22'
143- - name : Install & Setup Tools
144- run : |
145- bash ./scripts/setup.sh
146- - name : Run Project Benchmarks
90+ - name : Run Task Execution Benchmarks
14791 run : |
148- bash ./scripts/install-warm .sh astro
92+ bash ./scripts/run .sh
14993 - name : Upload Benchmark Results
15094 uses : actions/upload-artifact@v4
15195 with :
152- name : astro-benchmark-results
153- path : ./results/astro/
154- svelte-warm :
155- name : ' Benchmark Svelte Project (warm cache)'
96+ name : task-benchmark-results
97+ path : ./results/run.json
98+ retention-days : 7
99+
100+ process :
101+ name : ' Process Results'
156102 runs-on : ubuntu-latest
103+ needs : [benchmark, task]
104+ timeout-minutes : 5
157105 steps :
158106 - uses : actions/checkout@v4
159- - name : Install Node
160- uses : actions/setup-node@v2
107+ - name : Download Results
108+ uses : actions/download-artifact@v4
161109 with :
162- node-version : ' 22'
163- - name : Install & Setup Tools
164- run : |
165- bash ./scripts/setup.sh
166- - name : Run Project Benchmarks
110+ path : results
111+ merge-multiple : true
112+ - name : Process Results
167113 run : |
168- bash ./scripts/install-warm .sh svelte
169- - name : Upload Benchmark Results
114+ bash ./scripts/process-results .sh
115+ - name : Upload Processed Results
170116 uses : actions/upload-artifact@v4
171117 with :
172- name : svelete-benchmark-results
173- path : ./results/svelte/
174- vue-warm :
175- name : ' Benchmark Vue Project (warm cache)'
118+ name : processed-results
119+ path : chart/results/
120+ retention-days : 7
121+
122+ deploy :
123+ name : ' Deploy Results'
176124 runs-on : ubuntu-latest
125+ needs : [process]
126+ if : github.ref == 'refs/heads/main'
177127 steps :
178128 - uses : actions/checkout@v4
179- - name : Install Node
180- uses : actions/setup-node@v2
129+ - name : Download Results
130+ uses : actions/download-artifact@v4
181131 with :
182- node-version : ' 22'
183- - name : Install & Setup Tools
184- run : |
185- bash ./scripts/setup.sh
186- - name : Run Project Benchmarks (Vue)
187- run : |
188- bash ./scripts/install-warm.sh vue
189- - name : Upload Benchmark Results
190- uses : actions/upload-artifact@v4
191- with :
192- name : vue-benchmark-results
193- path : ./results/vue/
194-
195-
196- # make a chart with the results
197- chart :
198- name : ' Chart the Benchmark Results'
199- runs-on : ubuntu-latest
200- needs : [task, next, astro, svelte, vue]
201- steps :
202- - uses : actions/download-artifact@v4
132+ name : processed-results
133+ path : chart/results/
134+ - name : Deploy to GitHub Pages
135+ uses : peaceiris/actions-gh-pages@v3
203136 with :
204- path : results
205- merge-multiple : true
206- - name : List the results
207- run : ls -R results
137+ github_token : ${{ secrets.GITHUB_TOKEN }}
138+ publish_dir : chart/results
139+ force_orphan : true
0 commit comments