Bench Rspack Merge Queue #135
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: Bench Rspack Merge Queue | |
on: | |
workflow_dispatch: | |
inputs: | |
rspack_ref: | |
description: "The fully-formed ref of the branch or tag. eg. refs/heads/<branch_name>" | |
required: true | |
type: string | |
jobs: | |
run-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 origin ${{ inputs.rspack_ref }} | |
- name: Run benchmark | |
run: node bin/bench.js | |
- id: print-results | |
name: Print results | |
run: | | |
result=$(node bin/compare-bench.js latest current) | |
echo "$result" | |
if [[ $result =~ "Threshold exceeded" ]]; then | |
echo "Some benchmark cases exceed the threshold, please visit the previous step for more information" | |
exit 1 | |
fi |