Skip to content

Commit a2e8a64

Browse files
author
Hweinstock
committed
feat(ci): add compile step to ci that verifies binary
1 parent 00283de commit a2e8a64

3 files changed

Lines changed: 50 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,3 @@ jobs:
3131
if: always()
3232
- run: bun pm pack
3333
if: always()
34-
- run: bun run compile
35-
if: always()

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,9 @@ jobs:
2727
ref: ${{ github.event.pull_request.head.sha || github.sha }}
2828
secrets:
2929
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
30+
compile-binaries:
31+
uses: ./.github/workflows/compile.yml
32+
permissions:
33+
contents: read
34+
with:
35+
ref: ${{ github.event.pull_request.head.sha || github.sha }}

.github/workflows/compile.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Compiles native binaries for each platform and verifies they run.
2+
name: compile-binaries
3+
on:
4+
workflow_call:
5+
inputs:
6+
ref:
7+
required: true
8+
type: string
9+
10+
jobs:
11+
smoke-test:
12+
name: Compile (${{ matrix.name }})
13+
runs-on: ${{ fromJSON(matrix.runner) }}
14+
permissions:
15+
contents: read
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- name: Linux
21+
runner: '["codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}"]'
22+
target: linux-x64
23+
binary: ./dist/bin/agentcore-linux-x64
24+
- name: Windows
25+
runner: '["codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}", "image:windows-1.0"]'
26+
target: windows-x64
27+
binary: ./dist/bin/agentcore-windows-x64.exe
28+
# CodeBuild does not support macOS.
29+
- name: macOS
30+
runner: '["macos-latest"]'
31+
target: darwin-arm64
32+
binary: ./dist/bin/agentcore-darwin-arm64
33+
steps:
34+
- uses: actions/checkout@v7
35+
with:
36+
ref: ${{ inputs.ref }}
37+
persist-credentials: false
38+
- uses: oven-sh/setup-bun@v2
39+
- run: bun install --frozen-lockfile
40+
- name: Compile binary
41+
run: bun run compile:${{ matrix.target }}
42+
- name: Verify binary runs
43+
run: |
44+
${{ matrix.binary }} --help

0 commit comments

Comments
 (0)