@@ -513,7 +513,7 @@ jobs:
513513 fail-fast : false
514514 matrix :
515515 job :
516- # - { os , target , cargo-options , features , use-cross , toolchain, skip-tests, workspace-tests }
516+ # - { os , target , cargo-options , default-features, features , use-cross , toolchain, skip-tests, workspace-tests }
517517 - { os: ubuntu-latest , target: arm-unknown-linux-gnueabihf , features: feat_os_unix_gnueabihf , use-cross: use-cross , skip-tests: true }
518518 - { os: ubuntu-24.04-arm , target: aarch64-unknown-linux-gnu , features: feat_os_unix_gnueabihf }
519519 - { os: ubuntu-latest , target: aarch64-unknown-linux-musl , features: feat_os_unix , use-cross: use-cross , skip-tests: true }
@@ -524,13 +524,14 @@ jobs:
524524 - { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: "feat_os_unix,uudoc" , use-cross: no, workspace-tests: true }
525525 - { os: ubuntu-latest , target: x86_64-unknown-linux-musl , features: feat_os_unix , use-cross: use-cross }
526526 - { os: ubuntu-latest , target: x86_64-unknown-redox , features: feat_os_unix_redox , use-cross: redoxer , skip-tests: true }
527+ - { os: ubuntu-latest , target: wasm32-unknown-unknown , default-features: false, features: uucore/format, skip-tests: true }
527528 - { os: macos-latest , target: aarch64-apple-darwin , features: feat_os_macos, workspace-tests: true } # M1 CPU
528529 - { os: macos-13 , target: x86_64-apple-darwin , features: feat_os_macos, workspace-tests: true }
529530 - { os: windows-latest , target: i686-pc-windows-msvc , features: feat_os_windows }
530531 # TODO: Re-enable after rust-onig release: https://github.com/rust-onig/rust-onig/issues/193
531532 # - { os: windows-latest , target: x86_64-pc-windows-gnu , features: feat_os_windows }
532533 - { os: windows-latest , target: x86_64-pc-windows-msvc , features: feat_os_windows }
533- - { os: windows-latest , target: aarch64-pc-windows-msvc , features: feat_os_windows, use-cross: use-cross , skip-tests: true }
534+ - { os: windows-latest , target: aarch64-pc-windows-msvc , features: feat_os_windows, use-cross: use-cross , skip-tests: true }
534535 steps :
535536 - uses : actions/checkout@v4
536537 with :
@@ -620,6 +621,10 @@ jobs:
620621 CARGO_FEATURES_OPTION='' ;
621622 if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features=${{ matrix.job.features }}' ; fi
622623 outputs CARGO_FEATURES_OPTION
624+ # * CARGO_DEFAULT_FEATURES_OPTION
625+ CARGO_DEFAULT_FEATURES_OPTION='' ;
626+ if [ "${{ matrix.job.default-features }}" == "false" ]; then CARGO_DEFAULT_FEATURES_OPTION='--no-default-features' ; fi
627+ outputs CARGO_DEFAULT_FEATURES_OPTION
623628 # * CARGO_CMD
624629 CARGO_CMD='cross'
625630 CARGO_CMD_OPTIONS='+${{ env.RUST_MIN_SRV }}'
@@ -753,20 +758,20 @@ jobs:
753758 # dependencies
754759 echo "## dependency list"
755760 cargo fetch --locked --quiet
756- cargo tree --locked --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --no-dedupe -e=no-dev --prefix=none | grep -vE "$PWD" | sort --unique
761+ cargo tree --locked --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }} --no-dedupe -e=no-dev --prefix=none | grep -vE "$PWD" | sort --unique
757762 - name : Build
758763 shell : bash
759764 run : |
760765 ## Build
761766 ${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} build --release \
762- --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }}
767+ --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
763768 - name : Test
764769 if : matrix.job.skip-tests != true
765770 shell : bash
766771 run : |
767772 ## Test
768773 ${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} test --target=${{ matrix.job.target }} \
769- ${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }}
774+ ${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
770775 env :
771776 RUST_BACKTRACE : " 1"
772777 - name : Test individual utilities
@@ -828,111 +833,6 @@ jobs:
828833 env :
829834 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
830835
831- build_wasm :
832- name : Build/WASM
833- needs : [ min_version, deps ]
834- runs-on : ubuntu-latest
835- timeout-minutes : 90
836- env :
837- SCCACHE_GHA_ENABLED : " true"
838- RUSTC_WRAPPER : " sccache"
839- strategy :
840- matrix :
841- job :
842- - { crate: uu_arch }
843- - { crate: uu_base32 }
844- - { crate: uu_base64 }
845- - { crate: uu_basename }
846- - { crate: uu_basenc }
847- - { crate: uu_cksum }
848- - { crate: uu_cut }
849- - { crate: uu_date }
850- - { crate: uu_dircolors }
851- - { crate: uu_dirname }
852- - { crate: uu_echo }
853- - { crate: uu_expand }
854- - { crate: uu_false }
855- - { crate: uu_fmt }
856- - { crate: uu_fold }
857- - { crate: uu_hashsum }
858- - { crate: uu_join }
859- - { crate: uu_link }
860- - { crate: uu_nl }
861- - { crate: uu_numfmt }
862- - { crate: uu_od }
863- - { crate: uu_paste }
864- - { crate: uu_pr }
865- - { crate: uu_printenv }
866- - { crate: uu_printf }
867- - { crate: uu_ptx }
868- - { crate: uu_pwd }
869- - { crate: uu_seq }
870- - { crate: uu_sleep }
871- - { crate: uu_sum }
872- - { crate: uu_tee }
873- - { crate: uu_true }
874- - { crate: uu_truncate }
875- - { crate: uu_tsort }
876- - { crate: uu_uname }
877- - { crate: uu_unexpand }
878- - { crate: uu_uniq }
879- - { crate: uu_unlink }
880- - { crate: uu_wc }
881- - { crate: uu_yes }
882- - { crate: uucore }
883- - { crate: uucore, features: [ default ] }
884- - { crate: uucore, features: [ backup-control ] }
885- - { crate: uucore, features: [ buf-copy ] }
886- - { crate: uucore, features: [ checksum ] }
887- - { crate: uucore, features: [ colors ] }
888- - { crate: uucore, features: [ custom-tz-fmt ] }
889- - { crate: uucore, features: [ encoding ] }
890- - { crate: uucore, features: [ entries ] }
891- - { crate: uucore, features: [ extendedbigdecimal ] }
892- - { crate: uucore, features: [ fast-inc ] }
893- - { crate: uucore, features: [ format ] }
894- - { crate: uucore, features: [ fsxattr ] }
895- - { crate: uucore, features: [ lines ] }
896- - { crate: uucore, features: [ parser ] }
897- - { crate: uucore, features: [ perms ] }
898- - { crate: uucore, features: [ pipes ] }
899- - { crate: uucore, features: [ proc-info ] }
900- - { crate: uucore, features: [ process ] }
901- - { crate: uucore, features: [ quoting-style ] }
902- - { crate: uucore, features: [ ranges ] }
903- - { crate: uucore, features: [ ringbuffer ] }
904- - { crate: uucore, features: [ selinux ] }
905- - { crate: uucore, features: [ signals ] }
906- - { crate: uucore, features: [ sum ] }
907- - { crate: uucore, features: [ tty ] }
908- - { crate: uucore, features: [ update-control ] }
909- - { crate: uucore, features: [ utf8 ] }
910- - { crate: uucore, features: [ version-cmp ] }
911- - { crate: uucore, features: [ wide ] }
912- - { crate: uucore_procs }
913- - { crate: uuhelp_parser }
914- steps :
915- - uses : actions/checkout@v4
916- with :
917- persist-credentials : false
918- - uses : dtolnay/rust-toolchain@master
919- with :
920- toolchain : ${{ env.RUST_MIN_SRV }}
921- targets : wasm32-unknown-unknown
922- - uses : Swatinem/rust-cache@v2
923- with :
924- key : " ${{ matrix.job.crate }} ${{ join(matrix.job.features || '', ' ') }}"
925- - name : Run sccache-cache
926- uses : mozilla-actions/sccache-action@v0.0.9
927- - name : Build
928- run : |
929- cargo build \
930- --target wasm32-unknown-unknown \
931- --no-default-features \
932- --lib \
933- --package ${{ matrix.job.crate }} \
934- --features "${{ join(matrix.job.features || '', ',') }}"
935-
936836 test_busybox :
937837 name : Tests/BusyBox test suite
938838 needs : [ min_version, deps ]
0 commit comments