mirror of
https://github.com/uutils/coreutils
synced 2024-11-16 17:58:06 +00:00
Run the release builds and store the size
This commit is contained in:
parent
de07df5992
commit
90949ae045
1 changed files with 48 additions and 1 deletions
49
.github/workflows/CICD.yml
vendored
49
.github/workflows/CICD.yml
vendored
|
@ -5,7 +5,7 @@ name: CICD
|
|||
# spell-checker:ignore (jargon) SHAs deps dequote softprops subshell toolchain
|
||||
# spell-checker:ignore (names) CodeCOV MacOS MinGW Peltoche rivy
|
||||
# spell-checker:ignore (shell/tools) choco clippy dmake dpkg esac fakeroot gmake grcov halium lcov libssl mkdir popd printf pushd rustc rustfmt rustup shopt xargs
|
||||
# spell-checker:ignore (misc) aarch alnum armhf bindir busytest coreutils gnueabihf issuecomment maint nullglob onexitbegin onexitend pell runtest tempfile testsuite uutils
|
||||
# spell-checker:ignore (misc) aarch alnum armhf bindir busytest coreutils gnueabihf issuecomment maint nullglob onexitbegin onexitend pell runtest tempfile testsuite uutils DESTDIR sizemulti
|
||||
|
||||
# ToDO: [2021-06; rivy] change from `cargo-tree` to `cargo tree` once MSRV is >= 1.45
|
||||
|
||||
|
@ -422,6 +422,53 @@ jobs:
|
|||
run: |
|
||||
make test
|
||||
|
||||
|
||||
compute_size:
|
||||
name: Binary sizes
|
||||
needs: [ min_version, deps ]
|
||||
runs-on: ${{ matrix.job.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
job:
|
||||
- { os: ubuntu-latest , features: feat_os_unix }
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
## Install dependencies
|
||||
sudo apt-get update
|
||||
sudo apt-get install jq
|
||||
- name: Install `rust` toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
default: true
|
||||
profile: minimal # minimal component installation (ie, no documentation)
|
||||
- name: "`make install`"
|
||||
shell: bash
|
||||
run: |
|
||||
make install DESTDIR=target/size-release/
|
||||
make install MULTICALL=y DESTDIR=target/size-multi-release/
|
||||
# strip the results
|
||||
strip target/size*/usr/local/bin/*
|
||||
- name: "Compute sizes"
|
||||
shell: bash
|
||||
run: |
|
||||
SIZE=$(du -s target/size-release/usr/local/bin/|awk '{print $1}')
|
||||
SIZEMULTI=$(du -s target/size-multi-release/usr/local/bin/|awk '{print $1}')
|
||||
jq -n \
|
||||
--arg date "$(date --rfc-email)" \
|
||||
--arg sha "$GITHUB_SHA" \
|
||||
--arg size "$SIZE" \
|
||||
--arg sizemulti "$SIZEMULTI" \
|
||||
'{($date): { sha: $sha, size: $size, sizemulti: $sizemulti, }}' > size-result.json
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: size-result
|
||||
path: size-result.json
|
||||
|
||||
build:
|
||||
name: Build
|
||||
needs: [ min_version, deps ]
|
||||
|
|
Loading…
Reference in a new issue