Skip to content

Commit 3fbbe14

Browse files
committed
CICD.yml: Upload individual bins to release
1 parent 356567e commit 3fbbe14

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"
@@ -499,12 +501,25 @@ jobs:
499501
## Install dependencies
500502
sudo apt-get update
501503
sudo apt-get install libselinux1-dev libsystemd-dev
502-
- name: "`make install`"
504+
- name: "`make install PROFILE=release-fast`"
503505
shell: bash
504506
run: |
505-
## `make install`
506-
RUSTFLAGS="${RUSTFLAGS} -C strip=symbols" make install DESTDIR=target/size-release/
507-
RUSTFLAGS="${RUSTFLAGS} -C strip=symbols" make install MULTICALL=y LN="ln -vf" DESTDIR=target/size-multi-release/
507+
export CARGO_TARGET_DIR=cargo-target RUSTFLAGS="${RUSTFLAGS} -C strip=symbols" PROFILE=release-fast MANPAGES=n COMPLETIONS=n LOCALES=n
508+
mkdir -p "${CARGO_TARGET_DIR}" && sudo mount -t tmpfs -o noatime,size=16G tmpfs "${CARGO_TARGET_DIR}"
509+
make install DESTDIR=target/size-release/
510+
make install COMPLETIONS=n MULTICALL=y LN="ln -vf" DESTDIR=target/size-multi-release/
511+
ZSTD_CLEVEL=19 tar --zstd -caf individual-x86_64-unknown-linux-gnu.tar.zst -C target/size-release/usr/local bin
512+
- name: Publish
513+
uses: softprops/action-gh-release@v2
514+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
515+
with:
516+
tag_name: latest-commit
517+
draft: false
518+
prerelease: true
519+
files: |
520+
individual-x86_64-unknown-linux-gnu.tar.zst
521+
env:
522+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
508523
- name: Test for hardlinks
509524
shell: bash
510525
run: |

0 commit comments

Comments
 (0)