ANW-34 CI: gzip + strip release binaries
ap keeps every release and the raw, unstripped binaries are the bulk of that storage. Strip symbols via the release profile and gzip -9 each asset before upload (~2.7x smaller); the publish job and Forgejo mirror-back pass the .gz assets through unchanged. Assumed .gz per binary over .tar.gz -- the assets are single files, so a tarball only adds a directory layer. Flag if a bundle (LICENSE/README) is wanted. E2E needs a release run; piggyback on the next real tag.
This commit is contained in:
parent
863f418538
commit
fc5edbda16
2 changed files with 13 additions and 5 deletions
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
|
|
@ -85,17 +85,20 @@ jobs:
|
||||||
run: cargo build --release --locked
|
run: cargo build --release --locked
|
||||||
|
|
||||||
# The runner is native to its target, so target/release/anwesen is the
|
# The runner is native to its target, so target/release/anwesen is the
|
||||||
# target binary. Name it so the target is unambiguous on the release.
|
# target binary (already stripped via the release profile). Name it so
|
||||||
- name: Name the asset for its target
|
# the target is unambiguous, then gzip it -- ap keeps every release and
|
||||||
|
# the raw binaries are the bulk of that, so assets ship compressed.
|
||||||
|
- name: Name and compress the asset for its target
|
||||||
run: |
|
run: |
|
||||||
install -m 0755 target/release/anwesen \
|
asset="anwesen-${{ github.event.inputs.tag || github.ref_name }}-${{ matrix.label }}"
|
||||||
"anwesen-${{ github.event.inputs.tag || github.ref_name }}-${{ matrix.label }}"
|
install -m 0755 target/release/anwesen "$asset"
|
||||||
|
gzip -9 "$asset"
|
||||||
|
|
||||||
- name: Stash the binary for the publish job
|
- name: Stash the binary for the publish job
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.label }}
|
name: ${{ matrix.label }}
|
||||||
path: anwesen-*-${{ matrix.label }}
|
path: anwesen-*-${{ matrix.label }}.gz
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,11 @@ walkdir = "2"
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempfile = "3"
|
tempfile = "3"
|
||||||
|
|
||||||
|
# Strip symbols from release binaries: smaller artifacts for the release
|
||||||
|
# pipeline (assets are also gzipped there) and for local release builds.
|
||||||
|
[profile.release]
|
||||||
|
strip = true
|
||||||
|
|
||||||
[lints.rust]
|
[lints.rust]
|
||||||
unsafe_code = "forbid"
|
unsafe_code = "forbid"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue