feat: input parser probe-response recognition → CapabilityEvent #344
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: | |
| push: | |
| branches: [main] | |
| # Benchmark inputs: C source, TS source, benchmarks, and build config. | |
| # Docs-only and CI-only changes skip the workflow entirely. | |
| paths: | |
| - "src/**" | |
| - "clay" # submodule pointer | |
| - "patches/**" | |
| - "Makefile" | |
| - "*.ts" | |
| - "bench/**" | |
| - "tasks/**" | |
| - "deno.json" | |
| - "deno.lock" | |
| - "package.json" | |
| - "package-lock.json" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "src/**" | |
| - "clay" # submodule pointer | |
| - "patches/**" | |
| - "Makefile" | |
| - "*.ts" | |
| - "bench/**" | |
| - "tasks/**" | |
| - "deno.json" | |
| - "deno.lock" | |
| - "package.json" | |
| - "package-lock.json" | |
| # `workflow_dispatch` allows CodSpeed to trigger | |
| workflow_dispatch: | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read # clone repo | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| submodules: true | |
| persist-credentials: false | |
| - name: Setup Deno | |
| uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5 | |
| with: | |
| deno-version: v2.x | |
| - name: Build WASM | |
| run: make | |
| - name: Cache dependencies | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| id: deno-cache | |
| with: | |
| path: node_modules | |
| key: deno-${{ hashFiles('deno.lock') }} | |
| - name: Install dependencies | |
| if: steps.deno-cache.outputs.cache-hit != 'true' | |
| run: deno install | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: bench-build | |
| retention-days: 1 | |
| path: wasm.ts | |
| benchmarks: | |
| name: Run benchmarks (walltime) | |
| needs: build | |
| runs-on: codspeed-macro | |
| permissions: | |
| contents: read # clone repo | |
| id-token: write # upload benchmark results to codspeed | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Deno | |
| uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5 | |
| with: | |
| deno-version: v2.x | |
| - name: Setup Node | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 24 | |
| - name: Download build artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: bench-build | |
| - name: Restore dependencies | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| id: deno-cache | |
| with: | |
| path: node_modules | |
| key: deno-codspeed-${{ runner.arch }}-${{ hashFiles('deno.lock') }} | |
| - name: Install dependencies | |
| if: steps.deno-cache.outputs.cache-hit != 'true' | |
| run: deno install | |
| - name: Run walltime benchmarks | |
| uses: CodSpeedHQ/action@373d6868929f444bc08d901fd0eb0ad52a8875ea # v5.2.1 | |
| with: | |
| mode: walltime | |
| run: | | |
| node bench/startup.bench.ts | |
| node bench/throughput.bench.ts | |
| node bench/render.bench.ts | |
| node bench/ops.bench.ts |