forked from rome/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into integr-docs
* upstream/main: (73 commits) fix(semantic_analyzers): style/noShoutyConstants does not recognize multiple uses of a constant. (rome#3789) feat(rome_js_analyze): useDefaultSwitchClauseLast (rome#3791) chore: run rustfmt and typo fix (rome#3840) feat(rome_js_analyze): use exhaustive deps support properties (rome#3581) website(docs): Fix text formatting (rome#3828) feat(rome_js_analyze): `noVoidTypeReturn` (rome#3806) feat(rome_cli): expose the `--verbose` flag to the CLI (rome#3812) fix(rome_diagnostics): allow diagnostic locations to be created without a resource (rome#3834) feat(rome_js_analyze): add noExtraNonNullAssertion rule (rome#3797) fix(rome_lsp): lsp friendly catch unwind (rome#3740) feat(rome_js_semantic): model improvements (rome#3825) feat(rome_json_parser): JSON Lexer (rome#3809) feat(rome_js_analyze): implement `noDistractingElements` (rome#3820) fix(rome_js_formatter): shothanded named import line break with default import (rome#3826) feat(rome_js_analyze): `noConstructorReturn` (rome#3805) feat(website): change enabledNurseryRules to All/Recommended select (rome#3810) feat(rome_js_analyze): noSetterReturn feat(rome_js_analyze): noConstructorReturn feat(rome_analyze): suppress rule via code actions (rome#3572) feat(rome_js_analyze): `noVar` (rome#3765) ...
- Loading branch information
Showing
1,270 changed files
with
341,920 additions
and
6,340 deletions.
There are no files selected for viewing
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
Validating CODEOWNERS rules …
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# CLI benchmark, compares main and PR branch with Hyperfine. | ||
# Comment with text containing `!bench_cli`, a new result will be commented at the bottom of this PR. | ||
|
||
name: CLI Benchmark | ||
|
||
on: | ||
issue_comment: | ||
types: [ created ] | ||
|
||
env: | ||
RUST_LOG: info | ||
|
||
jobs: | ||
bench: | ||
name: Bench | ||
if: github.event.issue.pull_request && contains(github.event.comment.body, '!bench_cli') | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Get PR SHA | ||
id: sha | ||
uses: actions/github-script@v6 | ||
with: | ||
result-encoding: string | ||
script: | | ||
const response = await github.request(context.payload.issue.pull_request.url); | ||
return response.data.head.sha; | ||
- name: Checkout PR Branch | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: false | ||
ref: ${{ steps.sha.outputs.result }} | ||
|
||
- name: Install toolchain | ||
run: rustup show | ||
|
||
- name: Cache | ||
uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Install hyperfine | ||
run: cargo install hyperfine | ||
|
||
- name: Compile on PR Branch | ||
run: | | ||
cargo build --release --bin rome | ||
mkdir -p benchmark/target | ||
cp target/release/rome benchmark/target/rome_pr | ||
- name: Checkout Main Branch | ||
uses: actions/checkout@v3 | ||
with: | ||
clean: false | ||
ref: main | ||
|
||
- name: Compile on Main Branch | ||
run: | | ||
cargo build --release --bin rome | ||
cp target/release/rome benchmark/target/rome_main | ||
- name: Checkout webpack | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: webpack/webpack | ||
path: benchmark/target/webpack | ||
- name: Checkout prettier | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: prettier/prettier | ||
path: benchmark/target/prettier | ||
- name: Checkout eslint | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: eslint/eslint | ||
path: benchmark/target/eslint | ||
|
||
- name: Run Benchmarks | ||
id: benchmarks | ||
working-directory: benchmark/target | ||
env: | ||
FORMAT_BENCH_COMMAND: "format webpack/lib webpack/examples webpack/declarations webpack/benchmark prettier/src prettier/scripts --write" | ||
CHECK_BENCH_COMMAND: "--max-diagnostics=0 eslint/lib eslint/messages eslint/tests/lib eslint/tests/performance eslint/tools webpack/lib" | ||
run: | | ||
hyperfine -w 2 --export-markdown benchmark_format.md \ | ||
-n "rome format (main)" "./rome_main $FORMAT_BENCH_COMMAND" \ | ||
-n "rome format (pr)" "./rome_pr $FORMAT_BENCH_COMMAND" | ||
hyperfine -w 2 --export-markdown benchmark_check.md \ | ||
-n "rome check (main)" "./rome_main check $CHECK_BENCH_COMMAND" \ | ||
-n "rome check (pr)" "./rome_pr check $CHECK_BENCH_COMMAND" | ||
cat benchmark_format.md >> benchmark.md | ||
echo $'\n' >> benchmark.md | ||
cat benchmark_check.md >> benchmark.md | ||
- name: Write a new comment | ||
uses: peter-evans/create-or-update-comment@v2 | ||
continue-on-error: true | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
body-file: benchmark/target/benchmark.md |
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.