Skip to content

Use UPX filters when committing SDK package updates - #137

Merged
dscho merged 2 commits into
mainfrom
upx-workflow-integration
Nov 4, 2026
Merged

dscho merged 2 commits into
mainfrom
upx-workflow-integration

Conversation

@mjcheetham

@mjcheetham mjcheetham commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Prepare package-update automation to store Rust's LLVM DLL through the UPX clean filter, preserving original package bytes in the working tree.

  • Configure repository-local filters before staging in .github/commit-sdk.sh, using --no-refresh.
  • Stop before staging if filter setup fails.
  • Select only ucrt64/bin/libLLVM-22.dll with filter=upx.

Ordinary clones retain runnable packed binaries. Users can optionally enable smudge filtering to trade disk space for faster loading.

Dependencies and follow-ups

Depends on #136; its commits appear here until that PR is merged.

This does not install Rust or LLVM. Updating the package-install workflow on Rust PR #132 is a follow-up. No installation workflow has been dispatched.

Validation

Disposable repository tests verified setup runs before staging, successful commits leave working-tree bytes unchanged, and setup failure prevents staging and committing.

Attribute checks confirmed only the intended LLVM DLL is selected. Shell syntax and whitespace checks passed.

@mjcheetham

Copy link
Copy Markdown
Member Author

Corresponding ARM64 PR: git-for-windows#70

Package-update jobs must configure the local UPX driver before staging
files selected by filter=upx attributes. Otherwise Git can stage the
original unpacked binaries instead of their compressed representation.

Run the setup helper in configuration-only mode before git add, and
stop if setup fails. Leave working-tree files untouched: package
updates need clean filtering during staging, not a smudge refresh of
the checkout.

This prepares the shared commit helper for targeted LLVM attributes
when Rust's LLVM binaries are introduced; it does not select any new
files for compression.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Rust's LLVM library needs compressed storage to fit remote file-size
limits. Select that DLL explicitly for UPX clean/smudge filtering,
leaving unrelated binaries untouched.

Package-update automation configures the driver before staging, so
original package bytes can remain in the working tree while Git
stores the packed representation. Ordinary clones retain runnable
packed binaries; users can opt in to unpacking after checkout.

Add the attribute before introducing the package so its first
generated commit stores the DLL through the clean filter.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
@mjcheetham
mjcheetham force-pushed the upx-workflow-integration branch from 22478df to 970b2e3 Compare November 4, 2026 14:15
@mjcheetham
mjcheetham marked this pull request as ready for review November 4, 2026 14:15
@mjcheetham
mjcheetham requested a review from dscho November 4, 2026 14:16
Comment thread .gitattributes Resolved
@dscho
dscho merged commit 8a0a7c6 into main Nov 4, 2026
24 checks passed
@dscho
dscho deleted the upx-workflow-integration branch November 4, 2026 15:03
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.

2 participants