mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 04:55:15 +00: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
c0974c00fa
commit
8240de7cd5
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
Reference in a new issue