-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
158 changed files
with
9,044 additions
and
4,267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ on: | |
pull_request: | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- main | ||
|
||
|
@@ -111,7 +112,7 @@ jobs: | |
components: clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
- name: Initialize workflow variables | ||
id: vars | ||
shell: bash | ||
|
@@ -165,7 +166,7 @@ jobs: | |
- uses: taiki-e/install-action@nextest | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
- name: Initialize workflow variables | ||
id: vars | ||
shell: bash | ||
|
@@ -253,7 +254,7 @@ jobs: | |
- uses: taiki-e/install-action@nextest | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
- name: "`make build`" | ||
shell: bash | ||
run: | | ||
|
@@ -307,9 +308,9 @@ jobs: | |
- uses: taiki-e/install-action@nextest | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
- name: Test | ||
run: cargo nextest run --hide-progress-bar --profile ci ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} | ||
run: cargo nextest run --hide-progress-bar --profile ci --features ${{ matrix.job.features }} | ||
env: | ||
RUST_BACKTRACE: "1" | ||
|
||
|
@@ -334,9 +335,9 @@ jobs: | |
- uses: taiki-e/install-action@nextest | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
- name: Test | ||
run: cargo nextest run --hide-progress-bar --profile ci ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} | ||
run: cargo nextest run --hide-progress-bar --profile ci --features ${{ matrix.job.features }} | ||
env: | ||
RUST_BACKTRACE: "1" | ||
|
||
|
@@ -357,7 +358,7 @@ jobs: | |
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
|
@@ -396,14 +397,14 @@ jobs: | |
--arg multisize "$SIZE_MULTI" \ | ||
'{($date): { sha: $sha, size: $size, multisize: $multisize, }}' > size-result.json | ||
- name: Download the previous individual size result | ||
uses: dawidd6/action-download-artifact@v3 | ||
uses: dawidd6/action-download-artifact@v6 | ||
with: | ||
workflow: CICD.yml | ||
name: individual-size-result | ||
repo: uutils/coreutils | ||
path: dl | ||
- name: Download the previous size result | ||
uses: dawidd6/action-download-artifact@v3 | ||
uses: dawidd6/action-download-artifact@v6 | ||
with: | ||
workflow: CICD.yml | ||
name: size-result | ||
|
@@ -476,8 +477,8 @@ jobs: | |
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: feat_os_unix , use-cross: use-cross } | ||
- { os: ubuntu-latest , target: x86_64-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross } | ||
- { os: ubuntu-latest , target: x86_64-unknown-redox , features: feat_os_unix_redox , use-cross: redoxer , skip-tests: true } | ||
- { os: macos-14 , target: aarch64-apple-darwin , features: feat_os_macos } # M1 CPU | ||
- { os: macos-latest , target: x86_64-apple-darwin , features: feat_os_macos } | ||
- { os: macos-latest , target: aarch64-apple-darwin , features: feat_os_macos } # M1 CPU | ||
- { os: macos-13 , target: x86_64-apple-darwin , features: feat_os_macos } | ||
- { os: windows-latest , target: i686-pc-windows-msvc , features: feat_os_windows } | ||
- { os: windows-latest , target: x86_64-pc-windows-gnu , features: feat_os_windows } | ||
- { os: windows-latest , target: x86_64-pc-windows-msvc , features: feat_os_windows } | ||
|
@@ -491,7 +492,7 @@ jobs: | |
with: | ||
key: "${{ matrix.job.os }}_${{ matrix.job.target }}" | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
- name: Initialize workflow variables | ||
id: vars | ||
shell: bash | ||
|
@@ -541,6 +542,9 @@ jobs: | |
PKG_BASENAME=${PROJECT_NAME}-${REF_TAG:-$REF_SHAS}-${{ matrix.job.target }} | ||
PKG_NAME=${PKG_BASENAME}${PKG_suffix} | ||
outputs PKG_suffix PKG_BASENAME PKG_NAME | ||
# deployable tag? (ie, leading "vM" or "M"; M == version number) | ||
unset DEPLOY ; if [[ $REF_TAG =~ ^[vV]?[0-9].* ]]; then DEPLOY='true' ; fi | ||
outputs DEPLOY | ||
# DPKG architecture? | ||
unset DPKG_ARCH | ||
case ${{ matrix.job.target }} in | ||
|
@@ -746,7 +750,7 @@ jobs: | |
fi | ||
- name: Publish | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
if: steps.vars.outputs.DEPLOY | ||
with: | ||
files: | | ||
${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_NAME }} | ||
|
@@ -776,7 +780,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
- name: Install/setup prerequisites | ||
shell: bash | ||
run: | | ||
|
@@ -860,7 +864,7 @@ jobs: | |
components: rustfmt | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
- name: Build coreutils as multiple binaries | ||
shell: bash | ||
run: | | ||
|
@@ -944,7 +948,7 @@ jobs: | |
- uses: taiki-e/install-action@grcov | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
# - name: Reattach HEAD ## may be needed for accurate code coverage info | ||
# run: git checkout ${{ github.head_ref }} | ||
- name: Initialize workflow variables | ||
|
@@ -1034,9 +1038,9 @@ jobs: | |
# GRCOV_EXCLUDE_OPTION='--excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()"' ## `grcov` ignores these params when passed as an environment variable (why?) | ||
mkdir -p "${COVERAGE_REPORT_DIR}" | ||
# display coverage files | ||
~/.cargo/bin/grcov . --output-type files --ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()" | sort --unique | ||
grcov . --output-type files --ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()" | sort --unique | ||
# generate coverage report | ||
~/.cargo/bin/grcov . --output-type lcov --output-path "${COVERAGE_REPORT_FILE}" --branch --ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()" | ||
grcov . --output-type lcov --output-path "${COVERAGE_REPORT_FILE}" --branch --ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()" | ||
echo "report=${COVERAGE_REPORT_FILE}" >> $GITHUB_OUTPUT | ||
- name: Upload coverage results (to Codecov.io) | ||
uses: codecov/codecov-action@v4 | ||
|
@@ -1047,3 +1051,23 @@ jobs: | |
flags: ${{ steps.vars.outputs.CODECOV_FLAGS }} | ||
name: codecov-umbrella | ||
fail_ci_if_error: false | ||
|
||
test_separately: | ||
name: Separate Builds | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: build and test all programs individually | ||
shell: bash | ||
run: | | ||
for f in $(util/show-utils.sh) | ||
do | ||
echo "Building and testing $f" | ||
cargo test -p "uu_$f" || exit 1 | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,11 +49,6 @@ jobs: | |
*) FAIL_ON_FAULT=true ; FAULT_TYPE=error ;; | ||
esac; | ||
outputs FAIL_ON_FAULT FAULT_TYPE | ||
# target-specific options | ||
# * CARGO_FEATURES_OPTION | ||
CARGO_FEATURES_OPTION='' ; | ||
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi | ||
outputs CARGO_FEATURES_OPTION | ||
- name: "`cargo fmt` testing" | ||
shell: bash | ||
run: | | ||
|
@@ -86,7 +81,7 @@ jobs: | |
components: clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
- name: Initialize workflow variables | ||
id: vars | ||
shell: bash | ||
|
@@ -99,23 +94,6 @@ jobs: | |
*) FAIL_ON_FAULT=true ; FAULT_TYPE=error ;; | ||
esac; | ||
outputs FAIL_ON_FAULT FAULT_TYPE | ||
# target-specific options | ||
# * CARGO_FEATURES_OPTION | ||
CARGO_FEATURES_OPTION='--all-features' ; | ||
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features ${{ matrix.job.features }}' ; fi | ||
outputs CARGO_FEATURES_OPTION | ||
# * determine sub-crate utility list | ||
UTILITY_LIST="$(./util/show-utils.sh ${CARGO_FEATURES_OPTION})" | ||
echo UTILITY_LIST=${UTILITY_LIST} | ||
CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo -n "-puu_${u} "; done;)" | ||
outputs CARGO_UTILITY_LIST_OPTIONS | ||
- name: Install/setup prerequisites | ||
shell: bash | ||
run: | | ||
## Install/setup prerequisites | ||
case '${{ matrix.job.os }}' in | ||
macos-latest) brew install coreutils ;; # needed for show-utils.sh | ||
esac | ||
- name: "`cargo clippy` lint testing" | ||
uses: nick-fields/retry@v3 | ||
with: | ||
|
@@ -130,7 +108,7 @@ jobs: | |
fault_type="${{ steps.vars.outputs.FAULT_TYPE }}" | ||
fault_prefix=$(echo "$fault_type" | tr '[:lower:]' '[:upper:]') | ||
# * convert any warnings to GHA UI annotations; ref: <https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message> | ||
S=$(cargo clippy --all-targets ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_UTILITY_LIST_OPTIONS }} -- ${CLIPPY_FLAGS} -D warnings 2>&1) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s" "$S" | sed -E -n -e '/^error:/{' -e "N; s/^error:[[:space:]]+(.*)\\n[[:space:]]+-->[[:space:]]+(.*):([0-9]+):([0-9]+).*$/::${fault_type} file=\2,line=\3,col=\4::${fault_prefix}: \`cargo clippy\`: \1 (file:'\2', line:\3)/p;" -e '}' ; fault=true ; } | ||
S=$(cargo clippy --all-targets --features ${{ matrix.job.features }} -pcoreutils -- ${CLIPPY_FLAGS} -D warnings 2>&1) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s" "$S" | sed -E -n -e '/^error:/{' -e "N; s/^error:[[:space:]]+(.*)\\n[[:space:]]+-->[[:space:]]+(.*):([0-9]+):([0-9]+).*$/::${fault_type} file=\2,line=\3,col=\4::${fault_prefix}: \`cargo clippy\`: \1 (file:'\2', line:\3)/p;" -e '}' ; fault=true ; } | ||
if [ -n "${{ steps.vars.outputs.FAIL_ON_FAULT }}" ] && [ -n "$fault" ]; then exit 1 ; fi | ||
style_spellcheck: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
- name: Prepare, build and test | ||
uses: vmactions/[email protected] | ||
with: | ||
|
@@ -129,7 +129,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected].4 | ||
uses: mozilla-actions/[email protected].5 | ||
- name: Prepare, build and test | ||
uses: vmactions/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,6 +166,7 @@ RTLD_NEXT | |
RTLD | ||
SIGINT | ||
SIGKILL | ||
SIGSTOP | ||
SIGTERM | ||
SYS_fdatasync | ||
SYS_syncfs | ||
|
Oops, something went wrong.