Skip to content

feat: improve ci perf #123

feat: improve ci perf

feat: improve ci perf #123

Workflow file for this run

name: CI
on:
push:
branches:
- main
paths-ignore:
- "**/*.md"
pull_request:
types: [opened, synchronize]
branches: [main]
paths-ignore:
- "**/*.md"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
prepare-binding:
name: Prepare Rspack Binding
runs-on: [self-hosted, benchmark]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare-rspack-binding
ci:
needs: prepare-binding
runs-on: [self-hosted, benchmark]
timeout-minutes: 30
strategy:
matrix:
suite:
- 10000_development-mode
- 10000_development-mode_hmr
- 10000_production-mode
- arco-pro_development-mode
- arco-pro_development-mode_intercept-plugin
- arco-pro_development-mode_hmr
- arco-pro_development-mode_hmr_intercept-plugin
- arco-pro_production-mode
- arco-pro_production-mode_intercept-plugin
- threejs_development-mode_10x
- threejs_development-mode_10x_hmr
- threejs_production-mode_10x
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/build-rspack
- run: pnpm install
- name: Run benchmark
run: node bin/bench.js ${{ matrix.suite }}
- 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