Scheduled Bench #338
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: Scheduled Bench | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
bench: | |
runs-on: [self-hosted, benchmark] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Init env | |
uses: ./.github/actions/env | |
- name: Build rspack | |
run: node bin/cli.js build --ref db5d248cfea196551b69a60e7c4f1b6825f8196e | |
- name: Run benchmark | |
run: node bin/cli.js bench | |
- id: print-compare-results | |
name: Print compare results | |
run: | | |
result=$(node bin/cli.js compare --base latest --current current) | |
echo "$result" | |
echo "diff-result=${result//$'\n'/'@@'}" >> $GITHUB_OUTPUT | |
# - name: Setup git user | |
# run: | | |
# git config --global user.name "github-actions[bot]" | |
# git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
# - name: Upload result | |
# run: node bin/upload.js ${{ secrets.GITHUB_TOKEN }} | |
# - 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 |