Skip to content

Commit 420193d

Browse files
Rick Valdesclaude
andcommitted
Retry flaky baseline builds, and never lose a platform to one
The windows-x64 job died on "Failed to extract executable for bun-windows-x64-baseline-v1.3.14. The download may be incomplete." Building the no-AVX2 variant makes Bun fetch extra cross-compilation artifacts, and that fetch is known-flaky — opencode's own build script calls it out. The build now retries three times, and if the baseline variant still will not download, falls back to building the native binary alone rather than failing the platform outright. The installer only requests -baseline on non-AVX2 x64 hardware; everyone else is served by the native asset, so a missing baseline should degrade coverage, not erase the platform. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f7d7b52 commit 420193d

1 file changed

Lines changed: 26 additions & 5 deletions

File tree

.github/workflows/utmstack-release.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,33 @@ jobs:
6767
env:
6868
OPENCODE_VERSION: ${{ steps.version.outputs.value }}
6969
run: |
70-
# --baseline additionally emits the no-AVX2 variant for x64 targets.
71-
if [ "${{ matrix.baseline }}" = "true" ]; then
72-
bun run script/build.ts --single --baseline
73-
else
74-
bun run script/build.ts --single
70+
# --baseline additionally emits the no-AVX2 variant for x64 targets,
71+
# which requires Bun to fetch extra cross-compilation artifacts. That
72+
# download is known to be flaky ("Failed to extract executable for
73+
# bun-<target>-baseline"), so retry before giving up.
74+
build() {
75+
if [ "${{ matrix.baseline }}" = "true" ]; then
76+
bun run script/build.ts --single --baseline
77+
else
78+
bun run script/build.ts --single
79+
fi
80+
}
81+
ok=0
82+
for attempt in 1 2 3; do
83+
echo "build attempt $attempt"
84+
if build; then ok=1; break; fi
85+
echo "attempt $attempt failed; retrying in 15s"
86+
sleep 15
87+
done
88+
if [ "$ok" != "1" ] && [ "${{ matrix.baseline }}" = "true" ]; then
89+
# A flaky baseline artifact must not cost us the primary binary for
90+
# this platform. Fall back to the native build alone; the installer
91+
# only requests -baseline on non-AVX2 x64 hardware, and the native
92+
# asset still serves everyone else.
93+
echo "baseline builds failed 3x — falling back to the native build only"
94+
bun run script/build.ts --single && ok=1
7595
fi
96+
[ "$ok" = "1" ] || { echo "build failed after retries"; exit 1; }
7697
ls -la dist/
7798
7899
- name: Verify the binary is branded and self-contained

0 commit comments

Comments
 (0)