From 0414e46a6030d8c6f1424b4418b7045cc9b6e5db Mon Sep 17 00:00:00 2001 From: James Maes Date: Sun, 8 Nov 2026 07:52:03 -0600 Subject: [PATCH] ci(release): build no musl binaries; the gate passes, musl fails v1.0.1-rc.1 passed scripts/release.mjs in CI, then build-binaries stopped: Bun on the glibc container installs no OpenTUI musl native package (@opentui/core-linux-x64-musl), and the script calls musl best effort. The release ships linux x64/arm64, darwin x64/arm64 and windows x64; install.sh says so on musl hosts and points at the npm package. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/release.yaml | 7 ++++--- docs/release-runbook.md | 8 ++++++-- scripts/install.sh | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 50e710f..5b1db91 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -2,7 +2,8 @@ # Licensed under the Apache License, Version 2.0 (see LICENSE). # # Release on a v tag (docs/release-runbook.md): -# linux scripts/release.mjs gate; Linux, darwin-x64 binaries (cross); draft Gitea release +# linux scripts/release.mjs gate; linux-x64, linux-arm64, darwin-x64 binaries (cross); draft Gitea release +# (no musl builds: bun installs no OpenTUI musl native package on a glibc host) # macos native darwin-arm64 binary, built and smoke-tested on the macOS runner # windows native windows-x64 binary, built and smoke-tested on the Windows runner # publish SHA256SUMS; publish the release and check its downloads; the four npm packages to the @@ -73,7 +74,7 @@ jobs: shell: bash run: | set -euo pipefail - node scripts/build-binaries.mjs --no-build --targets linux-x64,linux-arm64,linux-x64-musl,linux-arm64-musl,darwin-x64 + node scripts/build-binaries.mjs --no-build --targets linux-x64,linux-arm64,darwin-x64 scripts/verify-binary.sh dist/qqq-linux-x64 - name: Draft Gitea release @@ -251,7 +252,7 @@ jobs: mkdir -p /tmp/assets tr ';' '\n' <<< "$SUMS" | sed '/^$/d' | sort -k2 > /tmp/assets/SHA256SUMS cat /tmp/assets/SHA256SUMS - for want in qqq-linux-x64 qqq-linux-arm64 qqq-linux-x64-musl qqq-linux-arm64-musl qqq-darwin-x64 qqq-darwin-arm64 qqq-windows-x64.exe; do + for want in qqq-linux-x64 qqq-linux-arm64 qqq-darwin-x64 qqq-darwin-arm64 qqq-windows-x64.exe; do grep -Eq "^[0-9a-f]{64} $want\$" /tmp/assets/SHA256SUMS || { echo "No checksum for $want"; exit 1; } done curl -fsS -o /dev/null -X POST -H "Authorization: token $TOKEN" -F "attachment=@/tmp/assets/SHA256SUMS" \ diff --git a/docs/release-runbook.md b/docs/release-runbook.md index a1273d4..e74a8f6 100644 --- a/docs/release-runbook.md +++ b/docs/release-runbook.md @@ -12,7 +12,7 @@ What ships: | Artifact | Where | Made by | |---|---|---| -| `qqq` binaries with the terminal UI, 7 targets, plus `SHA256SUMS` | Gitea release `v` of `QRun-IO/qqq-cli` | `release.yaml`: Linux targets and darwin-x64 (cross) in the container, darwin-arm64 on the macOS runner, windows-x64 on the Windows runner | +| `qqq` binaries with the terminal UI, 5 targets (linux x64/arm64, darwin x64/arm64, windows x64), plus `SHA256SUMS` | Gitea release `v` of `QRun-IO/qqq-cli` | `release.yaml`: Linux targets and darwin-x64 (cross) in the container, darwin-arm64 on the macOS runner, windows-x64 on the Windows runner | | `@qrun-io/qqq-ui-api-client`, `qqq-core`, `qqq-ui-api-conformance`, `qqq-cli` | QRun-IO Gitea npm registry, `https://git.kof22.com/api/packages/QRun-IO/npm/` | `release.yaml` publish job | | Homebrew formula `qqq` | `QRun-IO/homebrew-tap`, `Formula/qqq.rb` | `release.yaml` (final versions), else a pull request | | Scoop manifest `qqq` | `QRun-IO/scoop-bucket`, `bucket/qqq.json` | `release.yaml` (final versions), else a pull request | @@ -54,7 +54,7 @@ prerelease: npm dist-tag `next` for prerelease packages, a Gitea prerelease, and 1. **linux** (`container-build`, `node:22.23.4-bookworm`, Bun 1.4.4 checksum-pinned): `scripts/release.mjs --skip-binaries` (npm ci, generate drift, build, readiness for finals, tests, lint, - TUI tests and type check, pack dry runs), then the linux-x64, linux-arm64, both musl and darwin-x64 + TUI tests and type check, pack dry runs), then the linux-x64, linux-arm64 and darwin-x64 binaries (`scripts/build-binaries.mjs`), the `scripts/verify-binary.sh` smoke on linux-x64, and a **draft** Gitea release with those binaries. An existing release for the tag fails the run. 2. **macos** (`qqq-macos-arm64`) and **windows** (`qqq-windows-vm6218`), in parallel: pinned Node.js @@ -70,6 +70,10 @@ prerelease: npm dist-tag `next` for prerelease packages, a Gitea prerelease, and Watch it under Actions in `QRun-IO/qqq-cli`. The release page is `https://git.kof22.com/QRun-IO/qqq-cli/releases/tag/v`. +**No musl binaries.** `build-binaries.mjs --musl` is best effort: on the glibc build container Bun does not +install OpenTUI's musl native packages, so the release carries no `qqq-linux-*-musl`. On Alpine and other +musl hosts use the npm package (`@qrun-io/qqq-cli`, CLI only) until a musl build lane exists. + ## 4. Homebrew tap and Scoop bucket (when CI could not push) `PACKAGES_TOKEN` is the package-scoped publisher token; unless it is granted write on the tap and the diff --git a/scripts/install.sh b/scripts/install.sh index f0929e2..ae3475c 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -118,7 +118,7 @@ trap 'rm -rf "$tmp"' EXIT trap 'exit 130' INT TERM say "Downloading qqq $version ($file)" -fetch "$url" "$tmp/$file" || die "download failed: $url" +fetch "$url" "$tmp/$file" || die "download failed: $url${musl:+ (releases since 1.0.1 have no musl build; on musl hosts install the CLI with npm: @qrun-io/qqq-cli)}" fetch "$base/v$version/SHA256SUMS" "$tmp/SHA256SUMS" || die "download failed: $base/v$version/SHA256SUMS" expected="$(awk -v f="$file" '$2 == f { print $1 }' "$tmp/SHA256SUMS")" -- 2.54.0