fix: have node output perf maps when not parsing V8 inlining logs #851
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: "CI" | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| check: | |
| strategy: | |
| matrix: | |
| os: ["ubuntu-latest", "codspeedhq-arm64-ubuntu-22.04"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: "actions/checkout@v4" | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - uses: pnpm/action-setup@v2 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| cache: pnpm | |
| node-version-file: .nvmrc | |
| - name: Restore turbo cache | |
| uses: ./.github/actions/turbo-cache | |
| - run: pnpm install --frozen-lockfile --prefer-offline | |
| - run: pnpm turbo run lint typecheck test | |
| list-examples: | |
| runs-on: "ubuntu-latest" | |
| name: List examples | |
| outputs: | |
| examples: ${{ steps.list-examples.outputs.examples }} | |
| steps: | |
| - uses: "actions/checkout@v4" | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| # list the directories in ./examples and output them to a github action workflow variables as a JSON array | |
| - run: | | |
| examples=$(find ./examples -maxdepth 1 -mindepth 1 -type d -printf '%f\n' | jq -R -s -c 'split("\n") | map(select(length > 0))') | |
| echo "examples=$examples" >> $GITHUB_OUTPUT | |
| id: list-examples | |
| node-versions: | |
| runs-on: "ubuntu-latest" | |
| name: "${{ matrix.example }} on Node ${{ matrix.node-version }}" | |
| needs: list-examples | |
| strategy: | |
| matrix: | |
| node-version: ["18", "20.5.1"] | |
| example: ${{ fromJson(needs.list-examples.outputs.examples) }} | |
| # tinybench v5+ requires Node >=20, so its examples cannot run on Node 18 | |
| exclude: | |
| - node-version: "18" | |
| example: "with-tinybench-v5" | |
| - node-version: "18" | |
| example: "with-tinybench-v6" | |
| fail-fast: false | |
| steps: | |
| - uses: "actions/checkout@v4" | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - uses: pnpm/action-setup@v2 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| cache: pnpm | |
| node-version: ${{ matrix.node-version }} | |
| - name: Restore turbo cache | |
| uses: ./.github/actions/turbo-cache | |
| with: | |
| key-suffix: node${{ matrix.node-version }} | |
| - run: pnpm install --frozen-lockfile --prefer-offline | |
| - run: pnpm turbo run build | |
| - name: Run benchmarks with tinybench-plugin | |
| # use version from `main` branch to always test the latest version, in real projects, use a tag, like `@v2` | |
| uses: CodSpeedHQ/action@main | |
| with: | |
| mode: instrumentation | |
| run: pnpm --filter ${{ matrix.example }} bench-tinybench | |
| env: | |
| CODSPEED_SKIP_UPLOAD: true | |
| CODSPEED_DEBUG: true | |
| - name: Run benchmarks with benchmark.js-plugin | |
| # use version from `main` branch to always test the latest version, in real projects, use a tag, like `@v2` | |
| uses: CodSpeedHQ/action@main | |
| with: | |
| mode: instrumentation | |
| run: pnpm --filter ${{ matrix.example }} bench-benchmark-js | |
| env: | |
| CODSPEED_SKIP_UPLOAD: true | |
| CODSPEED_DEBUG: true |