chore(deps): bump rand from 0.10.0 to 0.10.1 #1
This file contains hidden or 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: Performance Regression | |
| on: | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| benchmark: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install Rust | |
| uses: dtolnay/rust-action@stable | |
| - name: Cache cargo | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Run Benchmarks (PR) | |
| run: cargo bench --workspace -- --save-baseline pr | |
| - name: Checkout Main | |
| run: | | |
| git fetch origin main | |
| git checkout origin/main | |
| - name: Run Benchmarks (Main) | |
| run: cargo bench --workspace -- --save-baseline main | |
| - name: Compare Results | |
| run: cargo bench --workspace -- --baseline main --threshold 10 | |
| - name: Upload Results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-results | |
| path: target/criterion/ |