Skip to content

Commit

Permalink
Merge branch 'main' into one-fs
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvestre authored Dec 22, 2024
2 parents 8db945f + e736c2a commit bb3ae51
Show file tree
Hide file tree
Showing 83 changed files with 3,083 additions and 1,658 deletions.
2 changes: 1 addition & 1 deletion .clippy.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
msrv = "1.77.0"
msrv = "1.79.0"
cognitive-complexity-threshold = 24
missing-docs-in-crate-items = true
check-private-items = true
46 changes: 36 additions & 10 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
PROJECT_NAME: coreutils
PROJECT_DESC: "Core universal (cross-platform) utilities"
PROJECT_AUTH: "uutils"
RUST_MIN_SRV: "1.77.0"
RUST_MIN_SRV: "1.79.0"
# * style job configuration
STYLE_FAIL_ON_FAULT: true ## (bool) fail the build if a style job contains a fault (error or warning); may be overridden on a per-job basis

Expand All @@ -37,6 +37,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: EmbarkStudios/cargo-deny-action@v2

style_deps:
Expand All @@ -54,6 +56,8 @@ jobs:
- { os: windows-latest , features: feat_os_windows }
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@nightly
## note: requires 'nightly' toolchain b/c `cargo-udeps` uses the `rustc` '-Z save-analysis' option
## * ... ref: <https://github.com/est31/cargo-udeps/issues/73>
Expand Down Expand Up @@ -106,13 +110,15 @@ jobs:
# - { os: windows-latest , features: feat_os_windows }
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/[email protected].6
uses: mozilla-actions/[email protected].7
- name: Initialize workflow variables
id: vars
shell: bash
Expand Down Expand Up @@ -159,14 +165,16 @@ jobs:
- { os: ubuntu-latest , features: feat_os_unix }
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_MIN_SRV }}
components: rustfmt
- uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/[email protected].6
uses: mozilla-actions/[email protected].7
- name: Initialize workflow variables
id: vars
shell: bash
Expand Down Expand Up @@ -227,6 +235,8 @@ jobs:
- { os: ubuntu-latest , features: feat_os_unix }
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: "`cargo update` testing"
Expand All @@ -250,11 +260,13 @@ jobs:
- { os: ubuntu-latest , features: feat_os_unix }
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/[email protected].6
uses: mozilla-actions/[email protected].7
- name: "`make build`"
shell: bash
run: |
Expand Down Expand Up @@ -304,11 +316,13 @@ jobs:
- { os: windows-latest , features: feat_os_windows }
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/[email protected].6
uses: mozilla-actions/[email protected].7
- name: Test
run: cargo nextest run --hide-progress-bar --profile ci --features ${{ matrix.job.features }}
env:
Expand All @@ -331,11 +345,13 @@ jobs:
- { os: windows-latest , features: feat_os_windows }
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@nightly
- uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/[email protected].6
uses: mozilla-actions/[email protected].7
- name: Test
run: cargo nextest run --hide-progress-bar --profile ci --features ${{ matrix.job.features }}
env:
Expand All @@ -355,10 +371,12 @@ jobs:
- { os: ubuntu-latest , features: feat_os_unix }
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/[email protected].6
uses: mozilla-actions/[email protected].7
- name: Install dependencies
shell: bash
run: |
Expand Down Expand Up @@ -485,6 +503,8 @@ jobs:
- { os: windows-latest , target: aarch64-pc-windows-msvc , features: feat_os_windows, use-cross: use-cross , skip-tests: true }
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_MIN_SRV }}
Expand All @@ -493,7 +513,7 @@ jobs:
with:
key: "${{ matrix.job.os }}_${{ matrix.job.target }}"
- name: Run sccache-cache
uses: mozilla-actions/[email protected].6
uses: mozilla-actions/[email protected].7
- name: Initialize workflow variables
id: vars
shell: bash
Expand Down Expand Up @@ -780,9 +800,11 @@ jobs:
## VARs setup
echo "TEST_SUMMARY_FILE=busybox-result.json" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/[email protected].6
uses: mozilla-actions/[email protected].7
- name: Install/setup prerequisites
shell: bash
run: |
Expand Down Expand Up @@ -860,13 +882,15 @@ jobs:
TEST_SUMMARY_FILE="toybox-result.json"
outputs TEST_SUMMARY_FILE
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_MIN_SRV }}
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/[email protected].6
uses: mozilla-actions/[email protected].7
- name: Build coreutils as multiple binaries
shell: bash
run: |
Expand Down Expand Up @@ -935,6 +959,8 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: build and test all programs individually
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/CheckScripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
env:
Expand All @@ -46,6 +48,8 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup shfmt
uses: mfinelli/setup-shfmt@v3
- name: Run shfmt
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/FixPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
- { os: ubuntu-latest , features: feat_os_unix }
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Initialize job variables
id: vars
shell: bash
Expand Down Expand Up @@ -86,6 +88,8 @@ jobs:
- { os: ubuntu-latest , features: feat_os_unix }
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Initialize job variables
id: vars
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/GnuComment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_run:
workflows: ["GnuTests"]
types:
- completed
- completed # zizmor: ignore[dangerous-triggers]

permissions: {}
jobs:
Expand Down
28 changes: 24 additions & 4 deletions .github/workflows/GnuTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

env:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}

jobs:
gnu:
permissions:
Expand All @@ -45,9 +48,9 @@ jobs:
path_reference="reference"
outputs path_GNU path_GNU_tests path_reference path_UUTILS
#
repo_default_branch="${{ github.event.repository.default_branch }}"
repo_default_branch="$DEFAULT_BRANCH"
repo_GNU_ref="v9.5"
repo_reference_branch="${{ github.event.repository.default_branch }}"
repo_reference_branch="$DEFAULT_BRANCH"
outputs repo_default_branch repo_GNU_ref repo_reference_branch
#
SUITE_LOG_FILE="${path_GNU_tests}/test-suite.log"
Expand All @@ -62,6 +65,7 @@ jobs:
uses: actions/checkout@v4
with:
path: '${{ steps.vars.outputs.path_UUTILS }}'
persist-credentials: false
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
Expand All @@ -76,6 +80,7 @@ jobs:
path: '${{ steps.vars.outputs.path_GNU }}'
ref: ${{ steps.vars.outputs.repo_GNU_ref }}
submodules: false
persist-credentials: false

- name: Override submodule URL and initialize submodules
# Use github instead of upstream git server
Expand Down Expand Up @@ -244,11 +249,15 @@ jobs:
CURRENT_RUN_ERROR=$(sed -n "s/^ERROR: \([[:print:]]\+\).*/\1/p" "${new_log_file}" | sort)
REF_FAILING=$(sed -n "s/^FAIL: \([[:print:]]\+\).*/\1/p" "${ref_log_file}"| sort)
CURRENT_RUN_FAILING=$(sed -n "s/^FAIL: \([[:print:]]\+\).*/\1/p" "${new_log_file}" | sort)
echo "Detailled information:"
REF_SKIP=$(sed -n "s/^SKIP: \([[:print:]]\+\).*/\1/p" "${ref_log_file}"| sort)
CURRENT_RUN_SKIP=$(sed -n "s/^SKIP: \([[:print:]]\+\).*/\1/p" "${new_log_file}" | sort)
echo "Detailed information:"
echo "REF_ERROR = ${REF_ERROR}"
echo "CURRENT_RUN_ERROR = ${CURRENT_RUN_ERROR}"
echo "REF_FAILING = ${REF_FAILING}"
echo "CURRENT_RUN_FAILING = ${CURRENT_RUN_FAILING}"
echo "REF_SKIP_PASS = ${REF_SKIP}"
# Compare failing and error tests
for LINE in ${CURRENT_RUN_FAILING}
Expand Down Expand Up @@ -303,11 +312,22 @@ jobs:
do
if ! grep -Fxq ${LINE}<<<"${CURRENT_RUN_ERROR}"
then
MSG="Congrats! The gnu test ${LINE} is no longer ERROR!"
MSG="Congrats! The gnu test ${LINE} is no longer ERROR! (might be PASS or FAIL)"
echo "::warning ::$MSG"
echo $MSG >> ${COMMENT_LOG}
fi
done
for LINE in ${REF_SKIP}
do
if ! grep -Fxq ${LINE}<<<"${CURRENT_RUN_SKIP}"
then
MSG="Congrats! The gnu test ${LINE} is no longer SKIP! (might be PASS, ERROR or FAIL)"
echo "::warning ::$MSG"
echo $MSG >> ${COMMENT_LOG}
fi
done
else
echo "::warning ::Skipping ${test_type} test failure comparison; no prior reference test logs are available."
fi
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ jobs:
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Collect information about runner
if: always()
continue-on-error: true
Expand Down Expand Up @@ -176,7 +178,7 @@ jobs:
util/android-commands.sh sync_host
util/android-commands.sh build
util/android-commands.sh tests
if [[ "${{ steps.rust-cache.outputs.cache-hit }}" != 'true' ]]; then util/android-commands.sh sync_image; fi; exit 0
if [ "${{ steps.rust-cache.outputs.cache-hit }}" != 'true' ]; then util/android-commands.sh sync_image; fi; exit 0
- name: Collect information about runner ressources
if: always()
continue-on-error: true
Expand Down
Loading

0 comments on commit bb3ae51

Please sign in to comment.