|
| 1 | +name: ContextBench Real GPT54 Mini Auth Vars One |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [master] |
| 6 | + paths: |
| 7 | + - .github/workflows/contextbench-real-gpt54mini-auth-vars-one.yml |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +permissions: |
| 11 | + contents: read |
| 12 | + |
| 13 | +jobs: |
| 14 | + cbm-go-auth-vars-one: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + timeout-minutes: 45 |
| 17 | + env: |
| 18 | + ROOT: /tmp/contextbench-real-gpt54mini-auth-vars-one |
| 19 | + TASK_PAYLOADS: /tmp/contextbench-real-gpt54mini-auth-vars-one/task-payloads.json |
| 20 | + CHECKOUT_ROOT: /tmp/contextbench-checkouts |
| 21 | + OPENAI_MODEL: gpt-5.4-mini |
| 22 | + OPENAI_REASONING_EFFORT: high |
| 23 | + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY || vars.OPENAI_API_KEY || secrets.CODEX_OPENAI_API_KEY || vars.CODEX_OPENAI_API_KEY || secrets.OPENAI_KEY || vars.OPENAI_KEY || secrets.OPENAI_API_KEY_GPT54 || vars.OPENAI_API_KEY_GPT54 || secrets.CONTEXTBENCH_OPENAI_API_KEY || vars.CONTEXTBENCH_OPENAI_API_KEY }} |
| 24 | + CBM_BIN: /tmp/contextbench-real-gpt54mini-auth-vars-one/tool/codebase-memory-mcp |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v4 |
| 27 | + - uses: pnpm/action-setup@v2 |
| 28 | + with: |
| 29 | + version: 10 |
| 30 | + - uses: actions/setup-node@v4 |
| 31 | + with: |
| 32 | + node-version: '24' |
| 33 | + cache: pnpm |
| 34 | + - uses: actions/setup-python@v5 |
| 35 | + with: |
| 36 | + python-version: '3.11' |
| 37 | + |
| 38 | + - name: Check model auth from secrets or vars |
| 39 | + run: | |
| 40 | + if [ -z "$OPENAI_API_KEY" ]; then |
| 41 | + echo "::error::Missing model auth in Actions secrets and variables. Set OPENAI_API_KEY or one of the checked aliases." |
| 42 | + exit 78 |
| 43 | + fi |
| 44 | +
|
| 45 | + - name: Install and materialize frozen Go task |
| 46 | + run: | |
| 47 | + set -euxo pipefail |
| 48 | + mkdir -p "$ROOT" "$CHECKOUT_ROOT" "$ROOT/tool" |
| 49 | + pnpm install --frozen-lockfile |
| 50 | + python -m pip install "tree-sitter==0.20.4" "tree-sitter-languages==1.10.2" datasets pyarrow |
| 51 | + curl -fsSL "https://github.com/DeusData/codebase-memory-mcp/releases/download/v0.6.1/codebase-memory-mcp-linux-amd64.tar.gz" -o "$ROOT/tool/cbm.tar.gz" |
| 52 | + tar -xzf "$ROOT/tool/cbm.tar.gz" -C "$ROOT/tool" |
| 53 | + chmod +x "$CBM_BIN" || true |
| 54 | + git clone --depth 1 https://github.com/EuniAI/ContextBench.git "$ROOT/ContextBench-official" |
| 55 | + node scripts/contextbench-runner.mjs --validate-fixtures |
| 56 | + node scripts/contextbench-select-slice.mjs --write-task-payloads --out "$TASK_PAYLOADS" --checkout-root "$CHECKOUT_ROOT" |
| 57 | + node scripts/contextbench-select-slice.mjs --materialize-checkouts --payloads "$TASK_PAYLOADS" --max-tasks 3 |
| 58 | +
|
| 59 | + - name: Run same authenticated scoreable CBM row script |
| 60 | + env: |
| 61 | + OFFICIAL_CONTEXTBENCH: /tmp/contextbench-real-gpt54mini-auth-vars-one/ContextBench-official |
| 62 | + run: | |
| 63 | + python - <<'PY' |
| 64 | + from pathlib import Path |
| 65 | + text = Path('.github/workflows/contextbench-real-gpt54mini-auth-one.yml').read_text() |
| 66 | + marker = ' cat > "$ROOT/run.mjs" <<\'NODE\'\n' |
| 67 | + start = text.index(marker) + len(marker) |
| 68 | + end = text.index(' NODE\n node "$ROOT/run.mjs"', start) |
| 69 | + lines = [] |
| 70 | + for line in text[start:end].splitlines(): |
| 71 | + lines.append(line[10:] if line.startswith(' ') else line) |
| 72 | + Path('/tmp/contextbench-real-gpt54mini-auth-vars-one/run.mjs').write_text('\n'.join(lines) + '\n') |
| 73 | + PY |
| 74 | + node "$ROOT/run.mjs" |
| 75 | +
|
| 76 | + - name: Upload authenticated vars one-row artifacts |
| 77 | + if: always() |
| 78 | + uses: actions/upload-artifact@v4 |
| 79 | + with: |
| 80 | + name: contextbench-real-gpt54mini-auth-vars-one |
| 81 | + path: /tmp/contextbench-real-gpt54mini-auth-vars-one |
| 82 | + retention-days: 14 |
0 commit comments