@@ -4,7 +4,7 @@ name: CICD
44# spell-checker:ignore (env/flags) Awarnings Ccodegen Coverflow Cpanic Dwarnings RUSTDOCFLAGS RUSTFLAGS Zpanic CARGOFLAGS
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
7- # 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
7+ # 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
88# spell-checker:ignore (misc) aarch alnum armhf bindir busytest coreutils defconfig DESTDIR gecos getenforce gnueabihf issuecomment maint manpages msys multisize noconfirm nofeatures nullglob onexitbegin onexitend pell runtest Swatinem tempfile testsuite toybox uutils libsystemd codspeed
99
1010env :
@@ -297,7 +297,6 @@ jobs:
297297 mv -T target target.cache
298298 fi
299299 # Check that we don't cross-build uudoc
300- # also do not try to generate manpages for part of hashsum
301300 env CARGO_BUILD_TARGET=aarch64-unknown-linux-gnu make install-manpages PREFIX=/tmp/usr UTILS=true
302301 # build (host)
303302 make build
@@ -371,25 +370,19 @@ jobs:
371370 run : |
372371 set -x
373372 DESTDIR=/tmp/ make PROFILE=release MULTICALL=n install
374- # Check that the utils are present
375- test -f /tmp/usr/local/bin/hashsum
376- # Check that hashsum symlinks are present
377- test -h /tmp/usr/local/bin/b2sum
378- test -h /tmp/usr/local/bin/md5sum
379- test -h /tmp/usr/local/bin/sha1sum
380- test -h /tmp/usr/local/bin/sha224sum
381- test -h /tmp/usr/local/bin/sha256sum
382- test -h /tmp/usr/local/bin/sha384sum
383- test -h /tmp/usr/local/bin/sha512sum
373+ # Check that *sum are present
374+ for s in {md5,b2,sha1,sha224,sha256,sha384,sha512}sum
375+ do test -e /tmp/usr/local/bin/${s}
376+ done
384377 - name : " `make install MULTICALL=y LN=ln -svf`"
385378 shell : bash
386379 run : |
387380 set -x
388381 DESTDIR=/tmp/ make PROFILE=release MULTICALL=y LN="ln -svf" install
389- # Check that relative symlinks of hashsum are present
390- [ $(readlink /tmp/usr/local/bin/b2sum) = coreutils ]
391- [ $(readlink /tmp/usr/local/bin/md5sum ) = coreutils ]
392- [ $(readlink /tmp/usr/local/bin/sha512sum) = coreutils ]
382+ # Check that symlinks of *sum are present
383+ for s in {md5,b2,sha1,sha224,sha256,sha384,sha512}sum
384+ do test $(readlink /tmp/usr/local/bin/${s} ) = coreutils
385+ done
393386 - name : " `make UTILS=XXX`"
394387 shell : bash
395388 run : |
@@ -637,6 +630,8 @@ jobs:
637630 - uses : actions/checkout@v6
638631 with :
639632 persist-credentials : false
633+ - name : Avoid no space left on device
634+ run : sudo rm -rf /usr/share/dotnet /usr/local/lib/android &
640635 - uses : dtolnay/rust-toolchain@master
641636 with :
642637 toolchain : ${{ env.RUST_MIN_SRV }}
@@ -692,7 +687,7 @@ jobs:
692687 outputs TARGET_ARCH TARGET_OS
693688 # package name
694689 PKG_suffix=".tar.gz" ; case '${{ matrix.job.target }}' in *-pc-windows-*) PKG_suffix=".zip" ;; esac;
695- PKG_BASENAME=${PROJECT_NAME}-${REF_TAG:-$REF_SHAS}-${ { matrix.job.target }}
690+ PKG_BASENAME=${PROJECT_NAME}-${{ matrix.job.target }}
696691 PKG_NAME=${PKG_BASENAME}${PKG_suffix}
697692 outputs PKG_suffix PKG_BASENAME PKG_NAME
698693 # deployable tag? (ie, leading "vM" or "M"; M == version number)
@@ -861,8 +856,6 @@ jobs:
861856 if : matrix.job.skip-tests != true
862857 shell : bash
863858 run : |
864- command -v sudo && sudo rm -rf /usr/local/lib/android /usr/share/dotnet # avoid no space left
865- df -h ||:
866859 ## Test individual utilities
867860 ${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} test --target=${{ matrix.job.target }} \
868861 ${{ matrix.job.cargo-options }} ${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }}
@@ -897,25 +890,40 @@ jobs:
897890 *) tar czf '${{ steps.vars.outputs.PKG_NAME }}' '${{ steps.vars.outputs.PKG_BASENAME }}'/* ;;
898891 esac
899892 popd >/dev/null
893+ - name : Package manpages and completions
894+ if : matrix.job.target == 'x86_64-unknown-linux-gnu' && matrix.job.features == 'feat_os_unix,uudoc'
895+ run : |
896+ mkdir -p share/{man/man1,bash-completion/completions,fish/vendor_completions.d,zsh/site-functions,elvish/lib}
897+ _uudoc=target/${{ matrix.job.target }}/release/uudoc
898+ for bin in $('target/${{ matrix.job.target }}/release/coreutils' --list) coreutils;do
899+ ${_uudoc} manpage ${bin} > share/man/man1/${bin}.1
900+ ${_uudoc} completion ${bin} bash > share/bash-completion/completions/${bin}.bash
901+ ${_uudoc} completion ${bin} fish > share/fish/vendor_completions.d/${bin}.fish
902+ ${_uudoc} completion ${bin} zsh > share/zsh/site-functions/_${bin}
903+ ${_uudoc} completion ${bin} elvish > share/elvish/lib/${bin}.elv
904+ done
905+ rm share/zsh/site-functions/_[ # not supported
906+ tar --zstd -cf docs.tar.zst share
900907 - name : Publish
901908 uses : softprops/action-gh-release@v2
902909 if : steps.vars.outputs.DEPLOY && matrix.job.skip-publish != true
903910 with :
904911 draft : true
905912 files : |
906913 ${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_NAME }}
914+ docs.tar.zst
907915 env :
908916 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
909917 - name : Publish latest commit
910918 uses : softprops/action-gh-release@v2
911- if : steps.vars.outputs.DEPLOY && matrix.job.skip-publish != true
919+ if : github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.job.skip-publish != true
912920 with :
913921 tag_name : latest-commit
914- force_update : true
915922 draft : false
916923 prerelease : true
917924 files : |
918925 ${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_NAME }}
926+ docs.tar.zst
919927 env :
920928 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
921929
@@ -1264,13 +1272,13 @@ jobs:
12641272 - uses : actions/checkout@v6
12651273 with :
12661274 persist-credentials : false
1275+ - name : Avoid no space left on device
1276+ run : sudo rm -rf /usr/share/dotnet /usr/local/lib/android &
12671277 - uses : dtolnay/rust-toolchain@stable
12681278 - uses : Swatinem/rust-cache@v2
12691279 - name : build and test all features individually
12701280 shell : bash
12711281 run : |
1272- command -v sudo && sudo rm -rf /usr/local/lib/android /usr/share/dotnet # avoid no space left
1273- df -h ||:
12741282 CARGO_FEATURES_OPTION='--features=${{ matrix.job.features }}' ;
12751283 for f in $(util/show-utils.sh ${CARGO_FEATURES_OPTION})
12761284 do
0 commit comments