-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1744a17
commit ec1ae2e
Showing
1 changed file
with
33 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
bench: | ||
runs-on: [self-hosted, rspack-bench] | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Init env | ||
uses: ./.github/actions/env | ||
- name: Build rspack | ||
run: node bin/build-rspack.js | ||
- name: Run benchmark | ||
run: node bin/bench.js | ||
- id: print-compare-results | ||
name: Print compare results | ||
run: | | ||
result=$(node bin/compare-bench.js latest current) | ||
echo "$result" | ||
echo "diff-result=${result//$'\n'/'@@'}" >> $GITHUB_OUTPUT | ||
- name: Check Threshold | ||
run: | | ||
result="${{ steps.print-compare-results.outputs.diff-result }}"; | ||
if [[ $result =~ "Threshold exceeded" ]]; then | ||
echo "Some benchmark cases exceed the threshold, please visit the previous step for more information" | ||
exit 1 | ||
fi |