Skip to content

test: batch only unfinished frozen comparisons #12

test: batch only unfinished frozen comparisons

test: batch only unfinished frozen comparisons #12

name: Design diff frozen benchmark
on:
push:
branches: [codex/design-diff-benchmark-v3]
permissions:
contents: read
concurrency:
group: design-diff-benchmark-v3
cancel-in-progress: true
env:
ENGINE_SHA: c8d1bf882d9fbfc73adfb7eb71d1cd46b3e2b286
SHARD_COUNT: 14
REMAINING_ORDERS: '[94, 95, 96, 97, 98, 99, 100, 101, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179]'
jobs:
replay:
runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-latest' }}
timeout-minutes: 45
strategy:
fail-fast: false
max-parallel: 14
matrix:
shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
steps:
- name: Checkout immutable engine
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
ref: ${{ env.ENGINE_SHA }}
path: engine
fetch-depth: 0
persist-credentials: false
- name: Checkout benchmark driver
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
ref: ${{ github.sha }}
path: driver
persist-credentials: false
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.1
- name: Install trusted dependencies
working-directory: engine
run: bun install --frozen-lockfile --ignore-scripts
- name: Freeze shard and fetch source as data
env:
SHARD: ${{ matrix.shard }}
GH_TOKEN: ${{ github.token }}
run: bun --no-env-file driver/scripts/design-diff/cloud-benchmark.ts
- name: Replay frozen comparisons
working-directory: engine
run: |
bun --no-env-file scripts/design-diff/benchmark.ts \
--engine "$PWD" --sha "$ENGINE_SHA" --workers 1 --timeout-seconds 900 \
--manifest "$RUNNER_TEMP/comparisons.json" --output "$RUNNER_TEMP/results"
- name: Retain available results
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: design-benchmark-${{ env.ENGINE_SHA }}-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.shard }}
path: ${{ runner.temp }}/results/
retention-days: 7
if-no-files-found: error