From 74581b5861a31f7d7f3490f6f67af04ffb70eeba Mon Sep 17 00:00:00 2001 From: bakape Date: Mon, 19 Jul 2021 02:10:15 +0300 Subject: [PATCH] ci, docs: fix CI benchmarks and benchmarking docs (#1955) * ci, docs: fix CI benchmarks and benchmarking docs * ci: temporarily remove `labeled` requirement for benchmarks * force CI * force CI * ci: restore label filters for benchmarks --- .github/workflows/benchmark.yml | 4 ++-- CONTRIBUTING.md | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 71ead8e12..635cd1099 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -16,11 +16,11 @@ jobs: steps: - uses: actions/checkout@v2 with: - repository: yewstack/js-framework-benchmark + repository: bakape/js-framework-benchmark - name: Configure benchmark run: | - search="{ git = \"https://github.com/yewstack/yew\", branch = \"master\" }" + search="{path = \"PATH\"}" replace="{ git = \"${{ github.event.pull_request.head.repo.html_url }}\", branch = \"${{ github.event.pull_request.head.ref }}\" }" input=$(cat frameworks/keyed/yew/Cargo.toml) output=${input//"$search"/"$replace"} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 87d882b9f..f3a0cf348 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,7 +60,7 @@ Alternatively, you can set the `ECHO_SERVER_URL` environment variable to the URL When adding or updating tests, please make sure to update the appropriate `stderr` file, which you can find [here](https://github.com/yewstack/yew/tree/master/packages/yew-macro/tests/macro) for the `html!` macro. These files ensure that macro compilation errors are correct and easy to understand. -These errors can change with each release of the compiler so they should be generated with the Rust version 1.51 +These errors can change with each release of the compiler so they should be generated with the Rust version 1.51 (because some tests make use of const generics which were stabilized in that version). To update or generate a new `stderr` file you can run `cargo make test-overwrite` in the `yew-macro` directory. @@ -85,11 +85,9 @@ Some components of Yew have dedicated benchmarks which can be run with the follo cargo make benchmarks ``` -There's also a benchmark for the framework as a whole. Running it is a bit more involved: - -1. Fork and clone [yewstack/js-framework-benchmark](https://github.com/yewstack/js-framework-benchmark) -2. Update `frameworks/yew/Cargo.toml` with your fork of Yew and the branch for your changes -3. Open a new PR with your `Cargo.toml` changes +There's also a benchmark for the framework as a whole. +Simply clone [bakape/js-framework-benchmark](https://github.com/bakape/js-framework-benchmark) +and follow the repository's README. Feel free to add new benchmark tests if the current benchmark coverage is insufficient!