Skip to content

Commit 8a7c3fb

Browse files
oech3sylvestre
andauthored
CICD.yml: Upload individual bins to release (#10338)
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
1 parent 364a235 commit 8a7c3fb

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.github/workflows/CICD.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: CICD
22

33
# spell-checker:ignore (abbrev/names) CACHEDIR CICD CodeCOV MacOS MinGW MSVC musl taiki
4-
# spell-checker:ignore (env/flags) Awarnings Ccodegen Coverflow Cpanic Dwarnings RUSTDOCFLAGS RUSTFLAGS Zpanic CARGOFLAGS
4+
# spell-checker:ignore (env/flags) Awarnings Ccodegen Coverflow Cpanic Dwarnings RUSTDOCFLAGS RUSTFLAGS Zpanic CARGOFLAGS CLEVEL
55
# spell-checker:ignore (jargon) SHAs deps dequote softprops subshell toolchain fuzzers dedupe devel profdata
66
# spell-checker:ignore (people) Peltoche rivy dtolnay Anson dawidd
77
# spell-checker:ignore (shell/tools) binutils choco clippy dmake esac fakeroot fdesc fdescfs gmake grcov halium lcov libclang libfuse libssl limactl mkdir nextest nocross pacman popd printf pushd redoxer rsync rustc rustfmt rustup shopt sccache utmpdump xargs zstd
@@ -477,6 +477,8 @@ jobs:
477477
name: Binary sizes
478478
needs: [ min_version, deps ]
479479
runs-on: ${{ matrix.job.os }}
480+
permissions:
481+
contents: write
480482
env:
481483
SCCACHE_GHA_ENABLED: "true"
482484
RUSTC_WRAPPER: "sccache"
@@ -493,12 +495,25 @@ jobs:
493495
- uses: Swatinem/rust-cache@v2
494496
- name: Run sccache-cache
495497
uses: mozilla-actions/sccache-action@v0.0.9
496-
- name: "`make install`"
498+
- name: "`make install PROFILE=release-fast`"
497499
shell: bash
498500
run: |
499-
## `make install`
500-
RUSTFLAGS="${RUSTFLAGS} -C strip=symbols" make install DESTDIR=target/size-release/
501-
RUSTFLAGS="${RUSTFLAGS} -C strip=symbols" make install MULTICALL=y LN="ln -vf" DESTDIR=target/size-multi-release/
501+
export CARGO_TARGET_DIR=cargo-target RUSTFLAGS="${RUSTFLAGS} -C strip=symbols" PROFILE=release-fast MANPAGES=n COMPLETIONS=n LOCALES=n
502+
mkdir -p "${CARGO_TARGET_DIR}" && sudo mount -t tmpfs -o noatime,size=16G tmpfs "${CARGO_TARGET_DIR}"
503+
make install DESTDIR=target/size-release/
504+
make install COMPLETIONS=n MULTICALL=y LN="ln -vf" DESTDIR=target/size-multi-release/
505+
ZSTD_CLEVEL=19 tar --zstd -caf individual-x86_64-unknown-linux-gnu.tar.zst -C target/size-release/usr/local bin
506+
- name: Publish
507+
uses: softprops/action-gh-release@v2
508+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
509+
with:
510+
tag_name: latest-commit
511+
draft: false
512+
prerelease: true
513+
files: |
514+
individual-x86_64-unknown-linux-gnu.tar.zst
515+
env:
516+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
502517
- name: Test for hardlinks
503518
shell: bash
504519
run: |

0 commit comments

Comments
 (0)