Skip to content

Commit f7d7b52

Browse files
Rick Valdesclaude
andcommitted
Fix the release verify picking a musl binary on glibc runners
With --baseline the build also emits musl variants, and the verify step used `find dist -type f -name utmstack | head -1`, which took whichever directory sorted first. On the x64 runners that was opencode-linux-x64-baseline-musl — a musl-linked binary, which cannot execute on a glibc runner. The kernel reports the missing ELF interpreter as "No such file or directory" and the step died with 127, having built perfectly good binaries. Verify now addresses dist/opencode-<matrix.target>/bin directly, so each job tests the artifact it is actually responsible for. Packaging now skips musl variants entirely. They come out of the build for free, but they are untested and unadvertised, and the installer refuses musl with an explicit message — shipping them would promise support we have not verified. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d8a4bdc commit f7d7b52

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/utmstack-release.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,14 @@ jobs:
8080
working-directory: packages/opencode
8181
run: |
8282
set -eu
83-
BIN=$(find dist -type f \( -name utmstack -o -name utmstack.exe \) | head -1)
84-
[ -n "$BIN" ] || { echo "no utmstack binary produced"; exit 1; }
83+
# Address the exact matrix target. `find | head -1` picked whichever
84+
# directory sorted first, which on x64 runs was the musl variant —
85+
# a musl-linked binary cannot execute on a glibc runner (missing ELF
86+
# interpreter, which surfaces as "No such file or directory" / 127).
87+
DIST="dist/opencode-${{ matrix.target }}"
88+
BIN="$DIST/bin/utmstack"
89+
[ -f "$BIN" ] || BIN="$DIST/bin/utmstack.exe"
90+
[ -f "$BIN" ] || { echo "no binary at $DIST/bin"; ls -R dist | head -40; exit 1; }
8591
echo "binary: $BIN"
8692
8793
got=$("$BIN" --version | tr -d '\r')
@@ -117,6 +123,10 @@ jobs:
117123
for dir in dist/*/; do
118124
name=$(basename "$dir")
119125
[ -d "$dir/bin" ] || continue
126+
# The build emits musl variants for free, but they are untested and
127+
# unadvertised, and the installer refuses musl outright. Publishing
128+
# them would promise support we have not verified.
129+
case "$name" in *-musl*) echo "skipping $name (musl, not published)"; continue ;; esac
120130
asset=$(echo "$name" | sed 's/^opencode-/utmstack-/')
121131
if [ "${{ matrix.ext }}" = "tar.gz" ]; then
122132
tar -czf "$OUT/${asset}.tar.gz" -C "$dir/bin" .

0 commit comments

Comments
 (0)