build.sh and the releases/ scripts wrote all over the machine: temporary
files to /tmp and macOS's /var/folders, downloads and release zips to
~/Downloads or ~/Lataukset, Meteor to ~/.meteor, Node.js to /usr/local
(sudo n) or ~/.nvm, the npm cache to ~/.npm, Volta to ~/.volta, the
Sandstorm toolchain to ~/projects, and PATH lines into ~/.zshrc and
~/.bashrc. A sandboxed editor (Flatpak on Linux, sandbox-exec on macOS)
can reach only the checkout, and a container's own /tmp is a few hundred
megabytes. Everything is in .tools/ now, which git and Meteor ignore:
- releases/tools-env.sh, sourced by build.sh and every script that writes
files, sets TMPDIR/TMP/TEMP to .tools/tmp (also downloads and release
zips), NVM_DIR, npm_config_cache, VOLTA_HOME and the meteor-spk
directory to .tools/, METEOR_WAREHOUSE_DIR to .tools/.meteor once Meteor
is installed there, and puts those tools first on PATH, so no shell rc
file is edited. HOME is not moved: git needs ~/.gitconfig and ~/.ssh.
A TMPDIR already inside a .tools/ is kept, so a test's own directory
there stays its own; without a writable one it stops rather than fall
back to /tmp. It never fails a caller running set -euo pipefail.
- macOS's mktemp ignores TMPDIR when given no template, so every mktemp
names one: mktemp "$TMPDIR/name.XXXXXX". Fixed /tmp files are in
$TMPDIR.
- build.sh installs Node.js on Linux into .tools/n (N_PREFIX, no sudo),
nvm on macOS into .tools/nvm (PROFILE=/dev/null: no rc file edited), and
Meteor with HOME=.tools for the installer only, into .tools/.meteor.
build.sh is replaced, not edited in place, while it may be running.
- Containers get this checkout's .tools/tmp as their /tmp: every
db-conformance database (MariaDB's temporary tables were verified to land
there, and MongoDB's socket) and the repack container, which empty it
themselves before they are removed. install-node-for-arch.sh requires
the mounted TMPDIR.
- tests/run-node-suites.cjs gives every suite TMPDIR in .tools/tmp, and the
tests that copied a script into a fixture copy tools-env.sh too; tests
that pinned ~/.meteor, the rc file edits, sudo n or /tmp/manifest.json
pin the .tools/ places now and say why.
tests/toolsDirOnly.test.cjs runs tools-env.sh against a TMPDIR already
set elsewhere and under set -euo pipefail, and fails on any script that
makes a temporary file without naming .tools/tmp, writes to the home
directory, or edits a shell rc file, or on a container whose /tmp is its
own.
Thanks to xet7 !
Every job that builds a release file now attaches it to the GitHub Release
as its own last step, right after the build and its checks pass, through
releases/github-release-upload.sh (retried, bounded, verified by name and
size). Nothing waits for the other builds any more:
- build-amd64 creates the release (releases/ensure-github-release.sh) and
attaches its zip; build-arm64 attaches its own. The release job no
longer downloads and uploads them; it writes the notes and checks both
base bundles and their .sha256sum are on the release.
- The win64, win-arm64, win32, mac-arm64, mac-x64, extra-arch, Sandstorm
and snap jobs use the shared uploader.
- AppImage.yml, mac.yml and Flatpak.yml attach from each matrix build job
instead of a final publish job; windows.yml attaches from its build job
and its publish job is gone. release-all-missing.yml's extra-arches
attach uses the shared uploader.
A cancelled run keeps what finished: every attach step runs on always()
plus its build step's success, and the final jobs (release notes, what is
still missing, the AppImage/Mac/Flatpak summaries and the Flatpak
repository) run on always() while still requiring the release to exist.
The uploader no longer needs GNU timeout, so it also runs on the macOS
runners and in Windows Git Bash.
Thanks to xet7 !
The v11.85 logs show ARMHF failing during Launchpad polling after TLS EOF,
PPC64EL and S390X reaching the six-hour job cap while queued, and AMD64
successfully publishing to the Snap Store before its GitHub attachment hung.
Recover existing recipes before considering a new submission, and share one
five-hour waiter budget across attempts on every architecture. Prepare an
isolated complete source snapshot with Git metadata and logs outside the
project hash, and distinguish architectures so matrix recipes stay separate.
Move downloaded artifacts out before retrying recovery.
Bound GitHub snap attachments and verify remote names and sizes. Exercise
these paths with fixture repositories and mocked network commands, covering
TLS failures, absent recipes, denied credentials, queue timeouts, invalid
artifacts and failed uploads. Workflow parsing, shell syntax and Actionlint
pass. The full 1,172 Node suite sweep is verified with corrected guards rerun.
Live remote builds and publishing have not been run.
Thanks to xet7 !