|
| 1 | +name: ContextBench Final Lane Readiness |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [master] |
| 6 | + paths: |
| 7 | + - .github/workflows/contextbench-final-lane-readiness.yml |
| 8 | + - scripts/contextbench-final-lane-candidate-pack.mjs |
| 9 | + workflow_dispatch: |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: read |
| 13 | + |
| 14 | +jobs: |
| 15 | + final-lane-readiness: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + timeout-minutes: 35 |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + max-parallel: 2 |
| 21 | + matrix: |
| 22 | + lane: |
| 23 | + - grepai |
| 24 | + - codegraphcontext |
| 25 | + env: |
| 26 | + ROOT: /tmp/contextbench-final-lane/${{ matrix.lane }} |
| 27 | + TASK_PAYLOADS: /tmp/contextbench-final-lane/${{ matrix.lane }}/task-payloads.json |
| 28 | + CHECKOUT_ROOT: /tmp/contextbench-final-checkouts-${{ matrix.lane }} |
| 29 | + TARGET_TASK_ID: SWE-Bench-Pro__go__maintenance__bugfix__4df06349 |
| 30 | + LANE_ID: ${{ matrix.lane }} |
| 31 | + OLLAMA_HOST: http://127.0.0.1:11434 |
| 32 | + steps: |
| 33 | + - uses: actions/checkout@v4 |
| 34 | + - uses: pnpm/action-setup@v2 |
| 35 | + with: |
| 36 | + version: 10 |
| 37 | + - uses: actions/setup-node@v4 |
| 38 | + with: |
| 39 | + node-version: '24' |
| 40 | + cache: pnpm |
| 41 | + - uses: actions/setup-python@v5 |
| 42 | + with: |
| 43 | + python-version: '3.11' |
| 44 | + - name: Install shared setup and materialize selected Go task |
| 45 | + shell: bash |
| 46 | + run: | |
| 47 | + set -euo pipefail |
| 48 | + mkdir -p "$ROOT" "$CHECKOUT_ROOT" "$ROOT/tool" "$ROOT/logs" |
| 49 | + pnpm install --frozen-lockfile > "$ROOT/logs/pnpm-install.log" 2>&1 |
| 50 | + python -m pip install "tree-sitter==0.20.4" "tree-sitter-languages==1.10.2" datasets pyarrow > "$ROOT/logs/pip-shared.log" 2>&1 |
| 51 | + node scripts/contextbench-runner.mjs --validate-fixtures > "$ROOT/logs/validate-fixtures.log" 2>&1 |
| 52 | + node scripts/contextbench-select-slice.mjs --write-task-payloads --out "$TASK_PAYLOADS.all" --checkout-root "$CHECKOUT_ROOT" > "$ROOT/logs/write-payloads.log" 2>&1 |
| 53 | + node - <<'NODE' |
| 54 | + const fs = require('node:fs'); |
| 55 | + const payloadPath = process.env.TASK_PAYLOADS; |
| 56 | + const target = process.env.TARGET_TASK_ID; |
| 57 | + const payload = JSON.parse(fs.readFileSync(`${payloadPath}.all`, 'utf8')); |
| 58 | + const task = payload.tasks.find((candidate) => candidate.instance_id === target); |
| 59 | + if (!task) throw new Error(`target task ${target} not found`); |
| 60 | + fs.writeFileSync(payloadPath, `${JSON.stringify({ ...payload, task_count: 1, tasks: [task] }, null, 2)}\n`); |
| 61 | + NODE |
| 62 | + node scripts/contextbench-select-slice.mjs --materialize-checkouts --payloads "$TASK_PAYLOADS" --max-tasks 1 > "$ROOT/logs/materialize.log" 2>&1 |
| 63 | + - name: Install grepai with local Ollama embeddings |
| 64 | + if: matrix.lane == 'grepai' |
| 65 | + shell: bash |
| 66 | + run: | |
| 67 | + set -euo pipefail |
| 68 | + curl -sSL https://raw.githubusercontent.com/yoanbernabeu/grepai/main/install.sh | sh > "$ROOT/logs/grepai-install.log" 2>&1 |
| 69 | + echo "$HOME/.local/bin" >> "$GITHUB_PATH" |
| 70 | + echo "$HOME/bin" >> "$GITHUB_PATH" |
| 71 | + curl -fsSL https://ollama.com/install.sh | sh > "$ROOT/logs/ollama-install.log" 2>&1 |
| 72 | + nohup ollama serve > "$ROOT/logs/ollama-serve.log" 2>&1 & |
| 73 | + for i in {1..45}; do |
| 74 | + if curl -fsS "$OLLAMA_HOST/api/version" > "$ROOT/logs/ollama-version.log" 2>&1; then |
| 75 | + break |
| 76 | + fi |
| 77 | + sleep 2 |
| 78 | + done |
| 79 | + curl -fsS "$OLLAMA_HOST/api/version" >> "$ROOT/logs/ollama-version.log" 2>&1 |
| 80 | + ollama pull nomic-embed-text > "$ROOT/logs/ollama-pull-nomic-embed-text.log" 2>&1 |
| 81 | + - name: Install codegraphcontext lane |
| 82 | + if: matrix.lane == 'codegraphcontext' |
| 83 | + shell: bash |
| 84 | + run: python -m pip install codegraphcontext kuzu real_ladybug > "$ROOT/logs/pip-codegraphcontext.log" 2>&1 |
| 85 | + - name: Generate final lane readiness candidate pack |
| 86 | + shell: bash |
| 87 | + run: node scripts/contextbench-final-lane-candidate-pack.mjs |
| 88 | + - name: Upload final lane readiness artifacts |
| 89 | + if: always() |
| 90 | + uses: actions/upload-artifact@v4 |
| 91 | + with: |
| 92 | + name: contextbench-final-lane-readiness-${{ matrix.lane }} |
| 93 | + path: /tmp/contextbench-final-lane/${{ matrix.lane }} |
| 94 | + retention-days: 14 |
0 commit comments