@@ -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,13 +320,22 @@ 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-fast COMPLETIONS=n MANPAGES=n LOCALES=n`"
323+ - name : " `make install PROG_PREFIX=uu- CARGO_BUILD_TARGET=aarch64-unknown-linux-gnu PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n`"
326324 shell : bash
327325 run : |
328326 set -x
329- DESTDIR=/tmp/ make install PROG_PREFIX=uu- PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n
330- # Check that utils are built with given profile
331- ./target/release-fast/true
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/local/share/man/man1/true.1
333+ DESTDIR=/tmp/ make install CARGO_BUILD_TARGET=aarch64-unknown-linux-gnu PROG_PREFIX=uu- PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n
334+ # We don't build coreutils without MULTICALL=y
335+ ! test -e target/aarch64-unknown-linux-gnu/release-fast/coreutils
336+ # Check that target and profile are applied
337+ test -e target/aarch64-unknown-linux-gnu/release-fast/true
338+ file target/aarch64-unknown-linux-gnu/release-fast/true
332339 # Check that the progs have prefix
333340 test -f /tmp/usr/local/bin/uu-tty
334341 test -f /tmp/usr/local/libexec/uu-coreutils/libstdbuf.*
@@ -338,8 +345,22 @@ jobs:
338345 ! test -f /tmp/usr/local/share/zsh/site-functions/_uu-install
339346 ! test -f /tmp/usr/local/share/bash-completion/completions/uu-head.bash
340347 ! test -f /tmp/usr/local/share/fish/vendor_completions.d/uu-cat.fish
348+ # We publish them instead of discarding
349+ (cd /tmp/usr/local/bin && for b in uu-*;do mv "$b" "${b#uu-}";done )
350+ ZSTD_CLEVEL=19 tar --zstd -caf individual-aarch64-unknown-linux-gnu.tar.zst -C /tmp/usr/local bin
341351 env :
342352 RUST_BACKTRACE : " 1"
353+ - name : Publish
354+ uses : softprops/action-gh-release@v2
355+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
356+ with :
357+ tag_name : latest-commit
358+ draft : false
359+ prerelease : true
360+ files : |
361+ individual-aarch64-unknown-linux-gnu.tar.zst
362+ env :
363+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
343364 - name : " `make install`"
344365 shell : bash
345366 run : |
0 commit comments