mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-21 16:02:20 +00:00
ci(macos): give the DMG somewhere to go on a runner that ran out of disk (#476)
Three nightlies in a row died in bundle-macos.sh with "hdiutil: create failed - No space left on device", across two different commits, always on macos-15-intel and never on arm64. The build, the signing and the notarization all succeed; the volume simply cannot hold the disk image on top of everything already staged on it. At `hdiutil create` the volume carries the whole release `target/` tree, the signed dist/tty7.app, the compressed update zip, a second full copy of the bundle under dist/dmg-stage, and the image being written. Two of those five are avoidable: Stage the bundle with `mv` instead of `cp -R`. Nothing reads dist/tty7.app after this point — the updater ships the zip, nightly.yml verifies that zip by extracting it elsewhere, and release.yml knows tty7.app only as an intermediate to keep out of the upload globs. Drop the build tree before the image is written. Every binary it produced is already inside the bundle and no later step in either workflow reads it. The cost is that rust-cache finds little left to save and the next macOS build recompiles the dependency graph — a slower nightly, against no nightly at all. `df -h` runs first so the next person to touch this has the number. Co-authored-by: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com>
This commit is contained in:
@@ -210,12 +210,33 @@ if [[ "$PACKAGE_UPDATE_ZIP" != "0" ]]; then
|
||||
fi
|
||||
|
||||
# Package the (now stapled) bundle as a drag-to-Applications DMG.
|
||||
#
|
||||
# `hdiutil` needs room for the whole image beside the staged bundle, and the
|
||||
# hosted Intel runners stopped having it — three nightlies in a row died right
|
||||
# here on 2026-08-10 with "hdiutil: create failed - No space left on device",
|
||||
# across two different commits. The arm64 runners have never hit it. So the two
|
||||
# steps below give the image somewhere to go rather than assuming there is room.
|
||||
DMG="dist/tty7-${VERSION}-macos-${ARCH}.dmg"
|
||||
STAGE="dist/dmg-stage"
|
||||
rm -rf "$STAGE"
|
||||
mkdir "$STAGE"
|
||||
cp -R "$APP" "$STAGE/"
|
||||
# `mv`, not `cp -R`: this is the peak, and a second full copy of the bundle is
|
||||
# the most expensive thing on the volume that nobody needs. Nothing reads
|
||||
# dist/tty7.app after this point — the zip above is what the updater ships and
|
||||
# what nightly.yml verifies (it extracts that, not this), and release.yml only
|
||||
# knows about tty7.app as an intermediate to keep out of the upload globs.
|
||||
mv "$APP" "$STAGE/"
|
||||
ln -s /Applications "$STAGE/Applications"
|
||||
# The build tree is dead weight from here on: every binary it produced is
|
||||
# already inside the bundle, and no later step in either workflow reads it.
|
||||
# The cost is that rust-cache finds little left to save, so the next macOS
|
||||
# build recompiles the dependency graph. That is a slower nightly; the
|
||||
# alternative is no nightly at all. `df` first so the next person to look at
|
||||
# this has the number that made it necessary.
|
||||
df -h . || true
|
||||
rm -rf "target/${TARGET}/release/deps" \
|
||||
"target/${TARGET}/release/build" \
|
||||
"target/${TARGET}/release/incremental"
|
||||
hdiutil create -volname "tty7" -srcfolder "$STAGE" -ov -format UDZO "$DMG"
|
||||
rm -rf "$STAGE"
|
||||
if [[ -n "$SIGN_ID" && -n "${APPLE_CERTIFICATE:-}" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user