feat: support NODE_PATH (#185) #765
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: Benchmark | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| types: [opened, synchronize] | |
| paths-ignore: | |
| - "**/*.md" | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "**/*.md" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| benchmark: | |
| name: Benchmark | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Branch | |
| uses: taiki-e/checkout-action@83ed61bfbe2b8abbb3c66e8b65b1335484c70009 # v1.4.1 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version-file: .node-version | |
| cache: pnpm | |
| - name: Setup benchmark data | |
| run: cd benches && pnpm install --ignore-workspace | |
| - uses: Boshen/setup-rust@main | |
| with: | |
| cache-key: benchmark | |
| save-cache: ${{ github.ref_name == 'main' }} | |
| tools: cargo-codspeed | |
| - uses: ./.github/actions/pnpm | |
| - name: Build Benchmark | |
| env: | |
| RUSTFLAGS: "-C debuginfo=1 -C strip=none -g" | |
| run: cargo codspeed build | |
| - name: Run CPU benchmark | |
| uses: CodSpeedHQ/action@281164b0f014a4e7badd2c02cecad9b595b70537 # https://github.com/CodSpeedHQ/action/releases/tag/v4.10.6 | |
| timeout-minutes: 30 | |
| with: | |
| mode: simulation | |
| run: cargo codspeed run | |
| token: ${{ secrets.CODSPEED_TOKEN }} | |
| - name: Run memory benchmark | |
| uses: CodSpeedHQ/action@281164b0f014a4e7badd2c02cecad9b595b70537 # https://github.com/CodSpeedHQ/action/releases/tag/v4.10.6 | |
| timeout-minutes: 30 | |
| with: | |
| mode: memory | |
| run: cargo codspeed run | |
| token: ${{ secrets.CODSPEED_TOKEN }} |