mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 01:51:03 +09:00
CI: Add js-benchmarks workflow
This workflow starts after a successful js-artifacts workflow, picks up the JS repl binary and runs our js-benchmarks tool. It does not yet publish or otherwise store the benchmark results, but it's a start!
This commit is contained in:
parent
8671b0568d
commit
2752e01fe7
Notes:
github-actions[bot]
2025-03-22 12:06:36 +00:00
Author: https://github.com/gmta
Commit: 2752e01fe7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4034
1 changed files with 61 additions and 0 deletions
61
.github/workflows/js-benchmarks.yml
vendored
Normal file
61
.github/workflows/js-benchmarks.yml
vendored
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
name: 'Run the JS benchmarks'
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ['Package the js repl as a binary artifact']
|
||||||
|
branches: [master]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
js-benchmarks:
|
||||||
|
runs-on: js-benchmarks-runner
|
||||||
|
if: ${{ github.repository == 'LadybirdBrowser/ladybird' && github.event.workflow_run.conclusion == 'success' }}
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: js-benchmarks
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout LadybirdBrowser/js-benchmarks'
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: LadybirdBrowser/js-benchmarks
|
||||||
|
path: js-benchmarks
|
||||||
|
|
||||||
|
- name: 'Install dependencies'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y clang++-19 python3-venv
|
||||||
|
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 100
|
||||||
|
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 100
|
||||||
|
|
||||||
|
- name: 'Download JS repl artifact'
|
||||||
|
id: download-artifact
|
||||||
|
uses: dawidd6/action-download-artifact@v9
|
||||||
|
with:
|
||||||
|
workflow: js-artifacts.yml
|
||||||
|
name: ladybird-js-Linux-x86_64
|
||||||
|
path: js-repl
|
||||||
|
|
||||||
|
- name: 'Extract JS repl'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd js-repl
|
||||||
|
tar -xvzf ladybird-js-Linux-x86_64.tar.gz
|
||||||
|
|
||||||
|
- name: 'Run the JS benchmarks'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd js-benchmarks
|
||||||
|
python3 -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
python3 -m pip install -r requirements.txt
|
||||||
|
./run.py --executable=${{ github.workspace }}/js-repl/bin/js --iterations=5
|
||||||
|
|
||||||
|
- name: 'Save results as an artifact'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: js-benchmarks-results
|
||||||
|
path: js-benchmarks/results.json
|
||||||
|
retention-days: 93
|
Loading…
Add table
Add a link
Reference in a new issue