mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
73 lines
1.8 KiB
YAML
73 lines
1.8 KiB
YAML
---
|
|
name: Benchmark - SSR
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [master]
|
|
paths:
|
|
- .github/workflows/benchmark-ssr.yml
|
|
- "packages/yew/**"
|
|
- "packages/yew-macro/**"
|
|
- "packages/yew-router/**"
|
|
- "packages/yew-router-macro/**"
|
|
- "examples/function_router/**"
|
|
- "tools/benchmark-ssr/**"
|
|
|
|
jobs:
|
|
benchmark-ssr:
|
|
name: Benchmark - SSR
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout master
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: "yewstack/yew"
|
|
ref: master
|
|
path: yew-master
|
|
|
|
- name: Checkout pull request
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: current-pr
|
|
|
|
- name: Setup toolchain
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: stable
|
|
targets: wasm32-unknown-unknown
|
|
|
|
- name: Restore Rust cache for master
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
working-directory: yew-master
|
|
key: master
|
|
|
|
- name: Restore Rust cache for current pull request
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
working-directory: current-pr
|
|
key: pr
|
|
|
|
- name: Run pull request benchmark
|
|
run: cargo run --profile=bench -- --output-path ../output.json
|
|
working-directory: current-pr/tools/benchmark-ssr
|
|
|
|
- name: Run master benchmark
|
|
run: cargo run --profile=bench -- --output-path ../output.json
|
|
working-directory: yew-master/tools/benchmark-ssr
|
|
|
|
- name: Write Pull Request ID
|
|
run: |
|
|
echo "${{ github.event.number }}" > .PR_NUMBER
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: benchmark-ssr
|
|
path: |
|
|
.PR_NUMBER
|
|
yew-master/tools/output.json
|
|
current-pr/tools/output.json
|
|
retention-days: 1
|