-
Notifications
You must be signed in to change notification settings - Fork 8
62 lines (52 loc) · 1.5 KB
/
publish-benchmark.yml
File metadata and controls
62 lines (52 loc) · 1.5 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
52
53
54
55
56
57
58
59
60
61
62
name: Publish and Benchmark Preview Packages
on:
# push:
# branches:
# - main
# tags:
# - "!**"
# pull_request:
# branches:
# - main
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.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: matrix
name: Build benchmark matrix
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
bun add -g opencode-ai@dev @openai/codex-sdk
set -euo pipefail
MATRIX_JSON="$(bun run scripts/generate-benchmark-matrix.ts)"
printf 'matrix=%s\n' "${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