Skip to content

Commit e7ec01f

Browse files
committed
CICD.yml: Publish both of coreutils and individual *.exe
1 parent f058974 commit e7ec01f

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

.github/workflows/CICD.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ jobs:
367367
fail-fast: false
368368
matrix:
369369
job:
370-
# - { os , target , cargo-options , default-features, features , use-cross , toolchain, skip-tests, workspace-tests, skip-package, skip-publish }
370+
# - { os , target , default-features, features , use-cross , toolchain, skip-tests, workspace-tests, skip-package, skip-publish }
371371
- { os: ubuntu-latest , target: arm-unknown-linux-gnueabihf , features: feat_os_unix_gnueabihf , use-cross: use-cross , skip-tests: true }
372372
- { os: ubuntu-24.04-arm , target: aarch64-unknown-linux-gnu , features: feat_os_unix_gnueabihf }
373373
- { os: ubuntu-latest , target: aarch64-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross , skip-tests: true }
@@ -386,7 +386,8 @@ jobs:
386386
- { os: macos-latest , target: aarch64-apple-darwin , workspace-tests: true, check-only: true } # M1 CPU
387387
- { os: macos-latest , target: x86_64-apple-darwin , features: feat_os_unix, workspace-tests: true }
388388
- { os: windows-latest , target: i686-pc-windows-msvc , features: feat_os_windows }
389-
- { os: windows-latest , target: x86_64-pc-windows-gnu , features: feat_os_windows }
389+
# msvc and gnu works on the same target. So publishing msvc is enough.
390+
- { os: windows-latest , target: x86_64-pc-windows-gnu , features: feat_os_windows, skip-publish: true }
390391
- { os: windows-latest , target: x86_64-pc-windows-msvc , features: feat_os_windows }
391392
- { os: windows-latest , target: aarch64-pc-windows-msvc , features: feat_os_windows, use-cross: use-cross , skip-tests: true }
392393
steps:
@@ -604,22 +605,22 @@ jobs:
604605
# dependencies
605606
echo "## dependency list"
606607
cargo fetch --locked --quiet --target $(rustc --print host-tuple)
607-
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
608+
cargo tree --locked --target=${{ matrix.job.target }} ${{ 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
608609
- name: Check
609610
shell: bash
610611
if: matrix.job.skip-publish != true && matrix.job.check-only == true
611612
run: |
612613
# expr breaks redox
613614
if [[ "${{ matrix.job.target }}" == *"redox"* ]]; then sed -i.b '/"expr",/d' Cargo.toml; fi
614615
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} check \
615-
--target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
616+
--target=${{ matrix.job.target }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
616617
- name: Test
617618
if: matrix.job.skip-tests != true && matrix.job.check-only != true
618619
shell: bash
619620
run: |
620621
## Test
621622
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} test --target=${{ matrix.job.target }} \
622-
${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }} \
623+
${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }} \
623624
${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }} -p coreutils
624625
env:
625626
RUST_BACKTRACE: "1"
@@ -629,15 +630,17 @@ jobs:
629630
run: |
630631
## Build
631632
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} build --release --config=profile.release.strip=true \
632-
--target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
633+
--target=${{ matrix.job.target }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
633634
# We don't want to have many duplicated long jobs at here
634-
# So we build individual binaries for few platforms until we deduplicate many release build for Linux
635-
- name: Build individual binaries
635+
# So we build individual binaries (including coreutils) for few platforms until we deduplicate many release build for Linux
636+
- name: Build all binaries
636637
if: matrix.job.skip-tests != true && matrix.job.target == 'x86_64-pc-windows-msvc'
637638
shell: bash
638639
run: |
639640
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} build --release --config=profile.release.strip=true \
640-
--target=${{ matrix.job.target }} ${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }}
641+
--target=${{ matrix.job.target }} \
642+
${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }} \
643+
-p coreutils --features=${{ matrix.job.features }}
641644
- name: Package
642645
if: matrix.job.skip-publish != true && matrix.job.check-only != true
643646
shell: bash

0 commit comments

Comments
 (0)