|
| 1 | +name: Design diff frozen benchmark |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [codex/design-diff-benchmark-v3] |
| 6 | + |
| 7 | +permissions: |
| 8 | + contents: read |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: design-diff-benchmark-v3 |
| 12 | + cancel-in-progress: true |
| 13 | + |
| 14 | +env: |
| 15 | + ENGINE_SHA: 777a4aa4b303d3e06aa652818b068ac3374bfa28 |
| 16 | + |
| 17 | +jobs: |
| 18 | + replay: |
| 19 | + runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-latest' }} |
| 20 | + timeout-minutes: 60 |
| 21 | + strategy: |
| 22 | + fail-fast: false |
| 23 | + max-parallel: 8 |
| 24 | + matrix: |
| 25 | + shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] |
| 26 | + steps: |
| 27 | + - name: Checkout immutable engine |
| 28 | + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 |
| 29 | + with: |
| 30 | + ref: ${{ env.ENGINE_SHA }} |
| 31 | + path: engine |
| 32 | + fetch-depth: 0 |
| 33 | + persist-credentials: false |
| 34 | + - name: Checkout benchmark driver |
| 35 | + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 |
| 36 | + with: |
| 37 | + ref: ${{ github.sha }} |
| 38 | + path: driver |
| 39 | + persist-credentials: false |
| 40 | + - name: Setup Bun |
| 41 | + uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 |
| 42 | + with: |
| 43 | + bun-version: 1.4.1 |
| 44 | + - name: Install trusted dependencies |
| 45 | + working-directory: engine |
| 46 | + run: bun install --frozen-lockfile --ignore-scripts |
| 47 | + - name: Freeze shard and fetch source as data |
| 48 | + env: |
| 49 | + SHARD: ${{ matrix.shard }} |
| 50 | + GH_TOKEN: ${{ github.token }} |
| 51 | + run: bun --no-env-file driver/scripts/design-diff/cloud-benchmark.ts |
| 52 | + - name: Replay frozen comparisons |
| 53 | + working-directory: engine |
| 54 | + run: | |
| 55 | + bun --no-env-file scripts/design-diff/benchmark.ts \ |
| 56 | + --engine "$PWD" --sha "$ENGINE_SHA" --workers 1 \ |
| 57 | + --manifest "$RUNNER_TEMP/comparisons.json" --output "$RUNNER_TEMP/results" |
| 58 | + - name: Retain available results |
| 59 | + if: always() |
| 60 | + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 |
| 61 | + with: |
| 62 | + name: design-benchmark-${{ env.ENGINE_SHA }}-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.shard }} |
| 63 | + path: ${{ runner.temp }}/results/ |
| 64 | + retention-days: 7 |
| 65 | + if-no-files-found: error |
0 commit comments