Skip to content

fix(ci): Windows release ZIP root no longer wraps in release-staging/ (closes #92)#97

Merged
githubrobbi merged 1 commit into
mainfrom
fix/issue-92-release-zip-staging-prefix
Apr 28, 2026
Merged

fix(ci): Windows release ZIP root no longer wraps in release-staging/ (closes #92)#97
githubrobbi merged 1 commit into
mainfrom
fix/issue-92-release-zip-staging-prefix

Conversation

@githubrobbi
Copy link
Copy Markdown
Collaborator

Closes #92.

Problem

uffs-windows-x64.zip produced by the release workflow contains a wrapper directory: extracting gives release-staging/uffs-windows-x64/... instead of just uffs-windows-x64/.... The non-Windows branch of the same workflow already produces the expected layout.

Root cause

In .github/workflows/release.yml::Stage release bundle, the Windows branch ran:

STAGE_DIR="release-staging/${{ matrix.artifact-name }}"
...
7z a -tzip "release-artifacts/${{ matrix.artifact-name }}.zip" "$STAGE_DIR/*"

7z preserves the path prefix it's invoked with, so entries get stored as release-staging/uffs-windows-x64/....

The non-Windows branch already side-stepped this by cd release-staging-ing first and archiving the bare ${{ matrix.artifact-name }}.

Fix

Mirror the non-Windows branch: cd release-staging && 7z a -tzip ../release-artifacts/...zip uffs-windows-x64.

Both branches are now symmetric.

Verification

  • actionlint .github/workflows/release.yml → clean on the changed region (exit 0; only pre-existing info-level shellcheck notes elsewhere in the file).
  • lint-pre-push (full smoke + xwin check, 66 s) green.
  • Cannot run the release workflow itself locally — actual ZIP layout will be verified on the next preview / release build via the existing CI.

Risk

Tiny. The change is a one-step cd indirection in the bundling step. Failure mode (if any) would be archive-empty / archive-wrong-root, which is immediately visible from the workflow's own ls -la "release-artifacts/...zip" step. No code paths change; no end-user-visible binaries change.

Closes #92.

The Windows branch of the `Stage release bundle` step in
`.github/workflows/release.yml` ran:

    7z a -tzip release-artifacts/uffs-windows-x64.zip "$STAGE_DIR/*"

with `STAGE_DIR=release-staging/uffs-windows-x64`.  7z preserves
the path prefix it's invoked with, so the resulting archive
contained `release-staging/uffs-windows-x64/...` entries — i.e.
unpacking gave a `release-staging/` wrapper folder around the
expected `uffs-windows-x64/` directory.

Mirror the non-Windows branch by `cd release-staging`-ing first,
then archiving the unprefixed artifact-name.  Both branches are
now symmetric and the resulting archives unpack into a single
`uffs-<target>/` directory at root.

Verified: `actionlint .github/workflows/release.yml` clean on the
changed region (exit 0; only pre-existing shellcheck info notes
elsewhere in the file).
@githubrobbi githubrobbi merged commit 65adb4d into main Apr 28, 2026
14 checks passed
@githubrobbi githubrobbi deleted the fix/issue-92-release-zip-staging-prefix branch April 28, 2026 15:51
githubrobbi added a commit that referenced this pull request May 15, 2026
…lds (#254)

* chore: development v0.5.99 - comprehensive testing complete [auto-commit]

* fix(ci): repair rustup proxy AFTER cache restore on macOS release builds

Release pipeline #97 (v0.5.98) failed on the aarch64-apple-darwin build with:

    error: unexpected argument 'build' found

    Usage: rustup-init[EXE] [OPTIONS]

    Stack backtrace: rustup_init::run_rustup_inner ...

PR #245 already added a proxy-repair line ('rustup default ...') to the 'Install pinned nightly' step, and the in-step 'cargo --version' smoke check still passes — but the very next step, 'Swatinem/rust-cache', restores '~/.cargo/bin/' from a prior run's cache.  On macos-latest that cache holds a poisoned 'cargo' symlink pointing at 'rustup-init' (the installer) rather than the toolchain proxy.  The restore overwrites the freshly-repaired '~/.cargo/bin/cargo', and the subsequent 'cargo build' picks up the poisoned proxy and exits with the rustup-init backtrace before reaching any cargo subcommand.

Empirical proof from the failing job (76219153458):

    16:36:34Z  cargo --version  ->  cargo 1.97.0-nightly  (proxy healthy)

    16:36:35Z  Swatinem/rust-cache: restoring ~/.cargo/bin/ ...

    16:36:54Z  cargo build         ->  rustup-init backtrace  (proxy poisoned)

Fix: add a second proxy-repair step *after* the cache-restore step and *before* the build step.  Re-running 'rustup default "$(rustup show active-toolchain | awk '{print $1}')"' rewrites the proxy binaries in '~/.cargo/bin' so the build resolves to the active toolchain's cargo even when the restored cache was poisoned.  On the next successful run, 'Swatinem/rust-cache' saves a clean cache and the poison clears itself.

Both 'release.yml::build-release-binaries' and 'release-cache-warm.yml::warm' get the same step (with matching commentary) — without the fix in the warm workflow, every macOS warm run would re-save the poisoned cache and perpetuate the regression.  Step is gated on 'runner.os == macOS' so Linux and Windows legs (which do not exhibit this symptom) are unaffected.

Pre-cache repair line is intentionally kept so the in-step 'cargo --version' smoke check still fails fast on a broken runner-image proxy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uffs-windows-x64.zip contain folder release-staging

1 participant