Skip to content

Commit b493d8c

Browse files
committed
CICD.yml: Publish both of coreutils and individual *.exe
1 parent 01c8d6e commit b493d8c

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

.github/workflows/CICD.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ jobs:
375375
fail-fast: false
376376
matrix:
377377
job:
378-
# - { os , target , cargo-options , default-features, features , use-cross , toolchain, skip-tests, workspace-tests, skip-package, skip-publish }
378+
# - { os , target , default-features, features , use-cross , toolchain, skip-tests, workspace-tests, skip-package, skip-publish }
379379
- { os: ubuntu-latest , target: arm-unknown-linux-gnueabihf , features: feat_os_unix_gnueabihf , use-cross: use-cross , skip-tests: true }
380380
- { os: ubuntu-24.04-arm , target: aarch64-unknown-linux-gnu , features: feat_os_unix_gnueabihf }
381381
- { os: ubuntu-latest , target: aarch64-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross , skip-tests: true }
@@ -393,7 +393,8 @@ jobs:
393393
- { os: macos-latest , target: aarch64-apple-darwin , workspace-tests: true, check-only: true } # M1 CPU
394394
- { os: macos-latest , target: x86_64-apple-darwin , features: feat_os_macos, workspace-tests: true }
395395
- { os: windows-latest , target: i686-pc-windows-msvc , features: feat_os_windows }
396-
- { os: windows-latest , target: x86_64-pc-windows-gnu , features: feat_os_windows }
396+
# msvc and gnu works on the same target. So publishing msvc is enough.
397+
- { os: windows-latest , target: x86_64-pc-windows-gnu , features: feat_os_windows, skip-publish: true }
397398
- { os: windows-latest , target: x86_64-pc-windows-msvc , features: feat_os_windows }
398399
- { os: windows-latest , target: aarch64-pc-windows-msvc , features: feat_os_windows, use-cross: use-cross , skip-tests: true }
399400
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
sed -i.b '/"expr",/d' Cargo.toml
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,18 @@ 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 for few platforms until we deduplicate many release build for Linux
636+
# Including coreutils too
637+
- name: Build all binaries
636638
if: matrix.job.skip-tests != true && matrix.job.target == 'x86_64-pc-windows-msvc'
637639
shell: bash
638640
run: |
639641
${{ 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 }}
642+
--target=${{ matrix.job.target }} \
643+
${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }} \
644+
-p coreutils --features=${{ matrix.job.features }}
641645
- name: Package
642646
if: matrix.job.skip-publish != true && matrix.job.check-only != true
643647
shell: bash

0 commit comments

Comments
 (0)