Finalize Prime Agent benchmarks #4175
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: Finalize Prime Agent benchmarks | |
| on: | |
| workflow_run: | |
| workflows: [Prime Agent benchmarks] | |
| types: [completed] | |
| permissions: {} | |
| jobs: | |
| cleanup: | |
| if: contains(fromJSON('["pull_request_target", "workflow_dispatch"]'), github.event.workflow_run.event) | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| ref: main | |
| persist-credentials: false | |
| - name: Install benchmark tooling | |
| run: | | |
| python3 -m venv .benchmark-bootstrap | |
| .benchmark-bootstrap/bin/pip install uv==0.12.9 | |
| .benchmark-bootstrap/bin/uv sync --locked --project scripts/benchmarks | |
| echo "$PWD/.benchmark-bootstrap/bin" >> "$GITHUB_PATH" | |
| - name: Delete remaining run sandboxes | |
| working-directory: scripts/benchmarks | |
| run: uv run --locked cli.py cleanup | |
| env: | |
| PRIME_SANDBOX_API_KEY: ${{ secrets.PRIME_SANDBOX_API_KEY }} | |
| PRIME_TEAM_ID: ${{ vars.PRIME_BENCHMARK_TEAM_ID }} | |
| publish: | |
| if: contains(fromJSON('["pull_request_target", "workflow_dispatch"]'), github.event.workflow_run.event) | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| concurrency: | |
| group: prime-agent-benchmark-comment-${{ github.event.workflow_run.display_title }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| actions: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| ref: main | |
| persist-credentials: false | |
| - name: Download request | |
| id: request | |
| continue-on-error: true | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.0 | |
| with: | |
| name: benchmark-request-${{ github.event.workflow_run.run_attempt }} | |
| path: scripts/benchmarks/request | |
| run-id: ${{ github.event.workflow_run.id }} | |
| github-token: ${{ github.token }} | |
| - name: Download results | |
| if: steps.request.outcome == 'success' | |
| continue-on-error: true | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.0 | |
| with: | |
| name: benchmark-results-${{ github.event.workflow_run.run_attempt }} | |
| path: scripts/benchmarks/results | |
| run-id: ${{ github.event.workflow_run.id }} | |
| github-token: ${{ github.token }} | |
| - name: Install benchmark tooling | |
| if: steps.request.outcome == 'success' | |
| run: | | |
| python3 -m venv .benchmark-bootstrap | |
| .benchmark-bootstrap/bin/pip install uv==0.12.9 | |
| .benchmark-bootstrap/bin/uv sync --locked --project scripts/benchmarks | |
| echo "$PWD/.benchmark-bootstrap/bin" >> "$GITHUB_PATH" | |
| - name: Publish the current result | |
| if: steps.request.outcome == 'success' | |
| working-directory: scripts/benchmarks | |
| run: uv run --locked cli.py finalize | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} |