11name : make
22
33# spell-checker:ignore (abbrev/names) CACHEDIR taiki
4- # spell-checker:ignore (env/flags) RUSTDOCFLAGS RUSTFLAGS CARGOFLAGS CLEVEL
4+ # spell-checker:ignore (env/flags) CHERE RUSTDOCFLAGS RUSTFLAGS CARGOFLAGS CLEVEL
55# spell-checker:ignore (jargon) deps softprops toolchain
66# spell-checker:ignore (people) dawidd
7- # spell-checker:ignore (shell/tools) nextest sccache zstd
8- # spell-checker:ignore (misc) bindir busytest defconfig DESTDIR manpages multisize runtest testsuite toybox uutils
7+ # spell-checker:ignore (shell/tools) bsdtar nextest pacman sccache zstd
8+ # spell-checker:ignore (misc) bindir busytest defconfig dynamicbase DESTDIR manpages multisize noconfirm runtest testsuite toybox uutils
99
1010env :
1111 PROJECT_NAME : coreutils
9393 disable_search : true
9494 flags : makefile,${{ matrix.job.os }}
9595 fail_ci_if_error : false
96- - name : " `make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n`"
97- shell : bash
98- run : |
99- set -x
100- DESTDIR=/tmp/ make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n
101- # Check that utils are built with given profile
102- ./target/release-small/true
103- # Check that the progs have prefix
104- test -f /tmp/usr/local/bin/uu-tty
105- test -f /tmp/usr/local/libexec/uu-coreutils/libstdbuf.*
106- # Check that the manpage is not present
107- ! test -f /tmp/usr/local/share/man/man1/uu-whoami.1
108- # Check that the completion is not present
109- ! test -f /tmp/usr/local/share/zsh/site-functions/_uu-install
110- ! test -f /tmp/usr/local/share/bash-completion/completions/uu-head.bash
111- ! test -f /tmp/usr/local/share/fish/vendor_completions.d/uu-cat.fish
112- # don't publish binaries with uu-
113- make uninstall PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n
114- env :
115- RUST_BACKTRACE : " 1"
11696 - name : " `make install`"
11797 shell : bash
11898 run : |
@@ -292,11 +272,14 @@ jobs:
292272 DESTDIR=/tmp/ make SKIP_UTILS="stdbuf" install
293273
294274 # keep this job minimal to avoid have many duplicated build with CICD
295- build_makefile-other :
296- name : Build/Makefile
275+ build_makefile-windows-cygwin :
276+ name : Build MSYS
277+ permissions :
278+ contents : write # Publish cygwin binary
297279 runs-on : ${{ matrix.job.os }}
298280 env :
299281 CARGO_INCREMENTAL : 0
282+ RUSTFLAGS : " -C link-arg=-Wl,--dynamicbase -C link-arg=-Wl,--enable-auto-image-base"
300283 strategy :
301284 fail-fast : false
302285 matrix :
@@ -316,6 +299,40 @@ jobs:
316299 run : |
317300 echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
318301 echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
302+ - name : " `(x86_64-pc-cygwin) make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n`"
303+ shell : ' C:\msys64\usr\bin\bash.exe --login -eo pipefail {0}'
304+ run : |
305+ set -x
306+ pacman -Sy --noconfirm --needed make rust base-devel
307+ DESTDIR=/tmp/c make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n
308+ # Check that utils are built with given profile
309+ ./target/release-small/true
310+ # Check that the progs have prefix
311+ test -f /tmp/c/usr/local/bin/uu-tty
312+ test -f /tmp/c/usr/local/libexec/uu-coreutils/libstdbuf.*
313+ # Check that the manpage is not present
314+ ! test -f /tmp/c/usr/local/share/man/man1/uu-whoami.1
315+ # Check that the completion is not present
316+ ! test -f /tmp/c/usr/local/share/zsh/site-functions/_uu-install
317+ ! test -f /tmp/c/usr/local/share/bash-completion/completions/uu-head.bash
318+ ! test -f /tmp/c/usr/local/share/fish/vendor_completions.d/uu-cat.fish
319+ # package
320+ mv target/release-small/deps/stdbuf.dll -t /tmp/c/usr/local/bin
321+ bsdtar -caf x86_64-pc-cygwin.tar.zst -C /tmp/c/usr/local bin
322+ env :
323+ CHERE_INVOKING : 1
324+ RUST_BACKTRACE : " 1"
325+ - name : Publish
326+ uses : softprops/action-gh-release@v3
327+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
328+ with :
329+ tag_name : latest-commit
330+ draft : false
331+ prerelease : true
332+ files : |
333+ x86_64-pc-cygwin.tar.zst
334+ env :
335+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
319336 - name : " `make build`"
320337 shell : bash
321338 run : |
0 commit comments