@@ -265,6 +265,8 @@ jobs:
265265 build_makefile :
266266 name : Build/Makefile
267267 needs : [ min_version, deps ]
268+ permissions :
269+ contents : write # Publish individual arm binaries instead of discarding
268270 runs-on : ${{ matrix.job.os }}
269271 env :
270272 SCCACHE_GHA_ENABLED : " true"
@@ -297,10 +299,6 @@ jobs:
297299 if [[ -d target ]]; then
298300 mv -T target target.cache
299301 fi
300- # Check that we don't cross-build uudoc
301- env CARGO_BUILD_TARGET=aarch64-unknown-linux-gnu make install-manpages PREFIX=/tmp/usr UTILS=true
302- # We don't build coreutils without MULTICALL=y
303- ! test -e target/debug/coreutils
304302 # build (host)
305303 make build
306304 echo "Check that target directory will be ignored by backup tools"
@@ -322,37 +320,58 @@ jobs:
322320 disable_search : true
323321 flags : makefile,${{ matrix.job.os }}
324322 fail_ci_if_error : false
325- - name : " `make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n`"
323+ - name : " `make install PROG_PREFIX=uu- CARGO_BUILD_TARGET=aarch64-unknown-linux-gnu PROFILE=release COMPLETIONS=n MANPAGES=n LOCALES=n`"
326324 shell : bash
327325 run : |
328326 set -x
329- DESTDIR=/tmp/ make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n
330- # Check that utils are built with given profile
331- ./target/release-small/true
332- # Check that the progs have prefix
333- test -f /tmp/usr/local/bin/uu-tty
334- test -f /tmp/usr/local/libexec/uu-coreutils/libstdbuf.*
327+ sudo apt-get install -y gcc-aarch64-linux-gnu
328+ RUSTFLAGS="${RUSTFLAGS} -C strip=symbols"
329+ export RUSTFLAGS
330+ # Check that we don't cross-build uudoc. We don't full build just for it
331+ env CARGO_BUILD_TARGET=aarch64-unknown-linux-gnu make install-manpages PREFIX=/tmp/usr UTILS=true
332+ test -f /tmp/usr/share/man/man1/true.1
333+ DESTDIR=/tmp/ make install CARGO_BUILD_TARGET=aarch64-unknown-linux-gnu PROG_PREFIX=uu- PROFILE=release COMPLETIONS=n MANPAGES=n LOCALES=n
334+ # We don't build coreutils without MULTICALL=y
335+ ! test -e target/aarch64-unknown-linux-gnu/release/coreutils
336+ # Check that the progs are missing prefix
337+ test -f /tmp/usr/local/bin/tty
338+ test -f /tmp/usr/local/libexec/coreutils/libstdbuf.*
335339 # Check that the manpage is not present
336- ! test -f /tmp/usr/local/share/man/man1/uu- whoami.1
340+ ! test -f /tmp/usr/local/share/man/man1/whoami.1
337341 # Check that the completion is not present
338- ! test -f /tmp/usr/local/share/zsh/site-functions/_uu-install
339- ! test -f /tmp/usr/local/share/bash-completion/completions/uu-head.bash
340- ! test -f /tmp/usr/local/share/fish/vendor_completions.d/uu-cat.fish
342+ ! test -f /tmp/usr/local/share/zsh/site-functions/_install
343+ ! test -f /tmp/usr/local/share/bash-completion/completions/head.bash
344+ ! test -f /tmp/usr/local/share/fish/vendor_completions.d/cat.fish
345+ # We publish them instead of discarding
346+ ZSTD_CLEVEL=19 tar --zstd -caf individual-aarch64-unknown-linux-gnu.tar.zst -C /tmp/usr/local bin
341347 env :
342348 RUST_BACKTRACE : " 1"
343- - name : " `make install`"
349+ - name : Publish
350+ uses : softprops/action-gh-release@v2
351+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
352+ with :
353+ tag_name : latest-commit
354+ draft : false
355+ prerelease : true
356+ files : |
357+ individual-aarch64-unknown-linux-gnu.tar.zst
358+ env :
359+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
360+ - name : " `make PROFILE=release-small PROG_PREFIX=u_ install`"
344361 shell : bash
345362 run : |
346363 set -x
347- DESTDIR=/tmp/ make PROFILE=release install
348- # Check that the utils are present
349- test -f /tmp/usr/local/bin/tty
364+ DESTDIR=/tmp/ make PROFILE=release-small PROG_PREFIX=u_ install
365+ # Check PROFILE
366+ test -e target/release-small/false
367+ # Check that the utils are prefixed
368+ test -f /tmp/usr/local/bin/u_tty
350369 # Check that the manpage is present
351- test -f /tmp/usr/local/share/man/man1/md5sum .1
370+ test -f /tmp/usr/local/share/man/man1/u_md5sum .1
352371 # Check that the completion is present
353- test -f /tmp/usr/local/share/zsh/site-functions/_b2sum
354- test -f /tmp/usr/local/share/bash-completion/completions/head .bash
355- test -f /tmp/usr/local/share/fish/vendor_completions.d/cat .fish
372+ test -f /tmp/usr/local/share/zsh/site-functions/_u_b2sum
373+ test -f /tmp/usr/local/share/bash-completion/completions/u_head .bash
374+ test -f /tmp/usr/local/share/fish/vendor_completions.d/u_cat .fish
356375 env :
357376 RUST_BACKTRACE : " 1"
358377 - name : " `make uninstall`"
@@ -361,18 +380,19 @@ jobs:
361380 set -x
362381 DESTDIR=/tmp/ make uninstall
363382 # Check that the utils are not present
364- ! test -f /tmp/usr/local/bin/tty
383+ ! test -f /tmp/usr/local/bin/u_tty
365384 # Check that the manpage is not present
366- ! test -f /tmp/usr/local/share/man/man1/whoami .1
385+ ! test -f /tmp/usr/local/share/man/man1/u_whoami .1
367386 # Check that the completion is not present
368- ! test -f /tmp/usr/local/share/zsh/site-functions/_install
369- ! test -f /tmp/usr/local/share/bash-completion/completions/head .bash
370- ! test -f /tmp/usr/local/share/fish/vendor_completions.d/cat .fish
371- - name : " `make install MULTICALL=n`"
387+ ! test -f /tmp/usr/local/share/zsh/site-functions/_u_install
388+ ! test -f /tmp/usr/local/share/bash-completion/completions/u_head .bash
389+ ! test -f /tmp/usr/local/share/fish/vendor_completions.d/u_cat .fish
390+ - name : " `make install PROFILE=release-small MULTICALL=n`"
372391 shell : bash
373392 run : |
374393 set -x
375- DESTDIR=/tmp/ make PROFILE=release MULTICALL=n install
394+ # cargo should not rebuild with same profile
395+ timeout 30 DESTDIR=/tmp/ make PROFILE=release-small MULTICALL=n install
376396 # Check that *sum are present
377397 for s in {md5,b2,sha1,sha224,sha256,sha384,sha512}sum
378398 do test -e /tmp/usr/local/bin/${s}
@@ -381,7 +401,9 @@ jobs:
381401 shell : bash
382402 run : |
383403 set -x
384- DESTDIR=/tmp/ make PROFILE=release MULTICALL=y LN="ln -svf" install
404+ DESTDIR=/tmp/ make MULTICALL=y LN="ln -svf" install
405+ # release should be default profile
406+ test -e target/release/coreutils
385407 # Check that symlinks of *sum are present
386408 for s in {md5,b2,sha1,sha224,sha256,sha384,sha512}sum
387409 do test $(readlink /tmp/usr/local/bin/${s}) = coreutils
0 commit comments