fix: restore runnable darwin compiled binaries

fixes #754
This commit is contained in:
fettpl
2026-04-20 12:12:53 +02:00
committed by can1357
parent d0c40b1d5d
commit 14b08f89d4
6 changed files with 232 additions and 35 deletions
+79 -4
View File
@@ -173,9 +173,81 @@ jobs:
- name: Install method smoke tests
run: bun run ci:test:install-methods
release:
release_binary:
if: startsWith(github.ref, 'refs/tags/v')
needs: [check, native, test, install_methods]
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
target_id: linux-x64
native_artifact: pi-natives-linux-x64
binary_path: packages/coding-agent/binaries/omp-linux-x64
- os: ubuntu-24.04-arm
target_id: linux-arm64
native_artifact: pi-natives-linux-arm64
binary_path: packages/coding-agent/binaries/omp-linux-arm64
- os: macos-15-intel
target_id: darwin-x64
native_artifact: pi-natives-darwin-x64
binary_path: packages/coding-agent/binaries/omp-darwin-x64
- os: macos-14
target_id: darwin-arm64
native_artifact: pi-natives-darwin-arm64
binary_path: packages/coding-agent/binaries/omp-darwin-arm64
- os: windows-latest
target_id: win32-x64
native_artifact: pi-natives-win32-x64
binary_path: packages/coding-agent/binaries/omp-windows-x64.exe
runs-on: ${{ matrix.os }}
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3"
- name: Cache bun dependencies
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}
- run: bun install --frozen-lockfile
- name: Download native addon(s)
uses: actions/download-artifact@v4
with:
name: ${{ matrix.native_artifact }}
path: packages/natives/native
- name: Build release binary
env:
RELEASE_TARGETS: ${{ matrix.target_id }}
run: bun run ci:release:build-binaries
- name: Smoke release binary
if: runner.os != 'Windows'
run: |
runtime_dir="$(mktemp -d)"
HOME="$runtime_dir/home" XDG_DATA_HOME="$runtime_dir/xdg" "${{ matrix.binary_path }}" --version
- name: Smoke release binary (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$runtimeDir = Join-Path $env:TEMP ("omp-runtime-" + [System.Guid]::NewGuid().ToString("N"))
New-Item -ItemType Directory -Force -Path $runtimeDir | Out-Null
$env:HOME = Join-Path $runtimeDir "home"
$env:XDG_DATA_HOME = Join-Path $runtimeDir "xdg"
& "${{ matrix.binary_path }}" --version
- name: Upload release binary artifact
uses: actions/upload-artifact@v4
with:
name: omp-binary-${{ matrix.target_id }}
path: ${{ matrix.binary_path }}
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [release_binary]
runs-on: ubuntu-22.04
permissions:
contents: write
@@ -197,6 +269,12 @@ jobs:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}
- run: bun install --frozen-lockfile
- name: Download release binaries
uses: actions/download-artifact@v4
with:
pattern: omp-binary-*
path: packages/coding-agent/binaries
merge-multiple: true
- name: Download native addons
uses: actions/download-artifact@v4
with:
@@ -205,9 +283,6 @@ jobs:
merge-multiple: true
- name: Verify native addons
run: bun run ci:release:verify-natives
- name: Build binaries
run: bun run ci:release:build-binaries
- name: Stage native addons for release
run: cp packages/natives/native/*.node packages/coding-agent/binaries/
- name: Create GitHub Release