Skip to content

Commit bb3ae51

Browse files
authored
Merge branch 'main' into one-fs
2 parents 8db945f + e736c2a commit bb3ae51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+3083
-1658
lines changed

.clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
msrv = "1.77.0"
1+
msrv = "1.79.0"
22
cognitive-complexity-threshold = 24
33
missing-docs-in-crate-items = true
44
check-private-items = true

.github/workflows/CICD.yml

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
PROJECT_NAME: coreutils
1212
PROJECT_DESC: "Core universal (cross-platform) utilities"
1313
PROJECT_AUTH: "uutils"
14-
RUST_MIN_SRV: "1.77.0"
14+
RUST_MIN_SRV: "1.79.0"
1515
# * style job configuration
1616
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
1717

@@ -37,6 +37,8 @@ jobs:
3737
runs-on: ubuntu-latest
3838
steps:
3939
- uses: actions/checkout@v4
40+
with:
41+
persist-credentials: false
4042
- uses: EmbarkStudios/cargo-deny-action@v2
4143

4244
style_deps:
@@ -54,6 +56,8 @@ jobs:
5456
- { os: windows-latest , features: feat_os_windows }
5557
steps:
5658
- uses: actions/checkout@v4
59+
with:
60+
persist-credentials: false
5761
- uses: dtolnay/rust-toolchain@nightly
5862
## note: requires 'nightly' toolchain b/c `cargo-udeps` uses the `rustc` '-Z save-analysis' option
5963
## * ... ref: <https://github.com/est31/cargo-udeps/issues/73>
@@ -106,13 +110,15 @@ jobs:
106110
# - { os: windows-latest , features: feat_os_windows }
107111
steps:
108112
- uses: actions/checkout@v4
113+
with:
114+
persist-credentials: false
109115
- uses: dtolnay/rust-toolchain@master
110116
with:
111117
toolchain: stable
112118
components: clippy
113119
- uses: Swatinem/rust-cache@v2
114120
- name: Run sccache-cache
115-
uses: mozilla-actions/[email protected].6
121+
uses: mozilla-actions/[email protected].7
116122
- name: Initialize workflow variables
117123
id: vars
118124
shell: bash
@@ -159,14 +165,16 @@ jobs:
159165
- { os: ubuntu-latest , features: feat_os_unix }
160166
steps:
161167
- uses: actions/checkout@v4
168+
with:
169+
persist-credentials: false
162170
- uses: dtolnay/rust-toolchain@master
163171
with:
164172
toolchain: ${{ env.RUST_MIN_SRV }}
165173
components: rustfmt
166174
- uses: taiki-e/install-action@nextest
167175
- uses: Swatinem/rust-cache@v2
168176
- name: Run sccache-cache
169-
uses: mozilla-actions/[email protected].6
177+
uses: mozilla-actions/[email protected].7
170178
- name: Initialize workflow variables
171179
id: vars
172180
shell: bash
@@ -227,6 +235,8 @@ jobs:
227235
- { os: ubuntu-latest , features: feat_os_unix }
228236
steps:
229237
- uses: actions/checkout@v4
238+
with:
239+
persist-credentials: false
230240
- uses: dtolnay/rust-toolchain@stable
231241
- uses: Swatinem/rust-cache@v2
232242
- name: "`cargo update` testing"
@@ -250,11 +260,13 @@ jobs:
250260
- { os: ubuntu-latest , features: feat_os_unix }
251261
steps:
252262
- uses: actions/checkout@v4
263+
with:
264+
persist-credentials: false
253265
- uses: dtolnay/rust-toolchain@stable
254266
- uses: taiki-e/install-action@nextest
255267
- uses: Swatinem/rust-cache@v2
256268
- name: Run sccache-cache
257-
uses: mozilla-actions/[email protected].6
269+
uses: mozilla-actions/[email protected].7
258270
- name: "`make build`"
259271
shell: bash
260272
run: |
@@ -304,11 +316,13 @@ jobs:
304316
- { os: windows-latest , features: feat_os_windows }
305317
steps:
306318
- uses: actions/checkout@v4
319+
with:
320+
persist-credentials: false
307321
- uses: dtolnay/rust-toolchain@stable
308322
- uses: taiki-e/install-action@nextest
309323
- uses: Swatinem/rust-cache@v2
310324
- name: Run sccache-cache
311-
uses: mozilla-actions/[email protected].6
325+
uses: mozilla-actions/[email protected].7
312326
- name: Test
313327
run: cargo nextest run --hide-progress-bar --profile ci --features ${{ matrix.job.features }}
314328
env:
@@ -331,11 +345,13 @@ jobs:
331345
- { os: windows-latest , features: feat_os_windows }
332346
steps:
333347
- uses: actions/checkout@v4
348+
with:
349+
persist-credentials: false
334350
- uses: dtolnay/rust-toolchain@nightly
335351
- uses: taiki-e/install-action@nextest
336352
- uses: Swatinem/rust-cache@v2
337353
- name: Run sccache-cache
338-
uses: mozilla-actions/[email protected].6
354+
uses: mozilla-actions/[email protected].7
339355
- name: Test
340356
run: cargo nextest run --hide-progress-bar --profile ci --features ${{ matrix.job.features }}
341357
env:
@@ -355,10 +371,12 @@ jobs:
355371
- { os: ubuntu-latest , features: feat_os_unix }
356372
steps:
357373
- uses: actions/checkout@v4
374+
with:
375+
persist-credentials: false
358376
- uses: dtolnay/rust-toolchain@stable
359377
- uses: Swatinem/rust-cache@v2
360378
- name: Run sccache-cache
361-
uses: mozilla-actions/[email protected].6
379+
uses: mozilla-actions/[email protected].7
362380
- name: Install dependencies
363381
shell: bash
364382
run: |
@@ -485,6 +503,8 @@ jobs:
485503
- { os: windows-latest , target: aarch64-pc-windows-msvc , features: feat_os_windows, use-cross: use-cross , skip-tests: true }
486504
steps:
487505
- uses: actions/checkout@v4
506+
with:
507+
persist-credentials: false
488508
- uses: dtolnay/rust-toolchain@master
489509
with:
490510
toolchain: ${{ env.RUST_MIN_SRV }}
@@ -493,7 +513,7 @@ jobs:
493513
with:
494514
key: "${{ matrix.job.os }}_${{ matrix.job.target }}"
495515
- name: Run sccache-cache
496-
uses: mozilla-actions/[email protected].6
516+
uses: mozilla-actions/[email protected].7
497517
- name: Initialize workflow variables
498518
id: vars
499519
shell: bash
@@ -780,9 +800,11 @@ jobs:
780800
## VARs setup
781801
echo "TEST_SUMMARY_FILE=busybox-result.json" >> $GITHUB_OUTPUT
782802
- uses: actions/checkout@v4
803+
with:
804+
persist-credentials: false
783805
- uses: Swatinem/rust-cache@v2
784806
- name: Run sccache-cache
785-
uses: mozilla-actions/[email protected].6
807+
uses: mozilla-actions/[email protected].7
786808
- name: Install/setup prerequisites
787809
shell: bash
788810
run: |
@@ -860,13 +882,15 @@ jobs:
860882
TEST_SUMMARY_FILE="toybox-result.json"
861883
outputs TEST_SUMMARY_FILE
862884
- uses: actions/checkout@v4
885+
with:
886+
persist-credentials: false
863887
- uses: dtolnay/rust-toolchain@master
864888
with:
865889
toolchain: ${{ env.RUST_MIN_SRV }}
866890
components: rustfmt
867891
- uses: Swatinem/rust-cache@v2
868892
- name: Run sccache-cache
869-
uses: mozilla-actions/[email protected].6
893+
uses: mozilla-actions/[email protected].7
870894
- name: Build coreutils as multiple binaries
871895
shell: bash
872896
run: |
@@ -935,6 +959,8 @@ jobs:
935959
os: [ubuntu-latest, macos-latest, windows-latest]
936960
steps:
937961
- uses: actions/checkout@v4
962+
with:
963+
persist-credentials: false
938964
- uses: dtolnay/rust-toolchain@stable
939965
- uses: Swatinem/rust-cache@v2
940966
- name: build and test all programs individually

.github/workflows/CheckScripts.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
contents: read
3131
steps:
3232
- uses: actions/checkout@v4
33+
with:
34+
persist-credentials: false
3335
- name: Run ShellCheck
3436
uses: ludeeus/action-shellcheck@master
3537
env:
@@ -46,6 +48,8 @@ jobs:
4648
contents: read
4749
steps:
4850
- uses: actions/checkout@v4
51+
with:
52+
persist-credentials: false
4953
- name: Setup shfmt
5054
uses: mfinelli/setup-shfmt@v3
5155
- name: Run shfmt

.github/workflows/FixPR.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
- { os: ubuntu-latest , features: feat_os_unix }
2828
steps:
2929
- uses: actions/checkout@v4
30+
with:
31+
persist-credentials: false
3032
- name: Initialize job variables
3133
id: vars
3234
shell: bash
@@ -86,6 +88,8 @@ jobs:
8688
- { os: ubuntu-latest , features: feat_os_unix }
8789
steps:
8890
- uses: actions/checkout@v4
91+
with:
92+
persist-credentials: false
8993
- name: Initialize job variables
9094
id: vars
9195
shell: bash

.github/workflows/GnuComment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_run:
55
workflows: ["GnuTests"]
66
types:
7-
- completed
7+
- completed # zizmor: ignore[dangerous-triggers]
88

99
permissions: {}
1010
jobs:

.github/workflows/GnuTests.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ concurrency:
2323
group: ${{ github.workflow }}-${{ github.ref }}
2424
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
2525

26+
env:
27+
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
28+
2629
jobs:
2730
gnu:
2831
permissions:
@@ -45,9 +48,9 @@ jobs:
4548
path_reference="reference"
4649
outputs path_GNU path_GNU_tests path_reference path_UUTILS
4750
#
48-
repo_default_branch="${{ github.event.repository.default_branch }}"
51+
repo_default_branch="$DEFAULT_BRANCH"
4952
repo_GNU_ref="v9.5"
50-
repo_reference_branch="${{ github.event.repository.default_branch }}"
53+
repo_reference_branch="$DEFAULT_BRANCH"
5154
outputs repo_default_branch repo_GNU_ref repo_reference_branch
5255
#
5356
SUITE_LOG_FILE="${path_GNU_tests}/test-suite.log"
@@ -62,6 +65,7 @@ jobs:
6265
uses: actions/checkout@v4
6366
with:
6467
path: '${{ steps.vars.outputs.path_UUTILS }}'
68+
persist-credentials: false
6569
- uses: dtolnay/rust-toolchain@master
6670
with:
6771
toolchain: stable
@@ -76,6 +80,7 @@ jobs:
7680
path: '${{ steps.vars.outputs.path_GNU }}'
7781
ref: ${{ steps.vars.outputs.repo_GNU_ref }}
7882
submodules: false
83+
persist-credentials: false
7984

8085
- name: Override submodule URL and initialize submodules
8186
# Use github instead of upstream git server
@@ -244,11 +249,15 @@ jobs:
244249
CURRENT_RUN_ERROR=$(sed -n "s/^ERROR: \([[:print:]]\+\).*/\1/p" "${new_log_file}" | sort)
245250
REF_FAILING=$(sed -n "s/^FAIL: \([[:print:]]\+\).*/\1/p" "${ref_log_file}"| sort)
246251
CURRENT_RUN_FAILING=$(sed -n "s/^FAIL: \([[:print:]]\+\).*/\1/p" "${new_log_file}" | sort)
247-
echo "Detailled information:"
252+
REF_SKIP=$(sed -n "s/^SKIP: \([[:print:]]\+\).*/\1/p" "${ref_log_file}"| sort)
253+
CURRENT_RUN_SKIP=$(sed -n "s/^SKIP: \([[:print:]]\+\).*/\1/p" "${new_log_file}" | sort)
254+
255+
echo "Detailed information:"
248256
echo "REF_ERROR = ${REF_ERROR}"
249257
echo "CURRENT_RUN_ERROR = ${CURRENT_RUN_ERROR}"
250258
echo "REF_FAILING = ${REF_FAILING}"
251259
echo "CURRENT_RUN_FAILING = ${CURRENT_RUN_FAILING}"
260+
echo "REF_SKIP_PASS = ${REF_SKIP}"
252261
253262
# Compare failing and error tests
254263
for LINE in ${CURRENT_RUN_FAILING}
@@ -303,11 +312,22 @@ jobs:
303312
do
304313
if ! grep -Fxq ${LINE}<<<"${CURRENT_RUN_ERROR}"
305314
then
306-
MSG="Congrats! The gnu test ${LINE} is no longer ERROR!"
315+
MSG="Congrats! The gnu test ${LINE} is no longer ERROR! (might be PASS or FAIL)"
316+
echo "::warning ::$MSG"
317+
echo $MSG >> ${COMMENT_LOG}
318+
fi
319+
done
320+
321+
for LINE in ${REF_SKIP}
322+
do
323+
if ! grep -Fxq ${LINE}<<<"${CURRENT_RUN_SKIP}"
324+
then
325+
MSG="Congrats! The gnu test ${LINE} is no longer SKIP! (might be PASS, ERROR or FAIL)"
307326
echo "::warning ::$MSG"
308327
echo $MSG >> ${COMMENT_LOG}
309328
fi
310329
done
330+
311331
else
312332
echo "::warning ::Skipping ${test_type} test failure comparison; no prior reference test logs are available."
313333
fi

.github/workflows/android.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ jobs:
7979
sudo udevadm control --reload-rules
8080
sudo udevadm trigger --name-match=kvm
8181
- uses: actions/checkout@v4
82+
with:
83+
persist-credentials: false
8284
- name: Collect information about runner
8385
if: always()
8486
continue-on-error: true
@@ -176,7 +178,7 @@ jobs:
176178
util/android-commands.sh sync_host
177179
util/android-commands.sh build
178180
util/android-commands.sh tests
179-
if [[ "${{ steps.rust-cache.outputs.cache-hit }}" != 'true' ]]; then util/android-commands.sh sync_image; fi; exit 0
181+
if [ "${{ steps.rust-cache.outputs.cache-hit }}" != 'true' ]; then util/android-commands.sh sync_image; fi; exit 0
180182
- name: Collect information about runner ressources
181183
if: always()
182184
continue-on-error: true

0 commit comments

Comments
 (0)