Files
PodTui/.github/workflows/release.yml
Michael Freno c9e3aa92ec fix release pipeline: vendored cava source, fftw in CI, runner arch, smoke test
- Vendor cava/cavacore.c + header (MIT, from karlstav/cava) — the FFI build
  referenced cava/cavacore.c which was never committed, so every CI runner
  failed at scripts/build-cavacore.sh and no release was possible.
- build-cavacore.sh: discover libfftw3.a across Homebrew and Debian/Ubuntu
  multiarch paths (FFTW_PREFIX override preserved).
- release.yml: install fftw before building cavacore; run the boot smoke test
  from a bunfig-free dir (the embedded runtime reads the CWD bunfig.toml and
  this repo's preload entry breaks it — 'preload not found'); use
  macos-15-intel for darwin-x64 (macos-latest is arm64).
- Makefile/build.ts: drop the no-op BUN_CONFIG=bunfig.standalone.toml compile
  dance (Bun never honored it; compile output is config-independent); delete
  bunfig.standalone.toml.
2026-08-07 14:27:35 -04:00

99 lines
2.8 KiB
YAML

name: release
# Builds standalone PodTui binaries for each supported OS/arch and attaches
# them to a GitHub Release. One runner per platform because Bun cannot
# cross-compile — each runner runs `make dist`, which emits a
# podtui-<platform>-<arch>.tar.gz (binary + native libs side by side).
#
# Trigger: push a tag like v0.1.0. Bump VERSION in src/index.tsx in the same
# commit as the tag so the released binary reports the tagged version.
on: # intentional: YAML `on` key
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
name: build (${{ matrix.os }} / ${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x64
plat: linux
- os: ubuntu-24.04-arm
arch: arm64
plat: linux
- os: macos-15-intel
arch: x64
plat: darwin
- os: macos-14
arch: arm64
plat: darwin
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Install fftw (cavacore build dependency)
run: |
if uname -s | grep -qi darwin; then
brew install fftw
else
sudo apt-get update
sudo apt-get install -y libfftw3-dev
fi
- name: Build native cavacore library
run: scripts/build-cavacore.sh
- name: Build standalone binary + tarball
run: make dist
- name: Smoke-test binary boot
env:
DIST_TAR: podtui-${{ matrix.plat }}-${{ matrix.arch }}.tar.gz
run: |
# The embedded runtime reads the launching process's CWD bunfig.toml.
# This repo's bunfig lists a preload the standalone can't resolve
# ("preload not found"), so kicking the binary from the workspace root
# would falsely fail every build. cd into a clean dir first.
SMOKE_DIR=$(mktemp -d)
tar -xzf "dist/$DIST_TAR" -C "$SMOKE_DIR"
cd "$SMOKE_DIR"
./podtui-*/podtui --version
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: podtui-${{ matrix.plat }}-${{ matrix.arch }}
path: dist/podtui-*.tar.gz
upload:
name: Attach to GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all binaries
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Publish release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: artifacts/**/*.tar.gz