@@ -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, skip-package, skip-publish }
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, skip-package: true, skip-publish: 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
@@ -784,6 +789,7 @@ jobs:
784789 name : ${{ env.PROJECT_NAME }}-${{ matrix.job.target }}${{ steps.vars.outputs.ARTIFACTS_SUFFIX }}
785790 path : target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}
786791 - name : Package
792+ if : matrix.job.skip-package != true
787793 shell : bash
788794 run : |
789795 ## Package artifact(s)
@@ -819,7 +825,7 @@ jobs:
819825 fi
820826 - name : Publish
821827 uses : softprops/action-gh-release@v2
822- if : steps.vars.outputs.DEPLOY
828+ if : steps.vars.outputs.DEPLOY && matrix.job.skip-publish != true
823829 with :
824830 draft : true
825831 files : |
0 commit comments