@@ -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,8 +297,7 @@ 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
301- make install-manpages PREFIX=/tmp/usr UTILS=true RUSTC_ARCH="--target aarch64-unknown-linux-gnu"
300+ env CARGO_BUILD_TARGET=aarch64-unknown-linux-gnu make install-manpages PREFIX=/tmp/usr UTILS=true
302301 # build (host)
303302 make build
304303 echo "Check that target directory will be ignored by backup tools"
@@ -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 }}
@@ -878,10 +871,14 @@ jobs:
878871 shell : bash
879872 run : |
880873 ## Package artifact(s)
881- # binary
874+ # binaries
882875 cp 'target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}' '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/'
876+ cp 'target/${{ matrix.job.target }}/release/uudoc${{ steps.vars.outputs.EXE_suffix }}' '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/' || :
883877 # `strip` binary (if needed)
884- if [ -n "${{ steps.vars.outputs.STRIP }}" ]; then "${{ steps.vars.outputs.STRIP }}" '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}' ; fi
878+ if [ -n "${{ steps.vars.outputs.STRIP }}" ]; then
879+ "${{ steps.vars.outputs.STRIP }}" '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}'
880+ "${{ steps.vars.outputs.STRIP }}" '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/uudoc' || :
881+ fi
885882 # README and LICENSE
886883 # * spell-checker:ignore EADME ICENSE
887884 (shopt -s nullglob; for f in [R]"EADME"{,.*}; do cp $f '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/' ; done)
@@ -893,13 +890,40 @@ jobs:
893890 *) tar czf '${{ steps.vars.outputs.PKG_NAME }}' '${{ steps.vars.outputs.PKG_BASENAME }}'/* ;;
894891 esac
895892 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
896907 - name : Publish
897908 uses : softprops/action-gh-release@v2
898909 if : steps.vars.outputs.DEPLOY && matrix.job.skip-publish != true
899910 with :
900911 draft : true
901912 files : |
902913 ${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_NAME }}
914+ docs.tar.zst
915+ env :
916+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
917+ - name : Publish latest commit
918+ uses : softprops/action-gh-release@v2
919+ if : github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.job.skip-publish != true
920+ with :
921+ tag_name : latest-commit
922+ draft : false
923+ prerelease : true
924+ files : |
925+ ${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_NAME }}
926+ docs.tar.zst
903927 env :
904928 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
905929
@@ -1248,13 +1272,13 @@ jobs:
12481272 - uses : actions/checkout@v6
12491273 with :
12501274 persist-credentials : false
1275+ - name : Avoid no space left on device
1276+ run : sudo rm -rf /usr/share/dotnet /usr/local/lib/android &
12511277 - uses : dtolnay/rust-toolchain@stable
12521278 - uses : Swatinem/rust-cache@v2
12531279 - name : build and test all features individually
12541280 shell : bash
12551281 run : |
1256- command -v sudo && sudo rm -rf /usr/local/lib/android /usr/share/dotnet # avoid no space left
1257- df -h ||:
12581282 CARGO_FEATURES_OPTION='--features=${{ matrix.job.features }}' ;
12591283 for f in $(util/show-utils.sh ${CARGO_FEATURES_OPTION})
12601284 do
0 commit comments