Properly support patterns in inline_props #1475
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: JS framework benchmark | |
on: | |
pull_request: | |
branches: [main] | |
types: [labeled, synchronize] | |
jobs: | |
js-bench: | |
name: JS framework benchmark | |
runs-on: ubuntu-latest | |
if: >- | |
(github.event.action == 'labeled' && github.event.label.name == 'performance') || | |
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, | |
'performance')) | |
steps: | |
# Install necessary tooling | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: wasm32-unknown-unknown | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Install trunk | |
run: > | |
wget -qO- | |
https://github.com/thedodd/trunk/releases/download/v0.21.1/trunk-x86_64-unknown-linux-gnu.tar.gz | |
| tar -xzf- && sudo mv trunk /usr/bin/ | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Setup Chrome | |
uses: browser-actions/setup-chrome@v1 | |
with: | |
install-chromedriver: true | |
# Checkout repositories into respective directories | |
- uses: actions/checkout@v4 | |
with: | |
path: ./sycamore | |
- uses: actions/checkout@v4 | |
with: | |
path: ./sycamore-baseline | |
ref: ${{ github.event.pull_request.base.ref }} | |
- uses: actions/checkout@v4 | |
with: | |
repository: krausest/js-framework-benchmark | |
path: ./js-framework-benchmark | |
# Prepare the environment for running the benchmarks | |
- name: Delete all frameworks in js-framework-benchmark except for wasm-bindgen | |
run: | | |
mv ./js-framework-benchmark/frameworks/keyed/wasm-bindgen ./tmp | |
rm -rf ./js-framework-benchmark/frameworks/keyed/* | |
rm -rf ./js-framework-benchmark/frameworks/non-keyed/* | |
mv ./tmp ./js-framework-benchmark/frameworks/keyed/wasm-bindgen | |
- name: Configure benchmarks | |
run: node ./sycamore/packages/tools/configure_bench.js | |
- name: Benchmark list | |
run: | | |
ls ./js-framework-benchmark/frameworks/keyed | |
ls ./js-framework-benchmark/frameworks/keyed/sycamore | |
ls ./js-framework-benchmark/frameworks/keyed/sycamore-baseline | |
- name: Install js-framework-benchmark dependencies | |
run: | | |
cd ./js-framework-benchmark | |
npm ci | |
(cd server && npm ci) | |
(cd webdriver-ts && npm ci) | |
(cd webdriver-ts-results && npm ci) | |
(cd frameworks/keyed/sycamore && npm install) | |
(cd frameworks/keyed/sycamore-baseline && npm install) | |
- name: Start server | |
run: cd ./js-framework-benchmark && npm start & | |
- name: Build benchmark driver | |
run: cd ./js-framework-benchmark/webdriver-ts && npm run compile | |
- name: Run benchmark | |
run: cd ./js-framework-benchmark && npm run bench -- --headless --framework keyed/sycamore keyed/sycamore-baseline keyed/wasm-bindgen | |
- name: Results | |
run: cd ./js-framework-benchmark && npm run results | |
- name: Upload results JSON | |
uses: actions/upload-artifact@v3 | |
with: | |
name: results-json | |
path: js-framework-benchmark/webdriver-ts/results.json | |
- name: Upload results HTML | |
uses: actions/upload-artifact@v3 | |
with: | |
name: results-html | |
path: js-framework-benchmark/webdriver-ts-results/dist | |
- name: Log results | |
run: | | |
results=$(cd ./sycamore/packages/tools/bench-diff && cargo run -- ../../../../js-framework-benchmark/webdriver-ts/results.json) | |
echo "$results" | |
mkdir bench-results | |
echo "$results" &> bench-results/BENCH_RESULTS.txt | |
- name: Log PR number | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
run: echo "$PR_NUMBER" &> bench-results/PR_NUMBER.txt | |
- name: Upload bench diff | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bench-results | |
path: bench-results | |
retention-days: 1 |