Repository navigation
51 lines (50 loc) · 1.54 KB
/
Copy pathcompare-models.yml
File metadata and controls
51 lines (50 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Compare Models
on:
workflow_dispatch:
inputs:
opencode_opencode_gpt_5_codex:
description: opencode:opencode/gpt-5-codex
type: boolean
default: false
permissions:
contents: read
actions: read
jobs:
publish:
runs-on: blacksmith-4vcpu-ubuntu-2404
outputs:
sha: ${{ steps.publish.outputs.sha }}
urls: ${{ steps.publish.outputs.urls }}
packages: ${{ steps.publish.outputs.packages }}
matrix: ${{ steps.build-matrix.outputs.matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.21
- name: Install dependencies
run: bun install
- name: Build
run: bun run build
- id: publish
name: Publish preview with pkg.pr.new
run: bunx pkg-pr-new publish --bun
- id: build-matrix
name: Build matrix from selected models
env:
WORKFLOW_INPUTS: ${{ toJSON(inputs) }}
run: |
set -euo pipefail
# Pass all inputs to the script
MATRIX_JSON=$(echo "$WORKFLOW_INPUTS" | bun run scripts/build-workflow-matrix.ts)
echo "matrix=${MATRIX_JSON}" >> "$GITHUB_OUTPUT"
run-benchmarks:
needs: publish
if: needs.publish.result == 'success' && needs.publish.outputs.urls != ''
uses: ./.github/workflows/benchmark-reusable.yml
with:
matrix: ${{ needs.publish.outputs.matrix }}
package_urls: ${{ needs.publish.outputs.urls }}
secrets: inherit