Skip to content

Commit 8e0c826

Browse files
committed
Continuous benchmarking in CI
1 parent 5439c76 commit 8e0c826

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,28 @@ jobs:
321321
if: runner.os != 'Windows'
322322
run: make -C tests/gentype_tests/typescript-react-example clean test
323323

324-
- name: Build playground compiler
324+
- name: Run syntax benchmarks
325325
if: matrix.benchmarks
326-
run: |
327-
opam exec -- node packages/playground-bundling/scripts/generate_cmijs.js
328-
opam exec -- dune build --profile browser
329-
cp ./_build/default/compiler/jsoo/jsoo_playground_main.bc.js playground/compiler.js
326+
run: ./_build/install/default/bin/syntax_benchmarks | tee tests/benchmark-output.json
330327

328+
- name: Download previous benchmark data
329+
if: matrix.benchmarks
330+
uses: actions/cache@v4
331+
with:
332+
path: ./tests/benchmark-cache
333+
key: syntax-benchmark-v1
334+
335+
- name: Store benchmark result
336+
if: matrix.benchmarks
337+
uses: benchmark-action/github-action-benchmark@v1
338+
with:
339+
tool: "customSmallerIsBetter"
340+
output-file-path: tests/benchmark-output.json
341+
external-data-json-path: ./tests/benchmark-cache/benchmark-data.json
342+
github-token: ${{ secrets.GITHUB_TOKEN }}
343+
alert-threshold: "150%"
344+
comment-always: true
345+
comment-on-alert: true
331346

332347
- name: Build playground compiler
333348
if: matrix.build_playground

0 commit comments

Comments
 (0)